Skip to content

Commit ad3d095

Browse files
ShellCheck (helidon-io#9078)
- Add a new job to run shellcheck - Fix existing scripts to pass the validation - Remove unused scripts - Inline some scripts in validate.yaml - etc/scripts/docs.sh - etc/scripts/github-build.sh - etc/scripts/github-compile.sh - etc/scripts/mp-tck.sh - etc/scripts/spotbugs.sh - etc/scripts/test-archetypes.sh - Remove etc/scripts/BUILDDOCS.md (invalid) - Update etc/scripts/RELEASE.md - Move etc/scripts/actions/*.sh to etc/scripts
1 parent 34819f4 commit ad3d095

47 files changed

Lines changed: 1013 additions & 1852 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
steps:
1414
- name: Check out repository code
1515
uses: actions/checkout@v4
16-
- run: etc/scripts/actions/assign-issue-to-project.sh $GITHUB_REPOSITORY ${{ github.event.issue.number }} Backlog Triage
16+
- run: etc/scripts/assign-issue-to-project.sh $GITHUB_REPOSITORY ${{ github.event.issue.number }} Backlog Triage

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
steps:
3939
- name: Check out repository code
4040
uses: actions/checkout@v4
41-
- run: etc/scripts/actions/create-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 }}
41+
- run: etc/scripts/create-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/validate.yml

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ name: "Validate"
66

77
on:
88
pull_request:
9+
push:
10+
branches-ignore: [ 'main', 'helidon-*.x' ]
911
workflow_call:
1012

1113
env:
1214
JAVA_VERSION: '21'
1315
JAVA_DISTRO: 'oracle'
1416
HELIDON_PIPELINES: 'true'
15-
MAVEN_HTTP_ARGS: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3'
17+
MAVEN_ARGS: |
18+
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
19+
-Dmaven.wagon.http.retryHandler.count=3
1620
1721
concurrency:
1822
group: Validate-${{ github.ref }}
@@ -47,6 +51,13 @@ jobs:
4751
cache: maven
4852
- name: Checkstyle
4953
run: etc/scripts/checkstyle.sh
54+
shellcheck:
55+
timeout-minutes: 5
56+
runs-on: ubuntu-20.04
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: ShellCheck
60+
run: etc/scripts/shellcheck.sh
5061
spotbugs:
5162
timeout-minutes: 45
5263
runs-on: ubuntu-20.04
@@ -59,7 +70,12 @@ jobs:
5970
java-version: ${{ env.JAVA_VERSION }}
6071
cache: maven
6172
- name: Spotbugs
62-
run: etc/scripts/spotbugs.sh
73+
run: |
74+
mvn ${MAVEN_ARGS} -e \
75+
-DskipTests \
76+
-Dmaven.test.skip=true \
77+
-Pspotbugs,pipeline \
78+
install
6379
docs:
6480
timeout-minutes: 30
6581
runs-on: ubuntu-20.04
@@ -72,7 +88,16 @@ jobs:
7288
java-version: ${{ env.JAVA_VERSION }}
7389
cache: maven
7490
- name: Docs
75-
run: etc/scripts/docs.sh
91+
run: |
92+
mvn ${MAVEN_ARGS} -e \
93+
-Dmaven.test.skip=true \
94+
-DskipTests \
95+
-Ppipeline \
96+
install
97+
mvn ${MAVEN_ARGS} -e \
98+
-f docs/pom.xml \
99+
-Pjavadoc \
100+
install
76101
build:
77102
timeout-minutes: 60
78103
strategy:
@@ -88,7 +113,11 @@ jobs:
88113
java-version: ${{ env.JAVA_VERSION }}
89114
cache: maven
90115
- name: Maven build
91-
run: etc/scripts/github-build.sh
116+
run: |
117+
mvn ${MAVEN_ARGS} -e \
118+
-Dmaven.test.failure.ignore=false \
119+
-Pjavadoc,sources,tests,pipeline \
120+
install
92121
examples:
93122
timeout-minutes: 40
94123
strategy:
@@ -112,9 +141,15 @@ jobs:
112141
cache: maven
113142
- name: Maven build
114143
run: |
115-
mvn -B -e "-Dmaven.test.skip=true" $MAVEN_HTTP_ARGS -DskipTests -Ppipeline install
116-
cd examples
117-
mvn -B verify
144+
# prime build
145+
mvn ${MAVEN_ARGS} -e \
146+
-Dmaven.test.skip=true \
147+
-DskipTests \
148+
-Ppipeline \
149+
install
150+
mvn ${MAVEN_ARGS} -e \
151+
-f examples/pom.xml \
152+
verify
118153
- name: Test quickstarts native image
119154
run: etc/scripts/test-quickstarts.sh
120155
mp-tck:
@@ -133,7 +168,17 @@ jobs:
133168
java-version: ${{ env.JAVA_VERSION }}
134169
cache: maven
135170
- name: Maven build
136-
run: etc/scripts/mp-tck.sh
171+
run: |
172+
# prime build
173+
mvn ${MAVEN_ARGS} -e \
174+
-Dmaven.test.skip=true \
175+
-DskipTests \
176+
-Ppipeline \
177+
install
178+
mvn ${MAVEN_ARGS} -e \
179+
-f microprofile/tests/tck/pom.xml \
180+
-Ptck-ft \
181+
verify
137182
archetypes:
138183
timeout-minutes: 45
139184
strategy:
@@ -149,7 +194,16 @@ jobs:
149194
java-version: ${{ env.JAVA_VERSION }}
150195
cache: maven
151196
- name: Test archetypes
152-
run: etc/scripts/test-archetypes.sh
197+
run: |
198+
# prime build
199+
mvn ${MAVEN_ARGS} -e \
200+
-Dmaven.test.skip=true \
201+
-DskipTests \
202+
-Ppipeline \
203+
install
204+
mvn ${MAVEN_ARGS} -e \
205+
-f archetypes/pom.xml \
206+
install
153207
packaging:
154208
timeout-minutes: 60
155209
strategy:
@@ -166,7 +220,13 @@ jobs:
166220
native-image-job-reports: true
167221
cache: maven
168222
- name: Build Helidon
169-
run: etc/scripts/github-compile.sh
223+
run: |
224+
# prime build
225+
mvn ${MAVEN_ARGS} -e \
226+
-Dmaven.test.skip=true \
227+
-DskipTests \
228+
-Ppipeline \
229+
install
170230
- name: JAR packaging
171231
run: etc/scripts/test-packaging-jar.sh
172232
- name: JLink packaging

etc/scripts/BUILDDOCS.md

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

etc/scripts/RELEASE.md

Lines changed: 52 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
21
# Releasing Helidon
32

43
These are the steps for doing a release of Helidon. These steps
5-
will use release 0.7.0 in examples. Of course you are not releasing
4+
will use release 0.7.0 in examples. Of course, you are not releasing
65
0.7.0, so make sure to change that release number to your release
76
number when copy/pasting.
87

9-
# Overview
8+
## Overview
109

1110
The Helidon release pipeline is triggered when a change is pushed to
1211
a branch that starts with `release-`. The release pipeline performs
@@ -21,16 +20,15 @@ is the overall flow:
2120
5. Create GitHub release
2221
6. Increment version in master and update changelog
2322

24-
# Steps in detail
23+
## Steps in detail
2524

26-
```
25+
```shell
2726
# Set this to the version you are releasing
2827
export VERSION="0.7.0"
2928
```
3029

31-
3230
1. Create local release branch
33-
```
31+
```shell
3432
git clone git@github.com:oracle/helidon.git
3533
git checkout -b release-${VERSION}
3634
```
@@ -66,7 +64,7 @@ export VERSION="0.7.0"
6664
1. Do quick smoke test by trying an archetype that is in the staging
6765
repo (see staging repository profile at end of this document)
6866

69-
```
67+
```shell
7068
mvn -U archetype:generate -DinteractiveMode=false \
7169
-DarchetypeGroupId=io.helidon.archetypes \
7270
-DarchetypeArtifactId=helidon-quickstart-se \
@@ -81,87 +79,85 @@ export VERSION="0.7.0"
8179
mvn package -Possrh-staging
8280
```
8381

84-
2. Do full smoke test using test script (this requires staging profile to
85-
be configured):
86-
```
82+
2. Do full smoke test using test script (this requires staging profile to be configured):
83+
```shell
8784
smoketest.sh --giturl=https://github.com/oracle/helidon.git --version=${VERSION} --clean --staged full
8885
```
8986
3. The smoketest script will leave its work in `/var/tmp/helidon-smoke.XXXX`.
90-
Go there, into the quickstarts and test the native builds and Docker
91-
builds (for Docker builds you'll need to update the pom to include
92-
the staging repositories.
87+
Go there, into the quickstarts and test the native builds and Docker builds.
88+
For Docker builds you'll need to update the pom to include the staging repositories.
9389
94-
6. Release repository: Select repository then click Release (up at the top)
95-
1. In description you can put something like "Helidon 0.7.0 Release"
90+
7. Release repository: Select repository then click Release (up at the top)
91+
1. In the description you can put something like "Helidon 0.7.0 Release"
9692
2. It might take a while (possibly hours) before the release appears in Maven Central
9793
3. To check on progress look at https://repo1.maven.org/maven2/io/helidon/helidon-bom/
9894
99-
6. Create GitHub release
95+
8. Create GitHub release
10096
1. Create a fragment of the change log that you want used for the release
10197
description on the GitHub Releases page. Assume it is in `/tmp/change-frag.md`
10298
2. Set your API key (you generate this on your GitHub Settings):
103-
```
99+
```shell
104100
export GITHUB_API_KEY=<longhexnumberhere.....>
105101
```
106102
3. Run script to create release in GitHub:
107-
```
103+
```shell
108104
etc/scripts/github-release.sh --changelog=/tmp/change-frag.md --version=${VERSION}
109105
```
110106
4. Go to https://github.com/oracle/helidon/releases and verify release looks like
111107
you expect. You can edit it if you need to.
112108
113-
7. Update version and CHANGELOG in master
109+
9. Update version and CHANGELOG in master
114110
1. Create post release branch: `git checkout -b post-release-${VERSION}`
115111
2. Copy CHANGELOG from your release branch. Add empty Unrelease section.
116112
3. Update SNAPSHOT version number. Remember to use your version number!
117-
```
113+
```shell
118114
etc/scripts/release.sh --version=0.7.1-SNAPSHOT update_version
119115
```
120116
If you perfromed a Milestone release you will likely leave the
121117
SNAPSHOT version in master alone.
122118
4. Add and commit changes then push
123-
```
119+
```shell
124120
git push origin post-release-${VERSION}
125121
```
126122
5. Create PR and merge into master
127123
128-
8. Now go to helidon-site and look at the RELEASE.md there to release the website with updated docs
124+
10. Now go to helidon-site and look at the RELEASE.md there to release the website with updated docs
129125
130126
# Staging Repository Profile
131127
132128
To pull artifacts from the sonatype staging repository add this profile to your `settings.xml`:
133129
134-
```
135-
<profile>
136-
<id>ossrh-staging</id>
137-
<activation>
138-
<activeByDefault>false</activeByDefault>
139-
</activation>
140-
<repositories>
141-
<repository>
142-
<id>ossrh-staging</id>
143-
<name>OSS Sonatype Staging</name>
144-
<url>https://oss.sonatype.org/content/groups/staging/</url>
145-
<snapshots>
146-
<enabled>false</enabled>
147-
</snapshots>
148-
<releases>
149-
<enabled>true</enabled>
150-
</releases>
151-
</repository>
152-
</repositories>
153-
<pluginRepositories>
154-
<pluginRepository>
155-
<id>ossrh-staging</id>
156-
<name>OSS Sonatype Staging</name>
157-
<url>https://oss.sonatype.org/content/groups/staging/</url>
158-
<snapshots>
159-
<enabled>false</enabled>
160-
</snapshots>
161-
<releases>
162-
<enabled>true</enabled>
163-
</releases>
164-
</pluginRepository>
165-
</pluginRepositories>
166-
</profile>
130+
```xml
131+
<profile>
132+
<id>ossrh-staging</id>
133+
<activation>
134+
<activeByDefault>false</activeByDefault>
135+
</activation>
136+
<repositories>
137+
<repository>
138+
<id>ossrh-staging</id>
139+
<name>OSS Sonatype Staging</name>
140+
<url>https://oss.sonatype.org/content/groups/staging/</url>
141+
<snapshots>
142+
<enabled>false</enabled>
143+
</snapshots>
144+
<releases>
145+
<enabled>true</enabled>
146+
</releases>
147+
</repository>
148+
</repositories>
149+
<pluginRepositories>
150+
<pluginRepository>
151+
<id>ossrh-staging</id>
152+
<name>OSS Sonatype Staging</name>
153+
<url>https://oss.sonatype.org/content/groups/staging/</url>
154+
<snapshots>
155+
<enabled>false</enabled>
156+
</snapshots>
157+
<releases>
158+
<enabled>true</enabled>
159+
</releases>
160+
</pluginRepository>
161+
</pluginRepositories>
162+
</profile>
167163
```

0 commit comments

Comments
 (0)