Promoting Spark services from SIT to UAT #1
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
name: Promotion | |
run-name: Promoting Spark services from SIT to UAT | |
on: | |
workflow_dispatch: | |
jobs: | |
export: | |
environment: SIT | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install Node Dependencies | |
run: npm ci | |
- name: Export Spark services | |
run: | | |
node -e 'require("./scripts/impex").exp("${{ vars.SPARK_SETTINGS }}","${{ secrets.BEARER_TOKEN }}")' | |
[ -f package.zip ] && du -sh package.zip | |
- name: Persist exported entities as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: exported | |
path: package.zip | |
retention-days: 1 | |
import: | |
environment: UAT | |
runs-on: ubuntu-latest | |
needs: export | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install Node Dependencies | |
run: npm ci | |
- name: Download exported entities from artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: exported | |
- name: Import Spark services | |
run: | | |
node -e 'require("./scripts/impex").imp("${{ vars.SPARK_SETTINGS }}","${{ secrets.OAUTH_CREDS }}")' | |
rm -f package.zip |