From 4b608eec350b54f1e9444022c05a0b8f4ec7b593 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Wed, 2 Nov 2022 14:21:13 -0400 Subject: [PATCH 1/4] main/dev ci-cd changes --- .github/pull_request_template.md | 16 +++++++++++ .github/workflows/automated-tests-ci.yml | 2 +- .github/workflows/docker-cd-dev.yml | 27 ++++++++++++++++++ .github/workflows/docker-cd.yml | 2 +- .github/workflows/docker-ci.yml | 2 +- .github/workflows/keycloak-docker-cd-dev.yml | 29 ++++++++++++++++++++ .github/workflows/keycloak-docker-cd.yml | 2 +- .github/workflows/keycloak-docker-ci.yml | 2 +- 8 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/docker-cd-dev.yml create mode 100644 .github/workflows/keycloak-docker-cd-dev.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..d52b4d0 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +## Describe your changes + +Please include a summary of the changes and the related issue/task. Please also include relevant motivation and context. List any dependencies that are required for this change, including links to other pull requests/branches in other repositories if applicable. + +## Issue ticket number and Jira link + +Please include the Jira Ticket Number and Link for this issue/task. + +## Checklist before requesting a review +- [ ] I have performed a self-review of my code +- [ ] Ensure the target / base branch for any feature PR is set to `dev` not main (the only exception to this is releases from `dev` and hotfix branches) + +## Workflow + +Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you. + diff --git a/.github/workflows/automated-tests-ci.yml b/.github/workflows/automated-tests-ci.yml index e5bb500..1bb1c72 100644 --- a/.github/workflows/automated-tests-ci.yml +++ b/.github/workflows/automated-tests-ci.yml @@ -2,7 +2,7 @@ name: Automated Tests CI on: pull_request: - branches: [ master ] + branches: [ main, dev ] workflow_dispatch: jobs: diff --git a/.github/workflows/docker-cd-dev.yml b/.github/workflows/docker-cd-dev.yml new file mode 100644 index 0000000..ccb2b24 --- /dev/null +++ b/.github/workflows/docker-cd-dev.yml @@ -0,0 +1,27 @@ +name: Docker Image CD + +on: + push: + branches: [ dev ] + workflow_dispatch: + +jobs: + docker-cd: + runs-on: ubuntu-latest + steps: + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and push Server Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: codexrems/test-ehr:REMSvExperimental diff --git a/.github/workflows/docker-cd.yml b/.github/workflows/docker-cd.yml index a0da0f9..8b9b6e2 100644 --- a/.github/workflows/docker-cd.yml +++ b/.github/workflows/docker-cd.yml @@ -2,7 +2,7 @@ name: Docker Image CD on: push: - branches: [ master ] + branches: [ main ] workflow_dispatch: jobs: diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 751f157..16da284 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -2,7 +2,7 @@ name: Docker Image CI on: pull_request: - branches: [ master ] + branches: [ main, dev ] workflow_dispatch: jobs: diff --git a/.github/workflows/keycloak-docker-cd-dev.yml b/.github/workflows/keycloak-docker-cd-dev.yml new file mode 100644 index 0000000..f9b4a5a --- /dev/null +++ b/.github/workflows/keycloak-docker-cd-dev.yml @@ -0,0 +1,29 @@ +name: Keycloak Docker Image CD + +on: + push: + branches: [ dev ] + workflow_dispatch: + +jobs: + keycloak-docker-cd: + runs-on: ubuntu-latest + steps: + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and push Keycloak Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: Dockerfile.keycloak + push: true + tags: codexrems/keycloak:REMSvExperimental + diff --git a/.github/workflows/keycloak-docker-cd.yml b/.github/workflows/keycloak-docker-cd.yml index 68b808d..0ec4a13 100644 --- a/.github/workflows/keycloak-docker-cd.yml +++ b/.github/workflows/keycloak-docker-cd.yml @@ -2,7 +2,7 @@ name: Keycloak Docker Image CD on: push: - branches: [ master ] + branches: [ main ] workflow_dispatch: jobs: diff --git a/.github/workflows/keycloak-docker-ci.yml b/.github/workflows/keycloak-docker-ci.yml index 2627dbb..fa398cf 100644 --- a/.github/workflows/keycloak-docker-ci.yml +++ b/.github/workflows/keycloak-docker-ci.yml @@ -2,7 +2,7 @@ name: Keycloak Docker Image CI on: pull_request: - branches: [ master ] + branches: [ main, dev ] workflow_dispatch: jobs: From 4bd437b19ed31734b1182a6e81749c23887cea78 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra <88040167+smalho01@users.noreply.github.com> Date: Thu, 3 Nov 2022 14:56:02 -0400 Subject: [PATCH 2/4] Update docker-cd-dev.yml --- .github/workflows/docker-cd-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-cd-dev.yml b/.github/workflows/docker-cd-dev.yml index ccb2b24..bc58d5b 100644 --- a/.github/workflows/docker-cd-dev.yml +++ b/.github/workflows/docker-cd-dev.yml @@ -1,4 +1,4 @@ -name: Docker Image CD +name: Docker Development Image CD on: push: From 9f85ce5210486772a6cbc72193c2065c80c7e44a Mon Sep 17 00:00:00 2001 From: Sahil Malhotra <88040167+smalho01@users.noreply.github.com> Date: Thu, 3 Nov 2022 14:56:19 -0400 Subject: [PATCH 3/4] Update keycloak-docker-cd-dev.yml --- .github/workflows/keycloak-docker-cd-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/keycloak-docker-cd-dev.yml b/.github/workflows/keycloak-docker-cd-dev.yml index f9b4a5a..b0a51d2 100644 --- a/.github/workflows/keycloak-docker-cd-dev.yml +++ b/.github/workflows/keycloak-docker-cd-dev.yml @@ -1,4 +1,4 @@ -name: Keycloak Docker Image CD +name: Keycloak Development Docker Image CD on: push: From 1b0af6b6862d59d7983d82d74b3e62cf9d35c37d Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 10 Nov 2022 14:47:34 -0500 Subject: [PATCH 4/4] pr template updates --- .github/pull_request_template.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d52b4d0..f586c03 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,6 +10,10 @@ Please include the Jira Ticket Number and Link for this issue/task. - [ ] I have performed a self-review of my code - [ ] Ensure the target / base branch for any feature PR is set to `dev` not main (the only exception to this is releases from `dev` and hotfix branches) +## Checklist for conducting a review +- [ ] Review the code changes and make sure they all make sense and are necessary. +- [ ] Pull the PR branch locally and test by running through workflow and making sure everything works as it is supposed to. + ## Workflow Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you.