Skip to content

Commit cff88d1

Browse files
Merge remote-tracking branch 'origin/main' into jetty-12.1-no-servlets
2 parents 66ec265 + 2297f3e commit cff88d1

File tree

20 files changed

+236
-154
lines changed

20 files changed

+236
-154
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"functions-framework-api":"1.1.4","invoker":"1.4.1","function-maven-plugin":"0.11.1"}
1+
{"functions-framework-api":"1.1.4","invoker":"1.4.3","function-maven-plugin":"0.11.2"}

.github/workflows/buildpack-integration-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ on:
1414
permissions: read-all
1515

1616
jobs:
17-
java11-buildpack-test:
17+
java21-buildpack-test:
1818
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@main
1919
with:
2020
http-builder-source: '/tmp/tests/conformance'
2121
http-builder-target: 'com.google.cloud.functions.conformance.HttpConformanceFunction'
2222
cloudevent-builder-source: '/tmp/tests/conformance'
2323
cloudevent-builder-target: 'com.google.cloud.functions.conformance.CloudEventsConformanceFunction'
2424
prerun: 'invoker/conformance/prerun.sh'
25-
builder-runtime: 'java11'
26-
builder-runtime-version: '11'
25+
builder-runtime: 'java21'
26+
builder-runtime-version: '21'
2727
builder-url: gcr.io/serverless-runtimes/google-22-full/builder/java:latest
2828
java17-buildpack-test:
2929
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@main

.github/workflows/codeql.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ jobs:
1414
analyze:
1515
name: Analyze
1616
runs-on: ubuntu-latest
17-
17+
1818
permissions:
1919
actions: read
2020
contents: read
2121
security-events: write
2222

2323
strategy:
2424
fail-fast: false
25-
matrix:
25+
matrix:
2626
# Autobuild each of these seperate maven projects
2727
working-directory: ['invoker', 'functions-framework-api', 'function-maven-plugin']
2828

2929
steps:
3030
- name: Harden Runner
31-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
31+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
3232
with:
3333
disable-sudo: true
3434
egress-policy: block
@@ -37,16 +37,17 @@ jobs:
3737
github.com:443
3838
objects.githubusercontent.com:443
3939
proxy.golang.org:443
40+
release-assets.githubusercontent.com:443
4041
repo.maven.apache.org:443
4142
storage.googleapis.com:443
4243
uploads.github.com:443
43-
44+
4445
- name: Checkout repository
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4647

4748
# Initializes the CodeQL tools for scanning.
4849
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
50+
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
5051
with:
5152
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
5253
languages: java
@@ -57,15 +58,13 @@ jobs:
5758
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5859
# queries: security-extended,security-and-quality
5960

60-
61-
6261
- name: Build
6362
run: |
6463
(cd functions-framework-api/ && mvn install)
6564
(cd invoker/ && mvn clean install)
6665
(cd function-maven-plugin && mvn install)
6766
6867
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
68+
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
7069
with:
7170
category: ${{ matrix.working-directory }}

.github/workflows/conformance.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ jobs:
1414
strategy:
1515
matrix:
1616
java: [
17-
11.x,
17+
17.x,
18+
21.x
1819
]
1920
steps:
2021
- name: Harden Runner
21-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
22+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2223
with:
2324
disable-sudo: true
2425
egress-policy: block
@@ -27,21 +28,22 @@ jobs:
2728
github.com:443
2829
objects.githubusercontent.com:443
2930
proxy.golang.org:443
31+
release-assets.githubusercontent.com:443
3032
repo.maven.apache.org:443
3133
storage.googleapis.com:443
3234
33-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3436

3537
- name: Set up JDK ${{ matrix.java }}
36-
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
38+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3739
with:
3840
java-version: ${{ matrix.java }}
3941
distribution: temurin
4042

4143
- name: Setup Go
42-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
44+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
4345
with:
44-
go-version: '1.21'
46+
go-version: '1.25'
4547

4648
- name: Build API with Maven
4749
run: (cd functions-framework-api/ && mvn install)
@@ -53,15 +55,15 @@ jobs:
5355
run: (cd function-maven-plugin/ && mvn install)
5456

5557
- name: Run HTTP conformance tests
56-
uses: GoogleCloudPlatform/functions-framework-conformance/action@1041a97e93a463d9efb17dda821f3ddc0bf0024f # main
58+
uses: GoogleCloudPlatform/functions-framework-conformance/action@6ae50bd9db5ed980c5ceff3cf7b200f705be94fc # main
5759
with:
5860
functionType: 'http'
5961
useBuildpacks: false
6062
cmd: "'mvn -f invoker/conformance/pom.xml function:run -Drun.functionTarget=com.google.cloud.functions.conformance.HttpConformanceFunction'"
6163
startDelay: 10
6264

