-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1917 - Fix deployment #1994
Merged
Merged
#1917 - Fix deployment #1994
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
31037c2
Deploy fix
andrewsignori-aot 75eecbf
Remove "needs"
andrewsignori-aot 58e678c
Adding env to jobs
andrewsignori-aot 66bf0ef
Test
andrewsignori-aot ae5f7f3
Environment test
andrewsignori-aot 8c0c083
Set env
andrewsignori-aot 39d858f
test inputs
andrewsignori-aot 491e164
Adjusted inputs
andrewsignori-aot b1cb7ca
Fix for definitions deployment
andrewsignori-aot 4a2c11f
Removed github.event.inputs references
andrewsignori-aot eeefd9f
Deploy definitions checks
andrewsignori-aot ca5e2d6
Testing boolean
andrewsignori-aot e414bc4
Adjusted comments
andrewsignori-aot ddcc1bf
Added run-name
andrewsignori-aot 85deeaf
Removed hardcoded tag value
andrewsignori-aot 3c14c08
Removed extra white space
andrewsignori-aot 006c42c
PR review comments
andrewsignori-aot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Release - Create Branch | ||
run-name: Release - Create ${{ inputs.releaseType }} branch version ${{ inputs.versionName }} | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -28,7 +29,7 @@ jobs: | |
- name: Create branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
ref: ${{ inputs.gitRef }} | ||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Release - Deploy all | ||
name: Release - Deploy All | ||
run-name: Release - Deploy all from ${{ inputs.gitRef }} to ${{ inputs.environment }} | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -29,10 +30,10 @@ on: | |
type: string | ||
deployCamundaDefinitions: | ||
required: true | ||
type: string | ||
type: boolean | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
deployFormioDefinitions: | ||
required: true | ||
type: string | ||
type: boolean | ||
secrets: | ||
SA_TOKEN: | ||
required: true | ||
|
@@ -67,7 +68,7 @@ on: | |
|
||
env: | ||
NAMESPACE: ${{ secrets.OPENSHIFT_ENV_NAMESPACE }} | ||
BUILD_REF: ${{ github.event.inputs.gitRef }} | ||
BUILD_REF: ${{ inputs.gitRef }} | ||
HOST_PREFIX: ${{ secrets.HOST_PREFIX }} | ||
BUILD_NAMESPACE: 0c27fb-tools | ||
KEYCLOAK_REALM: "aestsims" | ||
|
@@ -93,23 +94,24 @@ jobs: | |
# Run DB migrations. | ||
run-db-migrations: | ||
name: Run db-migrations | ||
environment: ${{ github.event.inputs.environment }} | ||
environment: ${{ inputs.environment }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print env | ||
run: | | ||
echo Git Environment: ${{ inputs.environment }} | ||
echo Git Red: ${{ inputs.gitRef }} | ||
echo BUILD NAMESPACE: $BUILD_NAMESPACE | ||
echo BRANCH: ${{ github.event.inputs.gitRef }} | ||
echo HOST_PREFIX: $HOST_PREFIX | ||
|
||
- name: Checkout Target Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
ref: ${{ inputs.gitRef }} | ||
|
||
- name: Log in to OpenShift | ||
run: | | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | ||
|
||
- name: Run db-migrations | ||
working-directory: "./devops/" | ||
|
@@ -119,24 +121,25 @@ jobs: | |
# Deploy SIMS API. | ||
deploy-sims-api: | ||
name: Deploy SIMS-API | ||
environment: ${{ github.event.inputs.environment }} | ||
environment: ${{ inputs.environment }} | ||
runs-on: ubuntu-latest | ||
needs: run-db-migrations | ||
steps: | ||
- name: Print env | ||
run: | | ||
echo BUILD NAMESPACE: $BUILD_NAMESPACE | ||
echo BRANCH: ${{ github.event.inputs.gitRef }} | ||
echo BUILD ENVIRONMENT: ${{ inputs.environment }} | ||
echo GIT REF: ${{ inputs.gitRef }} | ||
echo HOST_PREFIX: $HOST_PREFIX | ||
|
||
- name: Checkout Target Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
ref: ${{ inputs.gitRef }} | ||
|
||
- name: Log in to OpenShift | ||
run: | | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | ||
|
||
- name: Deploy SIMS-API | ||
working-directory: "./devops/" | ||
|
@@ -146,24 +149,25 @@ jobs: | |
# Deploy workers. | ||
deploy-workers: | ||
name: Deploy Workers | ||
environment: ${{ github.event.inputs.environment }} | ||
environment: ${{ inputs.environment }} | ||
runs-on: ubuntu-latest | ||
needs: run-db-migrations | ||
steps: | ||
- name: Print env | ||
run: | | ||
echo BUILD NAMESPACE: $BUILD_NAMESPACE | ||
echo BRANCH: ${{ github.event.inputs.gitRef }} | ||
echo BUILD ENVIRONMENT: ${{ inputs.environment }} | ||
echo GIT REF: ${{ inputs.gitRef }} | ||
echo HOST_PREFIX: $HOST_PREFIX | ||
|
||
- name: Checkout Target Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
ref: ${{ inputs.gitRef }} | ||
|
||
- name: Log in to OpenShift | ||
run: | | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | ||
|
||
- name: Deploy Workers | ||
working-directory: "./devops/" | ||
|
@@ -173,24 +177,25 @@ jobs: | |
# Deploy queue consumers. | ||
deploy-queue-consumers: | ||
name: Deploy Queue Consumers | ||
environment: ${{ github.event.inputs.environment }} | ||
environment: ${{ inputs.environment }} | ||
runs-on: ubuntu-latest | ||
needs: run-db-migrations | ||
steps: | ||
- name: Print env | ||
run: | | ||
echo BUILD NAMESPACE: $BUILD_NAMESPACE | ||
echo BRANCH: ${{ github.event.inputs.gitRef }} | ||
echo BUILD ENVIRONMENT: ${{ inputs.environment }} | ||
echo GIT REF: ${{ inputs.gitRef }} | ||
echo HOST_PREFIX: $HOST_PREFIX | ||
|
||
- name: Checkout Target Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
ref: ${{ inputs.gitRef }} | ||
|
||
- name: Log in to OpenShift | ||
run: | | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | ||
|
||
- name: Deploy Queue Consumers | ||
working-directory: "./devops/" | ||
|
@@ -200,24 +205,25 @@ jobs: | |
# Deploy Web/Frontend. | ||
deploy-web-frontend: | ||
name: Deploy Web/Frontend | ||
environment: ${{ github.event.inputs.environment }} | ||
environment: ${{ inputs.environment }} | ||
runs-on: ubuntu-latest | ||
needs: run-db-migrations | ||
steps: | ||
- name: Print env | ||
run: | | ||
echo BUILD NAMESPACE: $BUILD_NAMESPACE | ||
echo BRANCH: ${{ github.event.inputs.gitRef }} | ||
echo BUILD ENVIRONMENT: ${{ inputs.environment }} | ||
echo GIT REF: ${{ inputs.gitRef }} | ||
echo HOST_PREFIX: $HOST_PREFIX | ||
|
||
- name: Checkout Target Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
ref: ${{ inputs.gitRef }} | ||
|
||
- name: Log in to OpenShift | ||
run: | | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | ||
|
||
- name: Deploy Web/Frontend | ||
working-directory: "./devops/" | ||
|
@@ -226,22 +232,22 @@ jobs: | |
|
||
# Deploy Camunda Definitions | ||
deployCamundaDefinitions: | ||
if: ${{ github.event.inputs.deployCamundaDefinitions == 'true' }} | ||
if: ${{ inputs.deployCamundaDefinitions }} | ||
name: Deploy BPMNs and DMNs to Camunda | ||
needs: deploy-sims-api | ||
uses: ./.github/workflows/release-deploy-camunda-definitions.yml | ||
with: | ||
environment: ${{ github.event.inputs.environment }} | ||
gitRef: ${{ github.event.inputs.gitRef }} | ||
environment: ${{ inputs.environment }} | ||
gitRef: ${{ inputs.gitRef }} | ||
secrets: inherit | ||
|
||
# Deploy Formio Definitions | ||
deployFormioDefinitions: | ||
if: ${{ github.event.inputs.deployFormioDefinitions == 'true' }} | ||
if: ${{ inputs.deployFormioDefinitions }} | ||
name: Deploy Form.io definitions | ||
needs: deploy-sims-api | ||
uses: ./.github/workflows/release-deploy-formio-definitions.yml | ||
with: | ||
environment: ${{ github.event.inputs.environment }} | ||
gitRef: ${{ github.event.inputs.gitRef }} | ||
environment: ${{ inputs.environment }} | ||
gitRef: ${{ inputs.gitRef }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One advantage of having those vars is that if the value changes it is only one place to be changed.