Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x GitHub Actions release #999

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# Copyright (c) 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Release"

on:
push:
branches:
- 'release-*'

env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'temurin'
MAVEN_ARGS: |
-B -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
-Djdk.toolchain.version=${JAVA_VERSION}

concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
create-tag:
runs-on: ubuntu-20.04
environment: release
outputs:
tag: ${{ steps.create-tag.outputs.tag }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
- id: create-tag
run: ./etc/scripts/release.sh create_tag >> "${GITHUB_OUTPUT}"
validate:
needs: create-tag
uses: ./.github/workflows/validate.yml
with:
ref: ${{ needs.create-tag.outputs.tag }}
release:
needs: [ create-tag, validate ]
runs-on: ubuntu-20.04
timeout-minutes: 30
environment: release
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.create-tag.outputs.tag }}
- uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
MAVEN_SETTINGS: ${{ secrets.MAVEN_SETTINGS }}
run: etc/scripts/release.sh release_build
84 changes: 57 additions & 27 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
name: "Validate PR"
#
# Copyright (c) 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

on: [pull_request, push, workflow_dispatch]
name: "Validate"

on:
pull_request:
push:
workflow_call:
inputs:
ref:
description: The branch, tag or SHA to checkout
required: false
type: string
default: ''

env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'temurin'
GRAALVM_VERSION: '20.2.0'
GRAALVM_COMPONENTS: 'native-image'
HELIDON_PIPELINES: 'true'
MAVEN_HTTP_ARGS: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3'
MAVEN_ARGS: |
-B -fae -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
-Djdk.toolchain.version=${JAVA_VERSION}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -21,72 +48,75 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
- name: Set up JDK 11
uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Copyright
run: etc/scripts/copyright.sh
- run: etc/scripts/copyright.sh
checkstyle:
timeout-minutes: 10
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/[email protected]
with:
ref: ${{ inputs.ref }}
- uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Checkstyle
run: etc/scripts/checkstyle.sh
- run: etc/scripts/checkstyle.sh
spotbugs:
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/[email protected]
with:
ref: ${{ inputs.ref }}
- uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Spotbugs
run: etc/scripts/spotbugs.sh
- run: |
mvn ${MAVEN_ARGS} -T 8 \
verify \
-DskipTests \
--fail-at-end \
-Pspotbugs
build:
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu-20.04,windows-2019 ]
include:
- os: ubuntu-20.04
build_script: etc/scripts/build.sh
- os: windows-2019
build_script: etc/scripts/build.bat
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Java 11
with:
ref: ${{ inputs.ref }}
- uses: actions/[email protected]
if: matrix.os == 'ubuntu-20.04'
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Set up Java 11
- uses: graalvm/setup-graalvm@v1
if: matrix.os == 'windows-2019'
uses: graalvm/setup-graalvm@v1
with:
version: ${{ env.GRAALVM_VERSION }}
java-version: ${{ env.JAVA_VERSION }}
components: ${{ env.GRAALVM_COMPONENTS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: Maven build
run: ${{ matrix.build_script }}
- run: |
mvn ${MAVEN_ARGS} -T 8 \
clean install \
--fail-at-end \
-Dmaven.test.failure.ignore=true
shell: bash
- name: Archive test results
uses: actions/[email protected]
with:
Expand Down
Empty file added .mvn/jvm.config
Empty file.
64 changes: 0 additions & 64 deletions Jenkinsfile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The Helidon Build Tools version is aligned with the Helidon `major.minor` versio

## Build

You will need Java 11 and Maven 3.6.3 or newer.
You will need Java 11 and Maven 3.8.2 or newer.

**Full build**
```bash
Expand Down
2 changes: 1 addition & 1 deletion build-cache-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion dev-loop/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--

Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion enforcer-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,7 +45,7 @@ void testAllRightsReserved() {

shouldFail(templateLine,
file,
"Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.");
"Copyright (c) 2017, 2021 Oracle and/or its affiliates.");
}

@Test
Expand Down Expand Up @@ -130,4 +130,4 @@ private void shouldFail(TemplateLine templateLine,
assertThat(message, containsString(contains));
}
}
}
}
21 changes: 11 additions & 10 deletions etc/copyright-exclude.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/README.md
/CHANGELOG.md
/.gitignore
/NOTICE.txt
/LICENSE.txt
/3RD-PARTY-LICENSE.txt
/etc/copyright-exclude.txt
/etc/copyright.txt
/etc/images/
README.md
CHANGELOG.md
.gitignore
NOTICE.txt
LICENSE.txt
3RD-PARTY-LICENSE.txt
etc/copyright-exclude.txt
etc/copyright.txt
etc/images/
_plantuml-config.txt
superagent.js
vuex-router-sync.js
Expand All @@ -19,11 +19,12 @@ vuex-router-sync.js
.bat
javax.annotation.processing.Processor
com.sun.source.util.Plugin
/cli-data/latest
cli-data/latest
cli-data.zip
.exit
.log
.hola
.hello
.hbs
HELIDON_THIRD_PARTY_LICENSES.xml
jvm.config
Loading