diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index e9e96126f1979..0515e8efd24df 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -102,6 +102,11 @@ jobs: gib_impacted: ${{ steps.get-gib-impacted.outputs.impacted_modules }} m2-cache-key: ${{ steps.m2-cache-key.outputs.key }} steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-11" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Initial JDK 11 Build" >> "$GITHUB_ENV" - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -160,7 +165,7 @@ jobs: id: get-gib-impacted # mvnw just for creating gib-impacted.log ("validate" should not waste much time if not incremental at all, e.g. on main) run: | - ./mvnw -q -T1C $COMMON_MAVEN_ARGS -Dtcks -Dquickly-ci ${{ steps.get-gib-args.outputs.gib_args }} -Dgib.logImpactedTo=gib-impacted.log validate + ./mvnw -q -T1C $COMMON_MAVEN_ARGS -Dscan=false -Dtcks -Dquickly-ci ${{ steps.get-gib-args.outputs.gib_args }} -Dgib.logImpactedTo=gib-impacted.log validate if [ -f gib-impacted.log ] then GIB_IMPACTED=$(cat gib-impacted.log) @@ -192,6 +197,7 @@ jobs: name: "build-reports-Initial JDK 11 Build" path: | target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 @@ -273,8 +279,12 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.jvm_matrix) }} - steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=JVM Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV" - name: Stop mysql if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')" shell: bash @@ -348,6 +358,7 @@ jobs: path: | **/target/*-reports/TEST-*.xml target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 - name: Upload gc.log @@ -391,6 +402,11 @@ jobs: os-name: "windows-latest" } steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Maven Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV" - name: Support longpaths on Windows if: "startsWith(matrix.java.os-name, 'windows')" run: git config --global core.longpaths true @@ -444,6 +460,7 @@ jobs: path: | **/target/*-reports/TEST-*.xml target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 @@ -472,6 +489,11 @@ jobs: os-name: "windows-latest" } steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Gradle Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV" - name: Support longpaths on Windows if: "startsWith(matrix.java.os-name, 'windows')" run: git config --global core.longpaths true @@ -500,7 +522,7 @@ jobs: # runs on Windows as well but would require newline conversion, not worth it if: "!startsWith(matrix.java.os-name, 'windows')" shell: bash - run: ./integration-tests/gradle/update-dependencies.sh $COMMON_MAVEN_ARGS + run: ./integration-tests/gradle/update-dependencies.sh $COMMON_MAVEN_ARGS -Dscan=false - name: Build shell: bash # Important: keep -pl ... in sync with "Calculate run flags"! @@ -514,6 +536,7 @@ jobs: **/build/test-results/test/TEST-*.xml **/target/*-reports/TEST-*.xml target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 @@ -544,6 +567,11 @@ jobs: os-name: "windows-latest" } steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Devtools Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV" - name: Support longpaths on Windows if: "startsWith(matrix.java.os-name, 'windows')" run: git config --global core.longpaths true @@ -589,6 +617,7 @@ jobs: path: | **/target/*-reports/TEST-*.xml target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 @@ -609,6 +638,11 @@ jobs: os-name: "ubuntu-latest" } steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Quickstarts Compilation - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV" - uses: actions/checkout@v3 - name: Restore Maven Repository uses: actions/cache/restore@v3 @@ -656,6 +690,11 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.virtual_threads_matrix) }} steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Virtual Thread Support Tests Native - ${{matrix.category}}" >> "$GITHUB_ENV" - uses: actions/checkout@v3 - name: Restore Maven Repository uses: actions/cache/restore@v3 @@ -696,6 +735,7 @@ jobs: path: | integration-tests/virtual-threads/**/target/*-reports/TEST-*.xml integration-tests/virtual-threads/target/build-report.json + integration-tests/virtual-threads/target/gradle-build-scan-url.txt retention-days: 2 tcks-test: name: MicroProfile TCKs Tests @@ -706,6 +746,11 @@ jobs: timeout-minutes: 150 steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-11" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=MicroProfile TCKs Tests" >> "$GITHUB_ENV" - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -760,6 +805,7 @@ jobs: path: | **/target/*-reports/TEST-*.xml target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 @@ -779,6 +825,11 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.native_matrix) }} steps: + - name: Gradle Enterprise environment + shell: bash + run: | + echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV" + echo "GE_CUSTOM_VALUES=gh-job-name=Native Tests - ${{matrix.category}}" >> "$GITHUB_ENV" - name: Support longpaths on Windows if: "startsWith(matrix.os-name, 'windows')" run: git config --global core.longpaths true @@ -849,6 +900,7 @@ jobs: **/target/*-reports/TEST-*.xml **/build/test-results/test/TEST-*.xml target/build-report.json + target/gradle-build-scan-url.txt LICENSE.txt retention-days: 2 @@ -856,7 +908,7 @@ jobs: runs-on: ubuntu-latest name: Build report needs: [build-jdk11,jvm-tests,maven-tests,gradle-tests,devtools-tests,quickstarts-tests,tcks-test,native-tests,virtual-thread-native-tests] - if: always() && github.repository != 'quarkusio/quarkus' + if: always() steps: - uses: actions/download-artifact@v3 with: @@ -871,4 +923,3 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} build-reports-artifacts-path: build-reports-artifacts - forks-only: true diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index bc7b9ed47f303..3dd605930da93 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -2,11 +2,11 @@ com.gradle gradle-enterprise-maven-extension - 1.18 + 1.18.1 com.gradle common-custom-user-data-maven-extension - 1.12 + 1.12.2 diff --git a/.mvn/gradle-enterprise-custom-user-data.groovy b/.mvn/gradle-enterprise-custom-user-data.groovy index df89bae95ffee..81619a7284be5 100644 --- a/.mvn/gradle-enterprise-custom-user-data.groovy +++ b/.mvn/gradle-enterprise-custom-user-data.groovy @@ -2,7 +2,12 @@ // Configure build scan publication boolean publish = true if(session?.getRequest()?.getBaseDirectory() != null) { - def testBuildPaths = [ '/target/codestart-test/', '/target/it/', '/target/test-classes/', '/target/test-project/'] + def testBuildPaths = [ + File.separator + 'target' + File.separator + 'codestart-test' + File.separator, + File.separator + 'target' + File.separator + 'it' + File.separator, + File.separator + 'target' + File.separator + 'test-classes' + File.separator, + File.separator + 'target' + File.separator + 'test-project' + File.separator + ] publish = testBuildPaths.every {testBuildPath -> !session.getRequest().getBaseDirectory().contains(testBuildPath) } if(!publish) { // do not publish a build scan for test builds @@ -21,24 +26,58 @@ if (System.env.MAVEN_CMD_LINE_ARGS) { //Add github action information if (System.env.GITHUB_ACTIONS) { - def jobName = System.env.GITHUB_JOB + def jobId = System.env.GITHUB_JOB - buildScan.value('gh-job-name', jobName) + buildScan.value('gh-job-id', jobId) buildScan.value('gh-event-name', System.env.GITHUB_EVENT_NAME) buildScan.value('gh-ref-name', System.env.GITHUB_REF_NAME) buildScan.value('gh-actor', System.env.GITHUB_ACTOR) buildScan.value('gh-workflow', System.env.GITHUB_WORKFLOW) + String jobCustomValues = System.env.GE_CUSTOM_VALUES + if (jobCustomValues != null && !jobCustomValues.isBlank()) { + for (String jobCustomValue : jobCustomValues.split(",")) { + int index = jobCustomValue.indexOf('=') + if (index <= 0) { + continue + } + buildScan.value(jobCustomValue.substring(0, index).trim(), jobCustomValue.substring(index + 1).trim()) + } + } + + buildScan.tag(jobId) + buildScan.tag(System.env.GITHUB_EVENT_NAME) + buildScan.tag(System.env.GITHUB_WORKFLOW) + String jobTags = System.env.GE_TAGS + if (jobTags != null && !jobTags.isBlank()) { + for (String tag : jobTags.split(",")) { + buildScan.tag(tag.trim()) + } + } + + buildScan.link('Workflow run', System.env.GITHUB_SERVER_URL + '/' + System.env.GITHUB_REPOSITORY + '/actions/runs/' + System.env.GITHUB_RUN_ID) + def prNumber = System.env.PULL_REQUEST_NUMBER + if (prNumber != null) { + buildScan.value('gh-pr', prNumber) + buildScan.tag('pr-' + prNumber) - def prnumber = System.env.PULL_REQUEST_NUMBER - if (prnumber != null) { - buildScan.value('gh-pr', prnumber) - buildScan.tag('pr-' + prnumber) + buildScan.link('Pull request', System.env.GITHUB_SERVER_URL + '/' + System.env.GITHUB_REPOSITORY + '/pull/' + prNumber ) } - buildScan.buildScanPublished { publishedBuildScan -> - new File(System.env.GITHUB_STEP_SUMMARY).withWriterAppend { out -> - out.println("\n[Build scan for '${mvnCommand}' in ${jobName}](${publishedBuildScan.buildScanUri})\n") + buildScan.buildScanPublished { publishedBuildScan -> { + File target = new File("target") + if (!target.exists()) { + target.mkdir() + } + File gradleBuildScanUrlFile = new File("target/gradle-build-scan-url.txt") + if (!gradleBuildScanUrlFile.exists()) { + gradleBuildScanUrlFile.withWriter { out -> + out.print(publishedBuildScan.buildScanUri) + } + } + new File(System.env.GITHUB_STEP_SUMMARY).withWriterAppend { out -> + out.println("\n[Build scan](${publishedBuildScan.buildScanUri})\n`${mvnCommand}`\n\n") + } } } } diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml index f0f8f8d497fd5..aad218a164217 100644 --- a/.mvn/gradle-enterprise.xml +++ b/.mvn/gradle-enterprise.xml @@ -1,8 +1,8 @@ - https://ge.quarkus.io - false - + https://ge.quarkus.io + false + + + java + + + python + + + scala + + + groovy + + + javascript + + + json + + + kotlin + + + cpp + + + antlr4 + + + sql + + + typescript + + + yaml + + + pom + + + markdown + + + + + + buildDir + + + check should only run when inputs change + + + + - diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 61df37ed77654..62f8b94e1aea3 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -100,7 +100,7 @@ - + maven-compiler-plugin diff --git a/update-extension-dependencies.sh b/update-extension-dependencies.sh index 20c8c8fa29339..0751e0a7abebc 100755 --- a/update-extension-dependencies.sh +++ b/update-extension-dependencies.sh @@ -14,7 +14,7 @@ then echo '' echo 'Building bom-descriptor-json...' echo '' - mvn -q -e clean package -f "${PRG_PATH}/devtools/bom-descriptor-json" -Denforcer.skip $* + mvn -q -e -Dscan=false clean package -f "${PRG_PATH}/devtools/bom-descriptor-json" -Denforcer.skip $* else read -n1 -p 'Build the entire project with relocations? [y/n] ' ANSWER echo '' @@ -23,7 +23,7 @@ else echo '' echo 'Building entire project with relocations...' echo '' - mvn -q -e -Dquickly -Dno-test-modules -Prelocations -T0.8C -f "${PRG_PATH}" $* + mvn -q -e -Dscan=false -Dquickly -Dno-test-modules -Prelocations -T0.8C -f "${PRG_PATH}" $* else echo '' echo 'Aborted!' @@ -108,7 +108,7 @@ echo '' echo 'Sanity check...' echo '' # sanity check; make sure nothing stupid was added like non-existing deps -mvn dependency:resolve validate -Dsilent -q -f "${PRG_PATH}" -pl devtools/bom-descriptor-json,docs $* +mvn -Dscan=false dependency:resolve validate -Dsilent -q -f "${PRG_PATH}" -pl devtools/bom-descriptor-json,docs $* # CI only: verify that no pom.xml was touched (if changes are found, committer forgot to run script or to add changes) if [ "${CI:-}" == true ] && [ $(git status -s -u no '*pom.xml' | wc -l) -ne 0 ]