Skip to content

Commit ee5b6fc

Browse files
Update release
1 parent 6a6db03 commit ee5b6fc

13 files changed

+271
-167
lines changed

.github/workflows/assign-issue-to-project.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/assign-issue.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) 2021, 2024 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Assign Issue to Project
17+
18+
on:
19+
issues:
20+
types: [opened, reopened]
21+
env:
22+
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
23+
24+
25+
jobs:
26+
Assign-Issue-To-Backlog:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out repository code
30+
uses: actions/checkout@v4
31+
- run: etc/scripts/assign-issue.sh $GITHUB_REPOSITORY ${{ github.event.issue.number }} Backlog Triage

.github/workflows/backport-issues.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#
2+
# Copyright (c) 2022, 2024 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Create Backport Issues
17+
18+
on:
19+
workflow_dispatch:
20+
inputs:
21+
issue:
22+
description: 'Issue number'
23+
required: true
24+
version:
25+
description: 'Helidon version this issue was reported for'
26+
required: true
27+
type: choice
28+
options:
29+
- 2.x
30+
- 3.x
31+
- 4.x
32+
default: '2.x'
33+
target-2:
34+
type: boolean
35+
description: 'Port to 2.x?'
36+
default: false
37+
target-3:
38+
type: boolean
39+
description: 'Port to 3.x?'
40+
default: true
41+
target-4:
42+
type: boolean
43+
description: 'Port to 4.x?'
44+
default: true
45+
46+
env:
47+
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
48+
49+
50+
jobs:
51+
Issue-Backport:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Check out repository code
55+
uses: actions/checkout@v4
56+
- run: etc/scripts/backport-issues.sh $GITHUB_REPOSITORY ${{ github.event.inputs.issue }} ${{ github.event.inputs.version }} ${{ github.event.inputs.target-2 }} ${{ github.event.inputs.target-3 }} ${{ github.event.inputs.target-4 }}

.github/workflows/create-backport-issues.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/pr-merge.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
#
2-
# Workflow that runs on any push to main.
2+
# Copyright (c) 2024 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
315

416
name: "Post PR Merge"
517

@@ -18,5 +30,5 @@ jobs:
1830
uses: ./.github/workflows/validate.yml
1931
snapshot:
2032
needs: validate
21-
uses: ./.github/workflows/snapshotrelease.yaml
33+
uses: ./.github/workflows/snapshot.yaml
2234
secrets: inherit

.github/workflows/release.yaml

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,74 @@
1-
# Notes
2-
# - cannot run on Windows, as we use shell scripts
1+
#
2+
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
315

416
name: "Release"
517

618
on:
719
push:
8-
branches:
9-
- 'release-*'
20+
branches: [ 'release-*' ]
21+
1022
env:
1123
JAVA_VERSION: '21'
1224
JAVA_DISTRO: 'oracle'
13-
MAVEN_HTTP_ARGS: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3'
25+
MAVEN_ARGS: |
26+
-B -e
27+
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
28+
-Dmaven.wagon.http.retryHandler.count=3
29+
-Djdk.toolchain.version=${JAVA_VERSION}
1430
1531
concurrency:
1632
group: release-${{ github.workflow }}-${{ github.ref }}
1733
cancel-in-progress: true
1834

1935
jobs:
20-
copyright:
21-
timeout-minutes: 10
36+
create-tag:
2237
runs-on: ubuntu-20.04
38+
environment: release
39+
outputs:
40+
tag: ${{ steps.create-tag.outputs.tag }}
2341
steps:
2442
- uses: actions/checkout@v4
2543
with:
26-
fetch-depth: 0
27-
- name: Set up JDK ${{ env.JAVA_VERSION }}
44+
token: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
45+
- name: Set up JDK
2846
uses: actions/[email protected]
2947
with:
3048
distribution: ${{ env.JAVA_DISTRO }}
3149
java-version: ${{ env.JAVA_VERSION }}
32-
cache: maven
33-
- name: Copyright
34-
run: etc/scripts/copyright.sh
50+
- id: create-tag
51+
run: ./etc/scripts/release.sh create_tag >> "${GITHUB_OUTPUT}"
52+
validate:
53+
needs: create-tag
54+
uses: ./.github/workflows/validate.yml
55+
with:
56+
ref: ${{ needs.create-tag.outputs.tag }}
3557
release:
36-
timeout-minutes: 60
58+
needs: [ create-tag, validate ]
3759
runs-on: ubuntu-20.04
60+
timeout-minutes: 30
3861
environment: release
3962
steps:
4063
- uses: actions/checkout@v4
4164
with:
42-
token: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
43-
fetch-depth: '0'
44-
- name: Set up JDK ${{ env.JAVA_VERSION }}
45-
uses: actions/[email protected]
65+
ref: ${{ needs.create-tag.outputs.tag }}
66+
- uses: ./.github/actions/common
4667
with:
47-
distribution: ${{ env.JAVA_DISTRO }}
48-
java-version: ${{ env.JAVA_VERSION }}
49-
cache: maven
50-
- name: Release
51-
env:
52-
GPG_PASSPHRASE: ${{ secrets.HELIDON_GPG_PASSPHRASE }}
53-
GPG_PRIVATE_KEY: ${{ secrets.HELIDON_GPG_PRIVATE_KEY }}
54-
GPG_PUBLIC_KEY: ${{ secrets.HELIDON_GPG_PUBLIC_KEY }}
68+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
69+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
5570
MAVEN_SETTINGS: ${{ secrets.MAVEN_SETTINGS }}
56-
RELEASE_WORKFLOW: "true"
57-
run: |
58-
git config user.email "[email protected]"
59-
git config user.name "Helidon Robot"
60-
etc/scripts/release.sh release_build
61-
- name: Upload Staged Artifacts
62-
uses: actions/upload-artifact@v4
63-
with:
64-
name: io-helidon-artifacts-${{ github.ref_name }}
65-
path: parent/target/nexus-staging/
66-
retention-days: 90
71+
build-cache: read-only
72+
artifact-name: io-helidon-artifacts-${{ github.ref_name }}
73+
artifact-path: target/nexus-staging/
74+
run: etc/scripts/release.sh release_build