6365
- name: Run Typed conformance tests
64-
uses: GoogleCloudPlatform/functions-framework-conformance/action@1041a97e93a463d9efb17dda821f3ddc0bf0024f # main
66+
uses: GoogleCloudPlatform/functions-framework-conformance/action@6ae50bd9db5ed980c5ceff3cf7b200f705be94fc # main
6567
with:
6668
functionType: 'http'
6769
declarativeType: 'typed'
@@ -70,7 +72,7 @@ jobs:
7072
startDelay: 10
7173

7274
- name: Run background event conformance tests
73-
uses: GoogleCloudPlatform/functions-framework-conformance/action@1041a97e93a463d9efb17dda821f3ddc0bf0024f # main
75+
uses: GoogleCloudPlatform/functions-framework-conformance/action@6ae50bd9db5ed980c5ceff3cf7b200f705be94fc # main
7476
with:
7577
functionType: 'legacyevent'
7678
useBuildpacks: false
@@ -79,7 +81,7 @@ jobs:
7981
startDelay: 10
8082

8183
- name: Run cloudevent conformance tests
82-
uses: GoogleCloudPlatform/functions-framework-conformance/action@1041a97e93a463d9efb17dda821f3ddc0bf0024f # main
84+
uses: GoogleCloudPlatform/functions-framework-conformance/action@6ae50bd9db5ed980c5ceff3cf7b200f705be94fc # main
8385
with:
8486
functionType: 'cloudevent'
8587
useBuildpacks: false
@@ -88,10 +90,10 @@ jobs:
8890
startDelay: 10
8991

9092
- name: Run HTTP concurrency conformance tests
91-
uses: GoogleCloudPlatform/functions-framework-conformance/action@1041a97e93a463d9efb17dda821f3ddc0bf0024f # main
93+
uses: GoogleCloudPlatform/functions-framework-conformance/action@6ae50bd9db5ed980c5ceff3cf7b200f705be94fc # main
9294
with:
9395
functionType: 'http'
9496
useBuildpacks: false
9597
validateConcurrency: true
9698
cmd: "'mvn -f invoker/conformance/pom.xml function:run -Drun.functionTarget=com.google.cloud.functions.conformance.ConcurrentHttpConformanceFunction'"
97-
startDelay: 10
99+
startDelay: 10

.github/workflows/lint.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Harden Runner
16-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
16+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1717
with:
1818
disable-sudo: true
1919
egress-policy: block
2020
allowed-endpoints: >
2121
github.com:443
2222
repo.maven.apache.org:443
23-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2424
- name: Set up JDK
25-
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
25+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
2626
with:
27-
java-version: 11.x
27+
java-version: 17.x
2828
distribution: temurin
2929
- name: Build API with Maven
3030
run: (cd functions-framework-api/ && mvn install)
@@ -38,15 +38,15 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- name: Harden Runner
41-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
41+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
4242
with:
4343
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
4444

45-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # v2 minimum required
45+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 # v2 minimum required
4646
- name: Set up JDK
47-
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
47+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
4848
with:
49-
java-version: 17.x
49+
java-version: 21.x
5050
distribution: temurin
5151
- name: Run formatter
5252
id: formatter

.github/workflows/scorecard.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Harden Runner
29-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
29+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
3030
with:
3131
disable-sudo: true
3232
egress-policy: block
@@ -43,14 +43,14 @@ jobs:
4343
www.bestpractices.dev:443
4444
*.sigstore.dev:443
4545
*.github.com:443
46-
46+
4747
- name: "Checkout code"
48-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4949
with:
5050
persist-credentials: false
5151

5252
- name: "Run analysis"
53-
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
53+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
5454
with:
5555
results_file: results.sarif
5656
results_format: sarif
@@ -62,6 +62,6 @@ jobs:
6262

6363
# Upload the results to GitHub's code scanning dashboard.
6464
- name: "Upload to code-scanning"
65-
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
65+
uses: github/codeql-action/upload-sarif@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
6666
with:
6767
sarif_file: results.sarif

.github/workflows/unit.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ jobs:
1313
strategy:
1414
matrix:
1515
java: [
16-
11.x,
1716
17.x,
18-
21-ea
17+
21.x
1918
]
2019
steps:
2120
- name: Harden Runner
22-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
21+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2322
with:
2423
disable-sudo: true
2524
egress-policy: block
@@ -28,13 +27,13 @@ jobs:
2827
repo.maven.apache.org:443
2928
api.adoptium.net:443
3029
*.githubusercontent.com:443
31-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3231
- name: Set up JDK ${{ matrix.java }}
33-
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
32+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3433
with:
3534
java-version: ${{ matrix.java }}
3635
distribution: temurin
3736
- name: Build with Maven
3837
run: (cd functions-framework-api/ && mvn install)
3938
- name: Test
40-
run: (cd invoker/ && mvn test)
39+
run: (cd invoker/ && mvn test)

