Skip to content

Snowflake Cloud

Snowflake Cloud #917

Workflow file for this run

name: Snowflake Cloud
concurrency: snowflake-run
on:
# Triggers the workflow on a schedule for the main branch. Also allows for manual triggers
schedule:
- cron: '0 7 * * 6' # Execute on saturdays at 7AM UTC
workflow_dispatch:
jobs:
deploy-ephemeral-cloud-infra:
uses: liquibase/build-logic/.github/workflows/ephemeral-cloud-infra.yml@main
secrets: inherit
with:
deploy: true
snowflake_th: true
test:
runs-on: ubuntu-latest
needs: [deploy-ephemeral-cloud-infra]
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_DEV_GITHUB_OIDC_ROLE_ARN_BUILD_LOGIC }}
aws-region: us-east-1
- name: Get LIQUIBASETH secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
TH_DB_ADMIN, liquibaseth_usrname
TH_DB_PASSWD, liquibaseth_pwd
- uses: liquibase/liquibase-github-action@v7
with:
operation: "update"
classpath: "src/test/resources/init-changelogs/snowflake"
changeLogFile: "snowflake.sql"
username: "${{env.TH_DB_ADMIN}}"
password: "${{env.TH_DB_PASSWD}}"
url: "${{secrets.TH_SNOW_URL}}"
- name: Snowflake Test Run
env:
LIQUIBASE_PRO_LICENSE_KEY: ${{ secrets.LICENSE_KEY }}
run: mvn -Dtest=LiquibaseHarnessSuiteTest -DconfigFile=/harness-config-cloud.yml -DdbName=snowflake -DdbUsername=${{env.TH_DB_ADMIN}} -DdbPassword=${{env.TH_DB_PASSWD}} -DdbUrl='${{secrets.TH_SNOW_URL}}' -DrollbackStrategy=rollbackByTag test
- name: Archive Snowflake Database Test Results
uses: actions/upload-artifact@v4
with:
name: snowflake-test-results
path: build/spock-reports
destroy-ephemeral-cloud-infra:
if: always()
needs: [ deploy-ephemeral-cloud-infra, test ]
uses: liquibase/build-logic/.github/workflows/ephemeral-cloud-infra.yml@main
secrets: inherit
with:
destroy: true
stack_id: ${{ needs.deploy-ephemeral-cloud-infra.outputs.stack_id }}
snowflake_th: true