.github/workflows/snapshotrelease.yaml renamed to .github/workflows/snapshot.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
# Perform a snapshot build and deploy to snapshot repository
2-
# Notes
3-
# - cannot run on Windows, as we use shell scripts
1+
#
2+
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
415

516
name: "Snapshot Release"
617

.mvn/cache-config.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@
7070
<include>tests/integration/packaging/**</include>
7171
</includes>
7272
</moduleSet>
73-
<moduleSet name="jpa">
74-
<includes>
75-
<include>tests/integration/packaging/**</include>
76-
</includes>
77-
</moduleSet>
7873
<moduleSet name="it">
7974
<includes>
8075
<include>tests/integration/**</include>
File renamed without changes.

etc/scripts/build-examples.sh

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# limitations under the License.
1616
#
1717

18-
# Build helidon examples, cloning the examples repository if needed
19-
2018
set -o pipefail || true # trace ERR through pipes
2119
set -o errtrace || true # trace ERR through commands and functions
2220
set -o errexit || true # exit the script if any statement returns a non-true return value
@@ -43,31 +41,35 @@ readonly SCRIPT_PATH
4341
WS_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; cd ../.. ; pwd -P)
4442
readonly WS_DIR
4543

46-
# If needed we clone the helidon-examples repo into a subdirectory of the helidon repository
47-
readonly HELIDON_EXAMPLES_PATH=${WS_DIR}/helidon-examples
44+
version() {
45+
awk 'BEGIN {FS="[<>]"} ; /<helidon.version>/ {print $3; exit 0}' "${1}"
46+
}
47+
48+
HELIDON_VERSION=$(version "${WS_DIR}/bom/pom.xml")
49+
readonly HELIDON_VERSION
50+
51+
# If needed we clone the helidon-examples repo
4852
if [ ! -d "${WS_DIR}/helidon-examples" ]; then
4953
echo "Cloning examples repository into ${WS_DIR}/helidon-examples"
5054
git clone --branch dev-4.x --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
51-
fi
5255

53-
version() {
54-
# shellcheck disable=SC2086
55-
mvn ${MAVEN_ARGS} -B -N -f "${1}" -Dexpression=helidon.version help:evaluate | grep -v '\[INFO\]'
56-
}
57-
58-
# Make sure the helidon version from the example repo aligns with this repository
59-
HELIDON_VERSION_IN_THIS_REPO=$(version "${WS_DIR}/pom.xml")
60-
readonly HELIDON_VERSION_IN_THIS_REPO
56+
# If in a tag, update the version on the fly
57+
if [ -n "$(git tag --points-at HEAD)" ] ; then
58+
export TMPDIR=/tmp # FIXME remove tmp hack
59+
"${WS_DIR}/helidon-examples"/etc/scripts/updatehelidonversion.sh "${HELIDON_VERSION}"
60+
fi
61+
fi
6162

6263
HELIDON_VERSION_IN_EXAMPLES=$(version "${WS_DIR}/helidon-examples/pom.xml")
6364
readonly HELIDON_VERSION_IN_EXAMPLES
6465

65-
if [ "${HELIDON_VERSION_IN_THIS_REPO}" != "${HELIDON_VERSION_IN_EXAMPLES}" ]; then
66+
# Make sure the helidon version from the example repo aligns with this repository
67+
if [ "${HELIDON_VERSION}" != "${HELIDON_VERSION_IN_EXAMPLES}" ]; then
6668
printf "The Helidon version in this repository (%s) does not match the Helidon version in %s (%s)\n" \
67-
"${HELIDON_VERSION_IN_THIS_REPO}" \
68-
"${HELIDON_EXAMPLES_PATH}" \
69+
"${HELIDON_VERSION}" \
70+
"${WS_DIR}/helidon-examples" \
6971
"${HELIDON_VERSION_IN_EXAMPLES}"
70-
exit 78
72+
exit 1
7173
fi
7274

7375
# shellcheck disable=SC2086

0 commit comments

Comments
 (0)