Skip to content

Commit 54c9f18

Browse files
committed
fixes for PR
1 parent fad8a1d commit 54c9f18

File tree

7 files changed

+64
-45
lines changed

7 files changed

+64
-45
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@ body:
6565
- "provided.al2023"
6666
validations:
6767
required: true
68-
- type: dropdown
69-
id: packaging
70-
attributes:
71-
label: Packaging format used
72-
options:
73-
- Lambda Layers
74-
- Serverless Application Repository (SAR) App
75-
- PyPi
76-
multiple: true
77-
validations:
78-
required: true
7968
- type: textarea
8069
id: logs
8170
attributes:

.github/actions/version/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ description: |
1313
uses: .github/actions/version
1414
with:
1515
new_version: 1.20.0
16+
snapshot: 'false'
1617
```
1718
1819
inputs:
@@ -44,7 +45,7 @@ runs:
4445
run: |
4546
mvn versions:set -DnewVersion=${{ inputs.new_version }} -DprocessAllModules=true -DallowSnapshots=true
4647
47-
- id: asset_veersion
48+
- id: asset_version
4849
name: Replace version for assets
4950
if: ${{ inputs.snapshot == 'true' }}
5051
env:

.github/workflows/check-build.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ on:
33
pull_request:
44
paths:
55
- 'powertools-batch/**'
6-
- 'powertools-cloudformation/**'
76
- 'powertools-core/**'
7+
- 'powertools-cloudformation/**'
8+
- 'powertools-common/**'
89
- 'powertools-e2e-tests/**'
910
- 'powertools-idempotency/**'
1011
- 'powertools-large-messages/**'
@@ -13,7 +14,7 @@ on:
1314
- 'powertools-parameters/**'
1415
- 'powertools-serialization/**'
1516
- 'powertools-sqs/**'
16-
- 'powertools-test-suite/**'
17+
- 'powertools-tracing/**'
1718
- 'powertools-tracing/**'
1819
- 'powertools-validation/**'
1920
- 'examples/**'
@@ -23,10 +24,12 @@ on:
2324
push:
2425
branches:
2526
- main
26-
paths:
27+
- v2
28+
paths: # add other modules when there are under e2e tests
2729
- 'powertools-batch/**'
28-
- 'powertools-cloudformation/**'
2930
- 'powertools-core/**'
31+
- 'powertools-cloudformation/**'
32+
- 'powertools-common/**'
3033
- 'powertools-e2e-tests/**'
3134
- 'powertools-idempotency/**'
3235
- 'powertools-large-messages/**'
@@ -35,11 +38,11 @@ on:
3538
- 'powertools-parameters/**'
3639
- 'powertools-serialization/**'
3740
- 'powertools-sqs/**'
38-
- 'powertools-test-suite/**'
41+
- 'powertools-tracing/**'
3942
- 'powertools-tracing/**'
4043
- 'powertools-validation/**'
41-
- 'examples/**'
4244
- 'pom.xml'
45+
- 'examples/**'
4346
- 'examples/pom.xml'
4447
- '.github/workflows/**'
4548

@@ -51,7 +54,7 @@ jobs:
5154
runs-on: ubuntu-latest
5255
strategy:
5356
matrix:
54-
java_version:
57+
java:
5558
- 8
5659
- 11
5760
- 17
@@ -64,9 +67,10 @@ jobs:
6467
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
6568
with:
6669
distribution: corretto
67-
java-version: ${{ matrix.java_version }}
70+
java-version: ${{ matrix.java }}
6871
cache: maven
6972
- id: build-maven
7073
name: Build (Maven)
74+
if: ${{ matrix.java != '8' }}
7175
run: |
7276
mvn -B install --file pom.xml

.github/workflows/check-e2e.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,27 @@ on:
44
push:
55
branches:
66
- main
7+
- v2
78
paths: # add other modules when there are under e2e tests
8-
- 'powertools-e2e-tests/**'
99
- 'powertools-batch/**'
1010
- 'powertools-core/**'
11+
- 'powertools-cloudformation/**'
1112
- 'powertools-common/**'
13+
- 'powertools-e2e-tests/**'
1214
- 'powertools-idempotency/**'
13-
- 'powertools-large-message/**'
15+
- 'powertools-large-messages/**'
1416
- 'powertools-logging/**'
1517
- 'powertools-metrics/**'
1618
- 'powertools-parameters/**'
1719
- 'powertools-serialization/**'
20+
- 'powertools-sqs/**'
21+
- 'powertools-tracing/**'
1822
- 'powertools-tracing/**'
23+
- 'powertools-validation/**'
1924
- 'pom.xml'
2025

2126
name: E2E Tests
22-
run-name:
27+
run-name: E2E Tests - ${{ github.event_name }}
2328

2429
permissions:
2530
contents: read
@@ -32,9 +37,12 @@ jobs:
3237
id-token: write
3338
environment: E2E
3439
strategy:
35-
max-parallel: 4
40+
max-parallel: 3
3641
matrix:
37-
java: [ 8, 11, 17, 21 ]
42+
java:
43+
- 11
44+
- 17
45+
- 21
3846
steps:
3947
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4048
- name: Setup java

.github/workflows/check-spotbugs.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ on:
22
pull_request:
33
branches:
44
- main
5+
- v2
56
paths:
6-
- 'powertools-cloudformation/**'
7+
- 'powertools-batch/**'
78
- 'powertools-core/**'
8-
- 'powertools-serialization/**'
9+
- 'powertools-cloudformation/**'
10+
- 'powertools-common/**'
11+
- 'powertools-e2e-tests/**'
12+
- 'powertools-idempotency/**'
13+
- 'powertools-large-messages/**'
914
- 'powertools-logging/**'
15+
- 'powertools-metrics/**'
16+
- 'powertools-parameters/**'
17+
- 'powertools-serialization/**'
1018
- 'powertools-sqs/**'
1119
- 'powertools-tracing/**'
20+
- 'powertools-tracing/**'
1221
- 'powertools-validation/**'
13-
- 'powertools-parameters/**'
14-
- 'powertools-idempotency/**'
15-
- 'powertools-metrics/**'
1622
- 'powertools-test-suite/**'
1723
- 'pom.xml'
1824
- '.github/workflows/**'

.github/workflows/release.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
type: boolean
99
description: Create snapshot release
1010
default: true
11+
is_v2_build:
12+
type: boolean
13+
description: Create a v2 build
14+
default: false
1115
skip_checks:
1216
type: boolean
1317
description: Skip quality checks
@@ -16,9 +20,9 @@ on:
1620
type: boolean
1721
description: Ship publish to Maven Central
1822
default: false
19-
conintue_on_error:
23+
continue_on_error:
2024
type: boolean
21-
description:
25+
description: Continue to build if there's an error in quality checks
2226
default: false
2327

2428
name: Release
@@ -32,7 +36,7 @@ env:
3236
RELEASE_TAG_VERSION: ${{ inputs.version }}
3337

3438
jobs:
35-
process_version:
39+
setup:
3640
runs-on: ubuntu-latest
3741
outputs:
3842
version: ${{ format('{0}{1}', steps.version_release.outputs.version, steps.version_snapshot.outputs.version) }}
@@ -47,11 +51,21 @@ jobs:
4751
name: Version
4852
run: |
4953
echo version="${{ inputs.version }}" >> "$GITHUB_OUTPUT"
54+
- id: build_matrix_v1
55+
name: Build matrix (v1)
56+
if: ${{ inputs.is_v2_build == false }}
57+
run: |
58+
echo build_matrix='["8", "11", "17", "21"]' >> "$GITHUB_OUTPUT"
59+
- id: build_matrix_v2
60+
name: Build matrix (v2)
61+
if: ${{ inputs.is_v2_build == true }}
62+
run: |
63+
echo build_matrix='["11", "17", "21"]'>> "$GITHUB_OUTPUT"
5064
5165
version_seal:
5266
runs-on: ubuntu-latest
5367
needs:
54-
- process_version
68+
- setup
5569
outputs:
5670
source_hash: ${{ steps.upload_source.outputs.artifact-digest }}
5771
steps:
@@ -62,7 +76,7 @@ jobs:
6276
name: version
6377
uses: ./.github/actions/version
6478
with:
65-
new_version: ${{ needs.process_version.outputs.version }}
79+
new_version: ${{ needs.setup.outputs.version }}
6680
snapshot: ${{ inputs.snapshot}}
6781
- id: upload_source
6882
name: Upload artifacts
@@ -98,10 +112,10 @@ jobs:
98112
# non-exhuastive, but gives a fair indication if the final build will succeed, tests will run when we build later
99113
- name: Run unit tests
100114
run: mvn -B test --file pom.xml
101-
continue-on-error: ${{ inputs.conintue_on_error }}
115+
continue-on-error: ${{ inputs.continue_on_error }}
102116
- name: Run Spotbugs
103-
run: mvn -Pbuild-with-spotbugs -B install --file pom.xml -DskipTests -Dmaven.javadoc.skip=true -Dspotbugs.failOnError=${{ !inputs.conintue_on_error }}
104-
continue-on-error: ${{ inputs.conintue_on_error }}
117+
run: mvn -Pbuild-with-spotbugs -B install --file pom.xml -DskipTests -Dmaven.javadoc.skip=true -Dspotbugs.failOnError=${{ !inputs.continue_on_error }}
118+
continue-on-error: ${{ inputs.continue_on_error }}
105119
- uses: pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa # v2.0.0
106120
with:
107121
rulesets: '.github/pmd-ruleset.xml'
@@ -111,15 +125,12 @@ jobs:
111125
build:
112126
runs-on: ubuntu-latest
113127
needs:
128+
- setup
114129
- quality
115130
- version_seal
116131
strategy:
117132
matrix:
118-
java_version:
119-
- 8
120-
- 11
121-
- 17
122-
- 21
133+
java: ${{ fromJson(needs.setup.outputs.build_matrix) }}
123134
steps:
124135
- id: download_source
125136
name: Download artifacts
@@ -130,7 +141,7 @@ jobs:
130141
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
131142
with:
132143
distribution: corretto
133-
java-version: ${{ matrix.java_version }}
144+
java-version: ${{ matrix.java }}
134145
cache: maven
135146
- id: build-maven
136147
name: Build (Maven)

.github/workflows/security-branch-protections.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
permissions:
2323
contents: write
2424
environment: Security
25-
if: github.repository == 'aws-powertools/powertools-lambda-java'
25+
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' }}
2626
strategy:
2727
matrix:
2828
# List of branches we want to monitor for protection changes

0 commit comments

Comments
 (0)