From b2bc44e08443cfd31a267c06e2d2a5d00cd46f6e Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Tue, 23 Jan 2024 14:12:02 +0100 Subject: [PATCH] feat(ci): add profile to use snapshots, pass profiles to build (#804) * feat(ci): add profile to use snapshots, pass profiles to build Signed-off-by: Chris Laprun * fix: always provide default profile Signed-off-by: Chris Laprun --------- Signed-off-by: Chris Laprun --- .../workflows/build-for-quarkus-version.yml | 8 +++- .../nightly-build-with-f8-snapshot.yml | 3 +- .github/workflows/snapshot-release.yml | 2 +- pom.xml | 41 +++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-for-quarkus-version.yml b/.github/workflows/build-for-quarkus-version.yml index c1f725f60..4d460c5dd 100644 --- a/.github/workflows/build-for-quarkus-version.yml +++ b/.github/workflows/build-for-quarkus-version.yml @@ -24,6 +24,10 @@ on: type: string required: true default: 'integration-tests,samples' + profiles: + type: string + required: false + default: 'default' workflow_dispatch: inputs: josdk-pr: @@ -151,10 +155,10 @@ jobs: echo "Quarkus Fabric8 version: ${{ steps.build-quarkus-pr.outputs.quarkus_f8_version }}" - name: Build with Maven (JVM) - run: mvn -B formatter:validate install --file pom.xml + run: mvn -B formatter:validate install -P'${{inputs.profiles}}' --file pom.xml - name: Build with Maven (Native) - run: mvn -B install -Dnative --file pom.xml -pl '${{inputs.native-modules}}' -amd + run: mvn -B install -Dnative --file pom.xml -P'${{inputs.profiles}}' -pl '${{inputs.native-modules}}' -amd - name: Kubernetes KinD Cluster uses: container-tools/kind-action@v2 diff --git a/.github/workflows/nightly-build-with-f8-snapshot.yml b/.github/workflows/nightly-build-with-f8-snapshot.yml index e03ec4507..138b5742c 100644 --- a/.github/workflows/nightly-build-with-f8-snapshot.yml +++ b/.github/workflows/nightly-build-with-f8-snapshot.yml @@ -12,6 +12,7 @@ jobs: java-version: 17 branch: "next-fabric8-version" native-modules: "integration-tests,samples" + profiles: "use-snapshots" release-snapshot: runs-on: ubuntu-latest @@ -40,4 +41,4 @@ jobs: run: | mvn versions:set -DnewVersion=999.F8-SNAPSHOT versions:commit gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg - mvn -B deploy -DperformRelease -Dno-samples -Prelease -s maven-settings.xml \ No newline at end of file + mvn -B deploy -DperformRelease -Dno-samples -Prelease,use-snapshots -s maven-settings.xml \ No newline at end of file diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 801ca11e3..232018116 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -30,4 +30,4 @@ jobs: - name: Maven release run: | gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg - mvn -B deploy -DperformRelease -Dno-samples -Prelease -s maven-settings.xml \ No newline at end of file + mvn -B deploy -DperformRelease -Dno-samples -Prelease,use-snapshots -s maven-settings.xml \ No newline at end of file diff --git a/pom.xml b/pom.xml index 483579669..b9baa4fa8 100644 --- a/pom.xml +++ b/pom.xml @@ -120,6 +120,47 @@ true + + use-snapshots + + + + false + + central + Central Repository + https://repo.maven.apache.org/maven2 + + + + oss-sonatype + oss-sonatype + https://oss.sonatype.org/content/repositories/snapshots/ + + true + + + + + oss-sonatype-quarkus + oss-sonatype-quarkus + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + true + + + + + + oss-sonatype-quarkus + oss-sonatype-quarkus + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + true + + + +