Skip to content

Commit

Permalink
feat(ci): add profile to use snapshots, pass profiles to build (#804)
Browse files Browse the repository at this point in the history
* feat(ci): add profile to use snapshots, pass profiles to build

Signed-off-by: Chris Laprun <claprun@redhat.com>

* fix: always provide default profile

Signed-off-by: Chris Laprun <claprun@redhat.com>

---------

Signed-off-by: Chris Laprun <claprun@redhat.com>
  • Loading branch information
metacosm authored Jan 23, 2024
1 parent 413e376 commit b2bc44e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-for-quarkus-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly-build-with-f8-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
mvn -B deploy -DperformRelease -Dno-samples -Prelease,use-snapshots -s maven-settings.xml
2 changes: 1 addition & 1 deletion .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
mvn -B deploy -DperformRelease -Dno-samples -Prelease,use-snapshots -s maven-settings.xml
41 changes: 41 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,47 @@
<skipDocs>true</skipDocs>
</properties>
</profile>
<profile>
<id>use-snapshots</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>

<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

<repository>
<id>oss-sonatype-quarkus</id>
<name>oss-sonatype-quarkus</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>oss-sonatype-quarkus</id>
<name>oss-sonatype-quarkus</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>

0 comments on commit b2bc44e

Please sign in to comment.