Skip to content

Commit bdba199

Browse files
committed
chore: refactor atlas-init to use external templates for setup and run
1 parent c79fa69 commit bdba199

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

.github/workflows/contract-testing.yaml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -881,14 +881,6 @@ jobs:
881881
ATLAS_INIT_PROJECT_NAME: ${{ format('gh-ci-{0}', github.run_id) }}
882882
steps:
883883
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
884-
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
885-
with:
886-
go-version-file: 'cfn-resources/go.mod'
887-
- name: setup_atlas_init
888-
uses: "EspenAlbert/atlas-init/.github/templates/setup_steps@8a1e10c8363727d66b4229cf3beeecba07c93c9b"
889-
with:
890-
tf_version: "1.10.2"
891-
extra_pypi_packages: "cloudformation-cli cloudformation-cli-go-plugin setuptools"
892884
- uses: aws-actions/setup-sam@2360ef6d90015369947b45b496193ab9976a9b04
893885
with:
894886
use-installer: true
@@ -897,14 +889,18 @@ jobs:
897889
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_TEST_ENV }}
898890
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_TEST_ENV }}
899891
aws-region: us-east-1
900-
- name: atlas-init-init
901-
run: atlas-init init
902-
- name: atlas-init-apply
903-
run: cd ${{ env.FOLDER_PATH }} && atlas-init apply -auto-approve
904-
- name: atlas-init-contract-test-dry-run
905-
run: cd ${{ env.FOLDER_PATH }} && atlas-init --dry-run cfn contract-test
906-
- name: atlas-init-contract-test
907-
run: cd ${{ env.FOLDER_PATH }} && atlas-init cfn contract-test
908-
- name: atlas-init-destroy
909-
run: cd ${{ env.FOLDER_PATH }} && atlas-init destroy -auto-approve
910-
if: always()
892+
- name: setup-atlas-init
893+
uses: "EspenAlbert/atlas-init/.github/templates/external-setup@6ec12c3992b57f62e400bd8cdf98697fe244b532"
894+
with:
895+
version: "0.4.1"
896+
tf-version: "1.10.2"
897+
extra-pypi-packages: "cloudformation-cli cloudformation-cli-go-plugin setuptools"
898+
go-version-fie: 'cfn-resources/go.mod'
899+
- name: run-atlas-init
900+
uses: "EspenAlbert/atlas-init/.github/templates/external-run-with-tf@6ec12c3992b57f62e400bd8cdf98697fe244b532"
901+
with:
902+
cli-command: "cfn contract-test"
903+
step-name: contract-test
904+
cwd: ${{ env.FOLDER_PATH}}
905+
profile-name: ${{ env.ATLAS_INIT_PROFILE }}
906+
dry-run-first: "true"

0 commit comments

Comments
 (0)