Skip to content

Commit c565d48

Browse files
Release botheitorlessa
Release bot
authored andcommitted
fix(ci): new artifact path, sed gnu/linux syntax, and pypi test
1 parent 6bdb8a6 commit c565d48

8 files changed

+116
-100
lines changed

.github/workflows/on_release_notes.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
workflow_dispatch:
3232
inputs:
3333
version_to_publish:
34-
description: "Version to be released in PyPi, Docs, and Lambda Layer, e.g. v2.0.0, v2.0.0.a0 (pre-release)"
34+
description: "Version to be released in PyPi, Docs, and Lambda Layer, e.g. v2.0.0, v2.0.0a0 (pre-release)"
3535
default: v2.0.0
3636
required: true
3737
skip_pypi:
@@ -51,7 +51,7 @@ on:
5151
type: boolean
5252
required: false
5353
pre_release:
54-
description: "Publishes documentation using a pre-release tag (v2.0.0.a0). You are still responsible for passing a pre-release version tag to the workflow."
54+
description: "Publishes documentation using a pre-release tag (v2.0.0a0). You are still responsible for passing a pre-release version tag to the workflow."
5555
default: false
5656
type: boolean
5757
required: false
@@ -95,6 +95,8 @@ jobs:
9595
- name: Build python package and wheel
9696
if: ${{ !inputs.skip_pypi }}
9797
run: poetry build
98+
# NOTE: TestPyPi is undergoing a CDN migration https://status.python.org/#
99+
# re-enable for the next release, when degraded status changes
98100
# - name: Upload to PyPi test
99101
# if: ${{ !inputs.skip_pypi }}
100102
# run: make release-test

.github/workflows/publish_v2_layer.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,21 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
latest_published_version:
12-
description: "Latest PyPi published version to rebuild latest docs for, e.g. 2.0.0, v2.0.0.a0 (pre-release)"
12+
description: "Latest PyPi published version to rebuild latest docs for, e.g. 2.0.0, 2.0.0.a1 (pre-release)"
1313
required: true
1414
pre_release:
15-
description: "Publishes documentation using a pre-release tag (v2.0.0.a0)."
15+
description: "Publishes documentation using a pre-release tag (2.0.0.a1)."
1616
default: false
1717
type: boolean
1818
required: false
19-
test_role:
20-
type: string
21-
description: "Test IAM Role ARN"
22-
required: false
2319
workflow_call:
2420
inputs:
2521
latest_published_version:
2622
type: string
27-
description: "Latest PyPi published version to rebuild latest docs for, e.g. 2.0.0, v2.0.0.a0 (pre-release)"
23+
description: "Latest PyPi published version to rebuild latest docs for, e.g. 2.0.0, 2.0.0.a1 (pre-release)"
2824
required: true
2925
pre_release:
30-
description: "Publishes documentation using a pre-release tag (v2.0.0.a0)."
26+
description: "Publishes documentation using a pre-release tag (2.0.0.a1)."
3127
default: false
3228
type: boolean
3329
required: false
@@ -82,7 +78,7 @@ jobs:
8278
name: cdk-layer-artefact
8379
path: layer/cdk.out.zip
8480

85-
deploy-beta:
81+
beta:
8682
needs: build-layer
8783
uses: ./.github/workflows/reusable_deploy_v2_layer_stack.yml
8884
secrets: inherit
@@ -92,8 +88,8 @@ jobs:
9288
environment: "layer-beta"
9389
latest_published_version: ${{ inputs.latest_published_version }}
9490

95-
deploy-prod:
96-
needs: deploy-beta
91+
prod:
92+
needs: beta
9793
uses: ./.github/workflows/reusable_deploy_v2_layer_stack.yml
9894
secrets: inherit
9995
with:
@@ -102,7 +98,7 @@ jobs:
10298
environment: "layer-prod"
10399
latest_published_version: ${{ inputs.latest_published_version }}
104100

105-
deploy-sar-beta:
101+
sar-beta:
106102
needs: build-layer
107103
uses: ./.github/workflows/reusable_deploy_v2_sar.yml
108104
secrets: inherit
@@ -112,8 +108,8 @@ jobs:
112108
environment: "layer-beta"
113109
package-version: ${{ inputs.latest_published_version }}
114110

115-
deploy-sar-prod:
116-
needs: [build-layer, deploy-sar-beta]
111+
sar-prod:
112+
needs: [build-layer, sar-beta]
117113
uses: ./.github/workflows/reusable_deploy_v2_sar.yml
118114
secrets: inherit
119115
with:
@@ -139,7 +135,7 @@ jobs:
139135
echo DOCS_ALIAS="$DOCS_ALIAS" >> "$GITHUB_OUTPUT"
140136
141137
release-docs:
142-
needs: [deploy-prod, prepare_docs_alias]
138+
needs: [prod, prepare_docs_alias]
143139
permissions:
144140
contents: write
145141
pages: write

