Skip to content

Commit

Permalink
Enable publication of build scans for PRs coming from forks
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Oct 13, 2023
1 parent e337149 commit 6b6133c
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ jobs:
target/gradle-build-scan-url.txt
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

calculate-test-jobs:
name: Calculate Test Jobs
Expand Down Expand Up @@ -372,6 +375,9 @@ jobs:
path: |
**/build.log
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

maven-tests:
name: Maven Tests - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -429,7 +435,6 @@ jobs:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
- name: Build

# Important: keep -pl ... in sync with "Calculate run flags"!
# Despite the pre-calculated run_jvm flag, GIB has to be re-run here to figure out the exact submodules to build.
run: ./mvnw $COMMON_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -pl 'integration-tests/maven' -pl 'integration-tests/devmode' ${{ needs.build-jdk11.outputs.gib_args }}
Expand Down Expand Up @@ -461,6 +466,9 @@ jobs:
target/gradle-build-scan-url.txt
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

gradle-tests:
name: Gradle Tests - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -533,6 +541,9 @@ jobs:
target/gradle-build-scan-url.txt
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

devtools-tests:
name: Devtools Tests - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -611,6 +622,9 @@ jobs:
target/gradle-build-scan-url.txt
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

kubernetes-tests:
name: Kubernetes Tests - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -684,6 +698,9 @@ jobs:
target/build-report.json
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

quickstarts-tests:
name: Quickstarts Compilation - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -740,6 +757,10 @@ jobs:
quarkus-quickstarts/target/build-report.json
quarkus-quickstarts/LICENSE
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

virtual-thread-native-tests:
name: Native Tests - Virtual Thread - ${{matrix.category}}
runs-on: ${{matrix.os-name}}
Expand Down Expand Up @@ -796,14 +817,17 @@ jobs:
integration-tests/virtual-threads/target/build-report.json
integration-tests/virtual-threads/target/gradle-build-scan-url.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

tcks-test:
name: MicroProfile TCKs Tests
needs: [build-jdk11, calculate-test-jobs]
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_tcks == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
runs-on: ubuntu-latest
timeout-minutes: 150

steps:
- name: Gradle Enterprise environment
run: |
Expand Down Expand Up @@ -863,6 +887,9 @@ jobs:
target/gradle-build-scan-url.txt
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

native-tests:
name: Native Tests - ${{matrix.category}}
Expand Down Expand Up @@ -955,6 +982,9 @@ jobs:
target/gradle-build-scan-url.txt
LICENSE.txt
retention-days: 2
- name: Save Build Scan
if: always()
uses: gradle/github-actions/maven-build-scan/[email protected]

build-report:
runs-on: ubuntu-latest
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/develocity-publish-build-scans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Develocity - Publish Maven Build Scans

on:
workflow_run:
workflows: [ "Quarkus CI" ]
types: [ completed ]

jobs:
publish-build-scans:
if: github.repository == 'quarkusio/quarkus'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Verify Terms of Service acceptance job passed
uses: gradle/github-actions/terms-of-service-acceptance/[email protected]
with:
terms-of-service-acceptance-workflow-job-name: 'run-terms-of-service-acceptance'
- name: Publish Maven Build Scans
uses: gradle/github-actions/maven-build-scan/[email protected]
with:
develocity-url: 'https://ge.quarkus.io'
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
32 changes: 32 additions & 0 deletions .github/workflows/develocity-tos-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Develocity - Terms of Service acceptance verification

on:
# issue_comment event is triggered when a pull-request is commented
issue_comment:
types: [ created ]
pull_request_target:

jobs:
run-terms-of-service-acceptance:
if: github.repository == 'quarkusio/quarkus'
runs-on: ubuntu-latest
permissions:
# required to update signature file
contents: write
# required to comment pull-request
pull-requests: write
# required to update pull-request status check
actions: write
statuses: write
steps:
- name: Run Terms of Service acceptance verification
uses: gradle/github-actions/terms-of-service-acceptance/[email protected]
with:
# tos-location can also point to a file in a Github repository with this syntax: /<owner>/<repo>/blob/<branch>/tos.html
tos-location: 'https://foo.bar/tos.html'
# Optional inputs
pr-comment-tos-acceptance-missing: 'Quarkus uses Develocity to provide insights about CI builds. Please accept [Develocity Terms Of Service]({0}) to get your pull request Build Scan published by commenting this pull-request with the following message:'
#pr-comment-tos-acceptance-request: 'I have read Develocity Terms Of Service and I hereby accept the Terms'
pr-comment-tos-acceptance-validation: 'All contributors have accepted Develocity Terms Of Service.'
# let's whitelist the most active contributors from Red Hat
white-list: 'gsmet,geoand,stuartwdouglas,gastaldi,mkouba,cescoffier,sberyozkin,Sanne,aloubyansky,yrodiere,FroMage,phillip-kruger,machi1990,dmlloyd,iocanel,Sgitario,ia3andy,radcortez,rsvoboda,Ladicek,zakkak,ebullient,jmartisk,gwenneg,manovotn,maxandersen,starksm64,patriot1burke,emmanuelbernard,ozangunalp,michalvavrik,n1hility,tsegismont,galderz,ppalaga,evanchooly,holly-cummins,michelle-purcell,jponge,DavideD,karesti,brunobat,stalep,Karm,manusa,pedroigor,aureamunoz,metacosm,johnaohara,MichalMaler,MikeEdgar,alesj'

0 comments on commit 6b6133c

Please sign in to comment.