From 1036a77394b20ea80c1a3ef26140c352b79f5965 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Fri, 24 May 2024 09:03:52 +0200 Subject: [PATCH] feat(ci): add nightly build job [skip ci] --- .github/workflows/nighly.yaml | 98 +++++++++++++++++++++++++++++++++++ .github/workflows/verify.yaml | 2 +- DEPENDENCIES | 65 ++++++++++++----------- build.gradle.kts | 3 +- gradle.properties | 2 +- 5 files changed, 134 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/nighly.yaml diff --git a/.github/workflows/nighly.yaml b/.github/workflows/nighly.yaml new file mode 100644 index 00000000..362ee4d8 --- /dev/null +++ b/.github/workflows/nighly.yaml @@ -0,0 +1,98 @@ +name: Nightly + +on: + workflow_dispatch: + inputs: + version: + description: Semantic Version string to use for this nightly build + required: false + schedule: + - cron: "0 3 * * *" # run at 03:00 UTC + +env: + INPUT_VERSION: ${{ github.event.inputs.version || inputs.version }} + +jobs: + Secrets-Presence: + name: "Check for required credentials" + runs-on: ubuntu-latest + outputs: + HAS_OSSRH: ${{ steps.secrets-presence.outputs.HAS_OSSRH }} + HAS_WEBHOOK: ${{ steps.secrets-presence.outputs.HAS_WEBHOOK }} + steps: + - name: Check whether secrets exist + id: secrets-presence + run: | + [ ! -z "${{ secrets.ORG_GPG_PASSPHRASE }}" ] && + [ ! -z "${{ secrets.ORG_GPG_PRIVATE_KEY }}" ] && + [ ! -z "${{ secrets.ORG_OSSRH_USERNAME }}" ] && echo "HAS_OSSRH=true" >> $GITHUB_OUTPUT + [ ! -z "${{ secrets.DISCORD_WEBHOOK_GITHUB }}" ] && echo "HAS_WEBHOOK=true" >> $GITHUB_OUTPUT + exit 0 + + Determine-Version: + runs-on: ubuntu-latest + outputs: + VERSION: ${{ steps.get-version.outputs.VERSION }} + steps: + - uses: actions/checkout@v4 + - name: "Get version" + id: get-version + run: | + if [ -z ${{ env.INPUT_VERSION }} ]; then + echo "VERSION=$(IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<$(grep "version" gradle.properties | awk -F= '{print $2}') && echo $RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$RELEASE_VERSION_PATCH-$(date +"%Y%m%d")-SNAPSHOT)" >> "$GITHUB_OUTPUT" + else + echo "VERSION=${{ env.INPUT_VERSION }}" >> "$GITHUB_OUTPUT" + fi + + Run-Tests: + needs: [ Secrets-Presence, Determine-Version ] + uses: ./.github/workflows/verify.yaml + secrets: inherit + + Publish-Artefacts: + runs-on: ubuntu-latest + needs: [ Run-Tests, Determine-Version ] + if: | + needs.Secrets-Presence.outputs.HAS_OSSRH + + steps: + - uses: actions/checkout@v4 + - uses: eclipse-edc/.github/.github/actions/setup-build@main + + # Import GPG Key + - uses: eclipse-edc/.github/.github/actions/import-gpg-key@main + if: | + needs.secrets-presence.outputs.HAS_OSSRH + name: "Import GPG Key" + with: + gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }} + + - name: "Publish To OSSRH/MavenCentral" + if: | + needs.secrets-presence.outputs.HAS_OSSRH + env: + OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }} + OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }} + run: |- + cmd="" + if [[ $VERSION != *-SNAPSHOT ]] + then + cmd="closeAndReleaseSonatypeStagingRepository"; + fi + echo "Publishing Version $VERSION to Sonatype" + ./gradlew publishToSonatype ${cmd} --no-parallel -Pversion=$VERSION -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}" + + Post-To-Discord: + needs: [ Publish-Artefacts, Determine-Version, Secrets-Presence ] + if: "needs.Secrets-Presence.outputs.HAS_WEBHOOK && always()" + runs-on: ubuntu-latest + steps: + - uses: sarisia/actions-status-discord@v1 + name: "Invoke discord webhook" + with: + webhook: ${{ secrets.DISCORD_WEBHOOK_GITHUB }} + # if the publishing is skipped, that means the preceding test run failed + status: ${{ needs.Publish-Components.result == 'skipped' && 'Failure' || needs.Publish-Artefacts.result }} + title: "Nightly Build Technology AWS" + description: "Build and publish ${{ needs.Determine-Version.outputs.VERSION }}" + username: GitHub Actions \ No newline at end of file diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 7853fc54..27958135 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -1,7 +1,7 @@ name: Run Tests on: - workflow_call: + workflow_call: workflow_dispatch: push: pull_request: diff --git a/DEPENDENCIES b/DEPENDENCIES index 184a21f0..b55c7c0b 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -17,7 +17,6 @@ maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.17.1, Apache-2.0, approve maven/mavencentral/com.github.docker-java/docker-java-api/3.3.6, Apache-2.0, approved, #10346 maven/mavencentral/com.github.docker-java/docker-java-transport-zerodep/3.3.6, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #7946 maven/mavencentral/com.github.docker-java/docker-java-transport/3.3.6, Apache-2.0, approved, #7942 -maven/mavencentral/com.github.stephenc.jcip/jcip-annotations/1.0-1, Apache-2.0, approved, CQ21949 maven/mavencentral/com.google.code.findbugs/jsr305/3.0.2, Apache-2.0, approved, #20 maven/mavencentral/com.google.code.gson/gson/2.10.1, Apache-2.0, approved, #6159 maven/mavencentral/com.google.crypto.tink/tink/1.13.0, Apache-2.0, approved, #14502 @@ -27,8 +26,8 @@ maven/mavencentral/com.google.guava/failureaccess/1.0.2, Apache-2.0, approved, C maven/mavencentral/com.google.guava/guava/33.1.0-jre, Apache-2.0 AND CC0-1.0, approved, #13675 maven/mavencentral/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava, Apache-2.0, approved, CQ22657 maven/mavencentral/com.google.protobuf/protobuf-java/3.25.1, BSD-3-Clause, approved, clearlydefined -maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.37.3, Apache-2.0, approved, #11701 -maven/mavencentral/com.puppycrawl.tools/checkstyle/10.16.0, , restricted, clearlydefined +maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.39.1, Apache-2.0, approved, #14830 +maven/mavencentral/com.puppycrawl.tools/checkstyle/10.16.0, LGPL-2.1-or-later AND (Apache-2.0 AND LGPL-2.1-or-later) AND Apache-2.0, approved, #14689 maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.12.0, Apache-2.0, approved, #11159 maven/mavencentral/com.squareup.okhttp3/okhttp/4.12.0, Apache-2.0, approved, #11156 maven/mavencentral/com.squareup.okhttp3/okhttp/4.9.3, Apache-2.0 AND MPL-2.0, approved, #3225 @@ -67,10 +66,10 @@ maven/mavencentral/jakarta.ws.rs/jakarta.ws.rs-api/4.0.0, EPL-2.0 OR GPL-2.0-onl maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.2, BSD-3-Clause, approved, ee4j.jaxb maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636 maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.1, Apache-2.0, approved, #7164 -maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.12, Apache-2.0, approved, #7164 +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.15, Apache-2.0, approved, #7164 maven/mavencentral/net.bytebuddy/byte-buddy/1.14.1, Apache-2.0 AND BSD-3-Clause, approved, #7163 maven/mavencentral/net.bytebuddy/byte-buddy/1.14.11, Apache-2.0 AND BSD-3-Clause, approved, #7163 -maven/mavencentral/net.bytebuddy/byte-buddy/1.14.12, Apache-2.0 AND BSD-3-Clause, approved, #7163 +maven/mavencentral/net.bytebuddy/byte-buddy/1.14.15, Apache-2.0 AND BSD-3-Clause, approved, #7163 maven/mavencentral/net.java.dev.jna/jna/5.13.0, Apache-2.0 AND LGPL-2.1-or-later, approved, #6709 maven/mavencentral/net.sf.saxon/Saxon-HE/12.4, MPL-2.0 AND (MPL-2.0 AND Apache-2.0) AND (MPL-2.0 AND LicenseRef-X11-style) AND MPL-1.0 AND W3C, approved, #12716 maven/mavencentral/org.antlr/antlr4-runtime/4.13.1, BSD-3-Clause, approved, #10767 @@ -145,26 +144,26 @@ maven/mavencentral/org.eclipse.edc/verifiable-credentials-spi/0.7.1-SNAPSHOT, Ap maven/mavencentral/org.eclipse.edc/web-spi/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-servlet-api/5.0.2, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-websocket-api/2.0.0, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.20, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish maven/mavencentral/org.glassfish.hk2/hk2-locator/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish @@ -212,16 +211,16 @@ maven/mavencentral/org.junit/junit-bom/5.10.1, EPL-2.0, approved, #9844 maven/mavencentral/org.junit/junit-bom/5.10.2, EPL-2.0, approved, #9844 maven/mavencentral/org.junit/junit-bom/5.9.2, EPL-2.0, approved, #4711 maven/mavencentral/org.jvnet.mimepull/mimepull/1.9.15, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ21484 -maven/mavencentral/org.mockito/mockito-core/5.11.0, MIT AND (Apache-2.0 AND MIT) AND Apache-2.0, approved, #13505 +maven/mavencentral/org.mockito/mockito-core/5.12.0, MIT AND (Apache-2.0 AND MIT) AND Apache-2.0, approved, #14678 maven/mavencentral/org.mockito/mockito-core/5.2.0, MIT AND (Apache-2.0 AND MIT) AND Apache-2.0, approved, #7401 maven/mavencentral/org.objenesis/objenesis/3.3, Apache-2.0, approved, clearlydefined maven/mavencentral/org.opentest4j/opentest4j/1.3.0, Apache-2.0, approved, #9713 maven/mavencentral/org.ow2.asm/asm-commons/9.5, BSD-3-Clause, approved, #7553 -maven/mavencentral/org.ow2.asm/asm-commons/9.6, BSD-3-Clause, approved, #10775 +maven/mavencentral/org.ow2.asm/asm-commons/9.7, BSD-3-Clause, approved, #14075 maven/mavencentral/org.ow2.asm/asm-tree/9.5, BSD-3-Clause, approved, #7555 -maven/mavencentral/org.ow2.asm/asm-tree/9.6, BSD-3-Clause, approved, #10773 +maven/mavencentral/org.ow2.asm/asm-tree/9.7, BSD-3-Clause, approved, #14073 maven/mavencentral/org.ow2.asm/asm/9.5, BSD-3-Clause, approved, #7554 -maven/mavencentral/org.ow2.asm/asm/9.6, BSD-3-Clause, approved, #10776 +maven/mavencentral/org.ow2.asm/asm/9.7, BSD-3-Clause, approved, #14076 maven/mavencentral/org.reactivestreams/reactive-streams/1.0.4, CC0-1.0, approved, CQ16332 maven/mavencentral/org.reflections/reflections/0.10.2, Apache-2.0 AND WTFPL, approved, clearlydefined maven/mavencentral/org.rnorth.duct-tape/duct-tape/1.0.8, MIT, approved, clearlydefined @@ -237,7 +236,7 @@ maven/mavencentral/software.amazon.awssdk/apache-client/2.25.48, Apache-2.0, app maven/mavencentral/software.amazon.awssdk/arns/2.25.48, Apache-2.0, approved, #13695 maven/mavencentral/software.amazon.awssdk/auth/2.25.48, Apache-2.0, approved, #13692 maven/mavencentral/software.amazon.awssdk/aws-core/2.25.48, Apache-2.0, approved, #13702 -maven/mavencentral/software.amazon.awssdk/aws-json-protocol/2.25.48, , restricted, clearlydefined +maven/mavencentral/software.amazon.awssdk/aws-json-protocol/2.25.48, Apache-2.0, approved, clearlydefined maven/mavencentral/software.amazon.awssdk/aws-query-protocol/2.25.48, Apache-2.0, approved, #13701 maven/mavencentral/software.amazon.awssdk/aws-xml-protocol/2.25.48, Apache-2.0, approved, #13684 maven/mavencentral/software.amazon.awssdk/checksums-spi/2.25.48, Apache-2.0, approved, #13686 @@ -248,7 +247,7 @@ maven/mavencentral/software.amazon.awssdk/http-auth-aws/2.25.48, Apache-2.0, app maven/mavencentral/software.amazon.awssdk/http-auth-spi/2.25.48, Apache-2.0, approved, #13704 maven/mavencentral/software.amazon.awssdk/http-auth/2.25.48, Apache-2.0, approved, #13682 maven/mavencentral/software.amazon.awssdk/http-client-spi/2.25.48, Apache-2.0, approved, #13706 -maven/mavencentral/software.amazon.awssdk/iam/2.25.48, , restricted, clearlydefined +maven/mavencentral/software.amazon.awssdk/iam/2.25.48, Apache-2.0, approved, clearlydefined maven/mavencentral/software.amazon.awssdk/identity-spi/2.25.48, Apache-2.0, approved, #13685 maven/mavencentral/software.amazon.awssdk/json-utils/2.25.48, Apache-2.0, approved, #13698 maven/mavencentral/software.amazon.awssdk/metrics-spi/2.25.48, Apache-2.0, approved, #13680 @@ -258,8 +257,8 @@ maven/mavencentral/software.amazon.awssdk/protocol-core/2.25.48, Apache-2.0, app maven/mavencentral/software.amazon.awssdk/regions/2.25.48, Apache-2.0, approved, #13694 maven/mavencentral/software.amazon.awssdk/s3/2.25.48, Apache-2.0, approved, #13688 maven/mavencentral/software.amazon.awssdk/sdk-core/2.25.48, Apache-2.0, approved, #13700 -maven/mavencentral/software.amazon.awssdk/secretsmanager/2.25.48, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/sts/2.25.48, , restricted, clearlydefined +maven/mavencentral/software.amazon.awssdk/secretsmanager/2.25.48, Apache-2.0, approved, clearlydefined +maven/mavencentral/software.amazon.awssdk/sts/2.25.48, Apache-2.0, approved, clearlydefined maven/mavencentral/software.amazon.awssdk/third-party-jackson-core/2.25.48, Apache-2.0, approved, #13703 maven/mavencentral/software.amazon.awssdk/utils/2.25.48, Apache-2.0, approved, #13689 maven/mavencentral/software.amazon.eventstream/eventstream/1.0.1, Apache-2.0, approved, clearlydefined diff --git a/build.gradle.kts b/build.gradle.kts index df96d0b7..ea667c09 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ buildscript { } allprojects { - apply(plugin = "${group}.edc-build") + apply(plugin = "org.eclipse.edc.edc-build") // configure which version of the annotation processor to use. defaults to the same version as the plugin configure { @@ -40,6 +40,7 @@ allprojects { pom { scmUrl.set(techAwsScmConnection) scmConnection.set(techAwsScmConnection) + groupId = project.group.toString() } } diff --git a/gradle.properties b/gradle.properties index 39dcb196..6b13caad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -group=org.eclipse.edc +group=org.eclipse.edc.aws version=0.7.1-SNAPSHOT # configure the build: