-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev ops scale schemaspy up and down (#709)
* Scale SchemaSpy as part of the pipeline to make sure it is current all the time * Make it a one step SchemaSpy cycle * Formatting * Fix typo
- Loading branch information
Showing
1 changed file
with
30 additions
and
8 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -516,19 +516,41 @@ jobs: | |
oc project af2668-tools | ||
oc get all,pvc,secret,pods,ReplicationController,DeploymentConfig,HorizontalPodAutoscaler,imagestreamtag -o name | grep biohubbc | grep $BUILD_ID | awk '{print "oc delete " $1}' | bash | ||
cycleschemaspy: | ||
name: Cycle SchemaSpy to refresh after database update in dev | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false && github.base_ref == 'dev' }} | ||
env: | ||
BUILD_ID: ${{ github.event.number }} | ||
needs: | ||
- checkEnv | ||
- deployDatabaseSetup | ||
steps: | ||
# Log in to OpenShift. | ||
# Note: The secrets needed to log in are NOT available if the PR comes from a FORK. | ||
# PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. | ||
- name: Log in to OpenShift | ||
run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
|
||
- name: Scale down | ||
run: | | ||
oc project af2668-dev | ||
oc scale --replicas=0 dc schemaspy | ||
oc scale --replicas=1 dc schemaspy | ||
cypress-run: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false && github.base_ref != 'prod' }} | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.RECORDING_KEY }} | ||
CYPRESS_username: ${{ secrets.CYPRESS_USER_NAME }} | ||
CYPRESS_password: ${{ secrets.CYPRESS_PASSWORD }} | ||
CYPRESS_BASE_URL: 'https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca' | ||
CYPRESS_host: 'https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca' | ||
CYPRESS_BASE_URL: "https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca" | ||
CYPRESS_host: "https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca" | ||
CYPRESS_ENVIRONMENT: ${{ github.base_ref }} | ||
CYPRESS_authRealm: '35r1iman' | ||
CYPRESS_authClientId: 'biohubbc' | ||
CYPRESS_authUrl: 'https://${{ github.base_ref }}.oidc.gov.bc.ca' | ||
CYPRESS_authRealm: "35r1iman" | ||
CYPRESS_authClientId: "biohubbc" | ||
CYPRESS_authUrl: "https://${{ github.base_ref }}.oidc.gov.bc.ca" | ||
needs: | ||
- deployDatabase | ||
- deployDatabaseSetup | ||
|
@@ -542,15 +564,15 @@ jobs: | |
- name: Wait for API response | ||
uses: nev7n/[email protected] | ||
with: | ||
url: 'https://api-${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca/version' | ||
url: "https://api-${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca/version" | ||
responseCode: 200 | ||
timeout: 240000 | ||
interval: 500 | ||
|
||
- name: Wait for APP response | ||
uses: nev7n/[email protected] | ||
with: | ||
url: 'https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca' | ||
url: "https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca" | ||
responseCode: 200 | ||
timeout: 240000 | ||
interval: 500 | ||
|
@@ -562,7 +584,7 @@ jobs: | |
id: smoke | ||
continue-on-error: false | ||
with: | ||
wait-on: 'https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca' | ||
wait-on: "https://${{ github.base_ref }}-biohubbc.apps.silver.devops.gov.bc.ca" | ||
wait-on-timeout: 240 | ||
record: true | ||
working-directory: testing/e2e | ||
|