.kokoro/release.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ before_action {
66
keystore_config_id: 75669
77
keyname: "functions-framework-java-release-bot-sonatype-password"
88
}
9+
keystore_resource {
10+
keystore_config_id: 75669
11+
keyname: "functions-framework-release-sonatype-central-portal-username"
12+
}
13+
keystore_resource {
14+
keystore_config_id: 75669
15+
keyname: "functions-framework-release-sonatype-central-portal-password"
16+
}
917
keystore_resource {
1018
keystore_config_id: 70247
1119
keyname: "maven-gpg-pubkeyring"

.kokoro/release.sh

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@
33
# Stop execution when any command fails.
44
set -e
55

6-
# update the Maven version to 3.6.3
6+
# update the Maven version to 3.9.11
77
pushd /usr/local
8-
wget https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.tar.gz
9-
tar -xvzf apache-maven-3.6.3-bin.tar.gz apache-maven-3.6.3
8+
wget https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.tar.gz
9+
tar -xvzf apache-maven-3.9.11-bin.tar.gz apache-maven-3.9.11
1010
rm -f /usr/local/apache-maven
11-
ln -s /usr/local/apache-maven-3.6.3 /usr/local/apache-maven
12-
rm apache-maven-3.6.3-bin.tar.gz
11+
ln -s /usr/local/apache-maven-3.9.11 /usr/local/apache-maven
12+
rm apache-maven-3.9.11-bin.tar.gz
1313
popd
1414

1515

1616
# Get secrets from keystore and set and environment variables.
1717
setup_environment_secrets() {
1818
export GPG_TTY=$(tty)
19-
export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/75669_functions-framework-java-release-bot-sonatype-password | cut -f1 -d':')
20-
export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/75669_functions-framework-java-release-bot-sonatype-password | cut -f2 -d':')
2119
export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase)
2220

2321
# Add the key ring files to $GNUPGHOME to verify the GPG credentials.
@@ -42,14 +40,9 @@ create_settings_xml_file() {
4240
</profiles>
4341
<servers>
4442
<server>
45-
<id>sonatype-nexus-staging</id>
46-
<username>${SONATYPE_USERNAME}</username>
47-
<password>${SONATYPE_PASSWORD}</password>
48-
</server>
49-
<server>
50-
<id>sonatype-nexus-snapshots</id>
51-
<username>${SONATYPE_USERNAME}</username>
52-
<password>${SONATYPE_PASSWORD}</password>
43+
<id>sonatype-central-portal</id>
44+
<username>$(cat "${KOKORO_KEYSTORE_DIR}/75669_functions-framework-release-sonatype-central-portal-username")</username>
45+
<password>$(cat "${KOKORO_KEYSTORE_DIR}/75669_functions-framework-release-sonatype-central-portal-password")</password>
5346
</server>
5447
</servers>
5548
</settings>" > $1
@@ -70,10 +63,15 @@ else
7063
fi
7164
echo "pwd=$(pwd)"
7265

73-
# Make sure `JAVA_HOME` is set and using jdk11.
74-
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
66+
# Make sure `JAVA_HOME` is set and using jdk17.
67+
JDK_VERSION=17
68+
apt-get update
69+
# Install new JDK version
70+
apt-get install -y openjdk-"${JDK_VERSION}"-jdk
71+
export JAVA_HOME="$(update-java-alternatives -l | grep "1.${JDK_VERSION}" | head -n 1 | tr -s " " | cut -d " " -f 3)"
7572
echo "JAVA_HOME=$JAVA_HOME"
76-
mvn clean deploy -B \
73+
74+
mvn clean deploy -B -q \
7775
-P sonatype-oss-release \
7876
--settings=../settings.xml \
7977
-Dgpg.executable=gpg \

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ This project is divided into multiple packages, primarily:
3838
- `function-maven-plugin` - The Maven plugin for building functions
3939
- `conformance` - A set of functions used for conformance testing
4040

41-
### Setup JDK 11 / 17
41+
### Setup JDK 17 / 21
4242

43-
Install JDK 11 and 17. One way to install these is through [SDK man](https://sdkman.io/).
43+
Install JDK 17 and 21. One way to install these is through [SDK man](https://sdkman.io/).
4444

4545
```sh
46-
sdk install java 11.0.2-open
4746
sdk install java 17-open
47+
sdk install java 21-open
4848
sdk use java 17-open
49-
sdk use java 11.0.2-open
49+
sdk use java 21-open
5050
```
5151

5252
Verify Java version with:

0 commit comments

Comments
 (0)