Skip to content

Commit b8798b2

Browse files
committed
fix: cleanup
1 parent 9d6177c commit b8798b2

File tree

2 files changed

+17
-39
lines changed

2 files changed

+17
-39
lines changed

.github/workflows/publish_v2_layer.yml

+17-31
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ on:
1010
latest_published_version:
1111
description: "Latest PyPi published version to rebuild latest docs for, e.g. v2.0.0"
1212
required: true
13-
# workflow_run:
14-
# workflows: ["Publish to PyPi"]
15-
# types:
16-
# - completed
13+
workflow_run:
14+
workflows: ["Publish to PyPi"]
15+
types:
16+
- completed
1717

1818
jobs:
1919
build-layer:
@@ -66,8 +66,7 @@ jobs:
6666
cdk --version
6767
- name: CDK build
6868
run: |
69-
# cdk synth --context version="$RELEASE_TAG_VERSION" -o cdk.out
70-
cdk synth --context version="git+https://github.com/awslabs/aws-lambda-powertools-python@${{ inputs.latest_published_version }}" -o cdk.out
69+
cdk synth --context version="$RELEASE_TAG_VERSION" -o cdk.out
7170
- name: zip output
7271
run: zip -r cdk.out.zip cdk.out
7372
- name: Archive CDK artifacts
@@ -86,6 +85,16 @@ jobs:
8685
artefact-name: "cdk-layer-artefact"
8786
environment: "layer-beta"
8887

88+
deploy-prod:
89+
needs:
90+
- deploy-beta
91+
uses: ./.github/workflows/reusable_deploy_layer_stack.yml
92+
secrets: inherit
93+
with:
94+
stage: "PROD"
95+
artefact-name: "cdk-layer-artefact"
96+
environment: "layer-prod"
97+
8998
deploy-sar-beta:
9099
needs:
91100
- build-layer
@@ -95,8 +104,7 @@ jobs:
95104
stage: "BETA"
96105
artefact-name: "cdk-layer-artefact"
97106
environment: "layer-beta"
98-
package-version: 2.0.0
99-
# package-version: ${{ needs.build-layer.outputs.release-tag-version }}
107+
package-version: ${{ needs.build-layer.outputs.release-tag-version }}
100108

101109
deploy-sar-prod:
102110
needs:
@@ -107,26 +115,4 @@ jobs:
107115
stage: "PROD"
108116
artefact-name: "cdk-layer-artefact"
109117
environment: "layer-prod"
110-
package-version: 2.0.0
111-
# package-version: ${{ needs.build-layer.outputs.release-tag-version }}
112-
113-
# deploy-prod:
114-
# needs:
115-
# - deploy-beta
116-
# uses: ./.github/workflows/reusable_deploy_layer_stack.yml
117-
# secrets: inherit
118-
# with:
119-
# stage: "PROD"
120-
# artefact-name: "cdk-layer-artefact"
121-
# environment: "layer-prod"
122-
123-
# deploy-sar-prod:
124-
# needs:
125-
# - build-layer
126-
# uses: ./.github/workflows/reusable_deploy_v2_sar.yml
127-
# secrets: inherit
128-
# with:
129-
# stage: "PROD"
130-
# artefact-name: "cdk-layer-artefact"
131-
# environment: "layer-prod"
132-
# package-version: ${{ needs.build-layer.outputs.release-tag-version }}
118+
package-version: ${{ needs.build-layer.outputs.release-tag-version }}

.github/workflows/reusable_deploy_v2_sar.yml

-8
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,3 @@ jobs:
124124
exit 1
125125
fi
126126
echo "Deployment successful"
127-
- name: Cleanup BETA SAR
128-
if: ${{ inputs.stage == 'BETA' }}
129-
run: |
130-
app_id=$(aws serverlessrepo list-applications --output text --query "Applications[?ApplicationId=='arn:aws:serverlessrepo:${{ env.AWS_REGION }}:${{ steps.aws-credentials-sar-role.outputs.aws-account-id }}:applications/${{ env.SAR_NAME }}'].ApplicationId")
131-
if [ -z "${app_id}" ]; then
132-
echo "Could not find the SAR that we just deployed."
133-
fi
134-
aws serverlessrepo delete-application --application-id "$app_id"

0 commit comments

Comments
 (0)