.github/workflows/reusable_deploy_v2_layer_stack.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,20 @@ jobs:
105105
- name: Store latest Layer ARN
106106
if: ${{ inputs.stage == 'PROD' }}
107107
run: |
108-
jq -c '.LayerV2Stack.VersionArn' cdk-outputs.json > cdk-layer-stack-${{ matrix.region }}-layer-version.txt
109-
jq -c '.LayerV2Stack.Arm64VersionArn' cdk-outputs.json >> cdk-layer-stack-${{ matrix.region }}-layer-version.txt
110-
- name: CDK Deploy Canary
111-
run: cdk deploy --app cdk.out --context region=${{ matrix.region}} --parameters DeployStage="${{ inputs.stage }}" 'CanaryV2Stack' --require-approval never --verbose
108+
mkdir cdk-layer-stack
109+
jq -r -c '.LayerV2Stack.LatestLayerArn' cdk-outputs.json > cdk-layer-stack/${{ matrix.region }}-layer-version.txt
110+
jq -r -c '.LayerV2Stack.LatestLayerArm64Arn' cdk-outputs.json >> cdk-layer-stack/${{ matrix.region }}-layer-version.txt
111+
cat cdk-layer-stack/${{ matrix.region }}-layer-version.txt
112112
- name: Save Layer ARN artifact
113+
if: ${{ inputs.stage == 'PROD' }}
113114
uses: actions/upload-artifact@v3
114115
with:
115116
name: cdk-layer-stack
116-
path: cdk-layer-stack*
117+
path: ./layer/cdk-layer-stack/* # NOTE: upload-artifact does not inherit working-directory setting.
118+
if-no-files-found: error
119+
retention-days: 1
120+
- name: CDK Deploy Canary
121+
run: cdk deploy --app cdk.out --context region=${{ matrix.region}} --parameters DeployStage="${{ inputs.stage }}" 'CanaryV2Stack' --require-approval never --verbose
117122

118123
update_v2_layer_arn_docs:
119124
needs: deploy-cdk-stack

.github/workflows/reusable_deploy_v2_sar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ jobs:
8484
if: ${{ matrix.architecture == 'arm64' }}
8585
run: echo SAR_NAME="${SAR_NAME}-arm64" >> "$GITHUB_ENV"
8686
- name: Normalize semantic version
87-
id: semantic-version # v2.0.0.a0 -> v2.0.0-a0
87+
id: semantic-version # v2.0.0a0 -> v2.0.0-a0
8888
env:
8989
VERSION: ${{ inputs.package-version }}
9090
run: |
91-
VERSION="${VERSION/.a/-a}"
91+
VERSION="${VERSION/a/-a}"
9292
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
9393
- name: Prepare SAR App
9494
env:

.github/workflows/reusable_update_v2_layer_arn_docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ jobs:
3737
uses: actions/download-artifact@v3
3838
with:
3939
name: cdk-layer-stack
40-
path: cdk-layer-stack
40+
path: cdk-layer-stack/
4141
- name: Replace layer versions in documentation
42-
run: ./layer/scripts/update_layer_arn.sh cdk-layer-stack
42+
run: |
43+
ls -la cdk-layer-stack/
44+
./layer/scripts/update_layer_arn.sh cdk-layer-stack
4345
- name: Update documentation in trunk
4446
run: |
4547
HAS_CHANGE=$(git status --porcelain)

CHANGELOG.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@
77
## Bug Fixes
88

99
* lock dependencies
10-
* mypy errors
1110
* lint files
11+
* mypy errors
12+
* **ci:** sed in-place syntax for GNU/Linux; improve debugging
13+
* **ci:** layer artifact path
14+
* **ci:** fix artifact path
15+
* **ci:** typo
16+
* **ci:** SAR tagging schema
17+
* **ci:** temporarly remove pypi test deployment
1218
* **ci:** secret and OIDC inheritance in nested children workflow
19+
* **ci:** force fail if layer artifact cannot be uploaded
20+
* **ci:** [artifact-debug] shift artifact upload up
21+
* **ci:** [artifact-debug] upload-artefact ignores working-directory
1322
* **ci:** workflow should use npx for CDK CLI
1423

1524
## Code Refactoring
@@ -42,16 +51,21 @@
4251

4352
## Maintenance
4453

45-
* merge v2 branch
4654
* bump pyproject version to 2.0
47-
* **ci:** remove v1 workflows ([#1617](https://github.com/awslabs/aws-lambda-powertools-python/issues/1617))
55+
* update v2 layer ARN on documentation
56+
* merge v2 branch
57+
* **ci:** reinstate test.pypi before public launch
58+
* **ci:** clarified pre-release tags
4859
* **ci:** migrate E2E tests to CDK CLI and off Docker ([#1501](https://github.com/awslabs/aws-lambda-powertools-python/issues/1501))
60+
* **ci:** remove v1 workflows ([#1617](https://github.com/awslabs/aws-lambda-powertools-python/issues/1617))
61+
* **ci:** revert reinstate test.pypi before public launch
4962
* **core:** expose modules in the Top-level package ([#1517](https://github.com/awslabs/aws-lambda-powertools-python/issues/1517))
5063
* **dep:** add cfn-lint as a dev dependency; pre-commit ([#1612](https://github.com/awslabs/aws-lambda-powertools-python/issues/1612))
51-
* **deps:** remove email-validator; use Str over EmailStr in SES model ([#1608](https://github.com/awslabs/aws-lambda-powertools-python/issues/1608))
5264
* **deps:** bump release-drafter/release-drafter from 5.21.0 to 5.21.1 ([#1611](https://github.com/awslabs/aws-lambda-powertools-python/issues/1611))
5365
* **deps:** lock importlib to 4.x
66+
* **deps:** remove email-validator; use Str over EmailStr in SES model ([#1608](https://github.com/awslabs/aws-lambda-powertools-python/issues/1608))
5467
* **deps-dev:** bump mypy-boto3-s3 from 1.24.76 to 1.24.94 ([#1622](https://github.com/awslabs/aws-lambda-powertools-python/issues/1622))
68+
* **deps-dev:** bump aws-cdk-lib from 2.46.0 to 2.47.0 ([#1629](https://github.com/awslabs/aws-lambda-powertools-python/issues/1629))
5569
* **layer:** bump to 1.31.1 (v39)
5670

5771

0 commit comments

Comments
 (0)