diff --git a/.github/workflows/aws-scipool.yaml b/.github/workflows/aws-scipool.yaml index 2a8f7efb..56d1d1cb 100644 --- a/.github/workflows/aws-scipool.yaml +++ b/.github/workflows/aws-scipool.yaml @@ -20,6 +20,9 @@ on: working-dir: required: true type: string + target-environment: + required: true + type: string sceptre-command: type: string default: "sceptre launch prod --prune --yes" @@ -58,10 +61,7 @@ jobs: # SC-26 & SC-219 workaround: dis-associate and re-associate SC actions on every deploy run: | cd ${{ inputs.working-dir }} - sceptre delete --yes prod/sc-product-assoc-ec2-linux-docker.yaml - sceptre delete --yes prod/sc-product-assoc-ec2-linux-docker-notebook.yaml - sceptre delete --yes prod/sc-product-assoc-ec2-linux-windows-jumpcloud.yaml - sceptre delete --yes strides/sc-product-assoc-ec2-linux-docker.yaml - sceptre delete --yes strides/sc-product-assoc-ec2-linux-docker-notebook.yaml - sceptre delete --yes strides/sc-product-assoc-ec2-linux-windows-jumpcloud.yaml + sceptre delete --yes ${{ inputs.target-environment }}/sc-product-assoc-ec2-linux-docker.yaml + sceptre delete --yes ${{ inputs.target-environment }}/sc-product-assoc-ec2-linux-docker-notebook.yaml + sceptre delete --yes ${{ inputs.target-environment }}/sc-product-assoc-ec2-linux-windows-jumpcloud.yaml ${{ inputs.sceptre-command }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 79c729d8..284fbdb8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -112,8 +112,9 @@ jobs: working-dir: "sceptre/strides-ampad-workflows" sceptre-scipooldev: needs: [org-formation] - uses: "./.github/workflows/aws-deploy.yaml" + uses: "./.github/workflows/aws-scipool.yaml" with: + target-environment: "develop" role-to-assume: "arn:aws:iam::465877038949:role/sagebase-github-oidc-sage-bionetworks-it" working-dir: "sceptre/scipool" role-session-name: ${{ needs.org-formation.outputs.role-session-name }} @@ -122,6 +123,7 @@ jobs: needs: [org-formation] uses: "./.github/workflows/aws-scipool.yaml" with: + target-environment: "prod" role-to-assume: "arn:aws:iam::237179673806:role/sagebase-github-oidc-sage-bionetworks-it" role-session-name: ${{ needs.org-formation.outputs.role-session-name }} working-dir: "sceptre/scipool" @@ -130,6 +132,7 @@ jobs: needs: [org-formation, sceptre-strides] uses: "./.github/workflows/aws-scipool.yaml" with: + target-environment: "strides" role-to-assume: "arn:aws:iam::423819316185:role/github-oidc-sage-bionetworks-it" role-session-name: ${{ needs.org-formation.outputs.role-session-name }} working-dir: "sceptre/scipool"