mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bdd871935 | ||
|
|
34d6b69184 | ||
|
|
21ecf4fc5b | ||
|
|
d9b1f176ee | ||
|
|
5c7e362ae3 | ||
|
|
4213e7826a | ||
|
|
59d7e81070 | ||
|
|
bc78598590 | ||
|
|
9934046c6d | ||
|
|
3839b20885 | ||
|
|
b8ed6d0a14 | ||
|
|
eda5a3331f | ||
|
|
e0281833fa | ||
|
|
b8d9a58677 | ||
|
|
ec885c4918 | ||
|
|
8be3454330 | ||
|
|
f25f0d469f | ||
|
|
69215f1c52 | ||
|
|
df34468a37 | ||
|
|
f984dd99ad | ||
|
|
aef30aae52 | ||
|
|
4c8d89b23d | ||
|
|
088ea2ca03 | ||
|
|
94bb6cf7ce | ||
|
|
ed3e5e5c8a | ||
|
|
ef2fae3749 | ||
|
|
97d952f5cd | ||
|
|
c4b167c4e2 | ||
|
|
7e2474009a | ||
|
|
d0ca1a2b26 | ||
|
|
37bb14cb36 | ||
|
|
06e95bfb12 | ||
|
|
6089ee95bf | ||
|
|
b80eee1bc3 | ||
|
|
51109c9e9e | ||
|
|
bb85ec9597 | ||
|
|
e9e94d8112 | ||
|
|
686515ed83 | ||
|
|
fc2804f7b6 | ||
|
|
ce25fde741 | ||
|
|
1c71d2134f | ||
|
|
35af9b8791 | ||
|
|
375738a38b | ||
|
|
00781cbaae | ||
|
|
2894ab49ef | ||
|
|
4ba34e96c5 | ||
|
|
e29bc6725a | ||
|
|
cc4fc85e6b | ||
|
|
e6a814661a | ||
|
|
e55599fc4d | ||
|
|
d85b0068a7 | ||
|
|
a09a3104fe | ||
|
|
333e9d9750 | ||
|
|
2aa49bf6a9 | ||
|
|
9ab6ee6757 | ||
|
|
fb5165dcd4 | ||
|
|
0e27ea7e6c | ||
|
|
f4845d289c | ||
|
|
094f2191c5 | ||
|
|
83709b49fe | ||
|
|
5f21a9bb99 | ||
|
|
52ee405746 | ||
|
|
7f20d0bf71 | ||
|
|
b6bc8c2f17 | ||
|
|
b12c3a65f2 | ||
|
|
d191577859 | ||
|
|
e726a12472 | ||
|
|
d30cc9ecf2 | ||
|
|
d0efa7b0e7 | ||
|
|
8422a6a674 | ||
|
|
19ff74e0a6 | ||
|
|
e03a1f068e | ||
|
|
084b95f65a | ||
|
|
1e2142185e | ||
|
|
07e0f1c008 | ||
|
|
af45dcfe3c | ||
|
|
d8b3a9fb11 | ||
|
|
9e8f2bcf56 | ||
|
|
5ac3e361a2 | ||
|
|
4a0951b3dc | ||
|
|
48353a25ca |
4
.github/actions/build-dist/action.yml
vendored
4
.github/actions/build-dist/action.yml
vendored
@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -23,7 +23,7 @@ runs:
|
|||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
|
|
||||||
- name: Upload distribution
|
- name: Upload distribution
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
4
.github/actions/init-integ-test/action.yml
vendored
4
.github/actions/init-integ-test/action.yml
vendored
@@ -4,7 +4,7 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 11
|
java-version: 11
|
||||||
@@ -17,7 +17,7 @@ runs:
|
|||||||
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
||||||
- name: Download dist
|
- name: Download dist
|
||||||
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
|
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
75
.github/dependabot.yml
vendored
75
.github/dependabot.yml
vendored
@@ -5,6 +5,7 @@ registries:
|
|||||||
url: https://plugins.gradle.org/m2
|
url: https://plugins.gradle.org/m2
|
||||||
username: dummy # Required by dependabot
|
username: dummy # Required by dependabot
|
||||||
password: dummy # Required by dependabot
|
password: dummy # Required by dependabot
|
||||||
|
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/sources"
|
directory: "/sources"
|
||||||
@@ -16,25 +17,12 @@ updates:
|
|||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
# github-actions with directory: "/" only monitors .github/workflows
|
||||||
schedule:
|
# https://github.com/dependabot/dependabot-core/issues/6345
|
||||||
interval: "weekly"
|
directories:
|
||||||
groups:
|
- "/"
|
||||||
github-actions:
|
- "/.github/actions/build-dist"
|
||||||
patterns:
|
- "/.github/actions/init-integ-test"
|
||||||
- "*"
|
|
||||||
# github-actions with directory: "/" only monitors .github/workflows
|
|
||||||
# https://github.com/dependabot/dependabot-core/issues/6345
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/.github/actions/build-dist"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
groups:
|
|
||||||
github-actions:
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/.github/actions/init-integ-test"
|
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
groups:
|
groups:
|
||||||
@@ -43,44 +31,19 @@ updates:
|
|||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
- package-ecosystem: "gradle"
|
- package-ecosystem: "gradle"
|
||||||
directory: ".github/workflow-samples/gradle-plugin"
|
directories:
|
||||||
registries:
|
- ".github/workflow-samples/gradle-plugin"
|
||||||
- gradle-plugin-portal
|
- ".github/workflow-samples/groovy-dsl"
|
||||||
schedule:
|
- ".github/workflow-samples/java-toolchain"
|
||||||
interval: "weekly"
|
- ".github/workflow-samples/kotlin-dsl"
|
||||||
- package-ecosystem: "gradle"
|
- ".github/workflow-samples/no-wrapper"
|
||||||
directory: ".github/workflow-samples/groovy-dsl"
|
- ".github/workflow-samples/no-wrapper-gradle-5"
|
||||||
registries:
|
- "sources/test/init-scripts"
|
||||||
- gradle-plugin-portal
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
- package-ecosystem: "gradle"
|
|
||||||
directory: ".github/workflow-samples/java-toolchain"
|
|
||||||
registries:
|
|
||||||
- gradle-plugin-portal
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
- package-ecosystem: "gradle"
|
|
||||||
directory: ".github/workflow-samples/kotlin-dsl"
|
|
||||||
registries:
|
|
||||||
- gradle-plugin-portal
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
- package-ecosystem: "gradle"
|
|
||||||
directory: ".github/workflow-samples/no-wrapper"
|
|
||||||
registries:
|
|
||||||
- gradle-plugin-portal
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
- package-ecosystem: "gradle"
|
|
||||||
directory: ".github/workflow-samples/no-wrapper-gradle-5"
|
|
||||||
registries:
|
|
||||||
- gradle-plugin-portal
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
- package-ecosystem: "gradle"
|
|
||||||
directory: "sources/test/init-scripts"
|
|
||||||
registries:
|
registries:
|
||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
groups:
|
||||||
|
gradle:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.18.1"
|
id "com.gradle.develocity" version "3.19"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("org.apache.commons:commons-math3:3.6.1")
|
api("org.apache.commons:commons-math3:3.6.1")
|
||||||
implementation("com.google.guava:guava:33.3.1-jre")
|
implementation("com.google.guava:guava:33.4.0-jre")
|
||||||
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.gradle.develocity") version "3.18.1"
|
id("com.gradle.develocity") version "3.19"
|
||||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.1"
|
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.18.1"
|
id "com.gradle.develocity" version "3.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.18.1"
|
id "com.gradle.develocity" version "3.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.18.1"
|
id "com.gradle.develocity" version "3.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
11
.github/workflows/ci-check-and-unit-test.yml
vendored
11
.github/workflows/ci-check-and-unit-test.yml
vendored
@@ -17,22 +17,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: sources/package-lock.json
|
cache-dependency-path: sources/package-lock.json
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
|
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
|
||||||
env:
|
env:
|
||||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
with:
|
with:
|
||||||
gradle-version: "8.11"
|
gradle-version: "8.11.1"
|
||||||
|
|
||||||
- name: Check formatting and compile
|
- name: Check formatting and compile
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm clean-install
|
||||||
npm run check
|
npm run check
|
||||||
npm run compile
|
npm run compile
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
dist/**
|
dist/**
|
||||||
|
|||||||
13
.github/workflows/ci-codeql.yml
vendored
13
.github/workflows/ci-codeql.yml
vendored
@@ -6,16 +6,15 @@ on:
|
|||||||
- 'main'
|
- 'main'
|
||||||
- 'release/**'
|
- 'release/**'
|
||||||
- 'dev/**' # Allow running Code QL on dev branches without a PR
|
- 'dev/**' # Allow running Code QL on dev branches without a PR
|
||||||
paths-ignore:
|
|
||||||
- 'dist/**'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
paths-ignore:
|
|
||||||
- 'dist/**'
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '25 23 * * 2'
|
- cron: '25 23 * * 2'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
@@ -32,11 +31,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
config: |
|
config: |
|
||||||
@@ -44,4 +43,4 @@ jobs:
|
|||||||
- sources/src
|
- sources/src
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
||||||
|
|||||||
24
.github/workflows/ci-combine-bot-prs.yml
vendored
Normal file
24
.github/workflows/ci-combine-bot-prs.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Combine Bot PRs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
combine-wrapperbot-prs:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
checks: read
|
||||||
|
if: github.repository == 'gradle/actions'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: combine-wrapperbot-prs
|
||||||
|
uses: github/combine-prs@2909f404763c3177a456e052bdb7f2e85d3a7cb3 # v5.2.0
|
||||||
|
with:
|
||||||
|
branch_prefix: wrapperbot
|
||||||
|
combine_branch_name: wrapperbot/combined-wrapper-updates
|
||||||
|
pr_title: 'Bump Gradle Wrappers'
|
||||||
|
ci_required: "false"
|
||||||
10
.github/workflows/ci-init-script-check.yml
vendored
10
.github/workflows/ci-init-script-check.yml
vendored
@@ -14,19 +14,23 @@ on:
|
|||||||
- 'sources/test/init-scripts/**'
|
- 'sources/test/init-scripts/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-init-scripts:
|
test-init-scripts:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
|
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
|
||||||
env:
|
env:
|
||||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
|
|||||||
8
.github/workflows/ci-integ-test-full.yml
vendored
8
.github/workflows/ci-integ-test-full.yml
vendored
@@ -6,13 +6,13 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: integ-test
|
group: integ-test
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
caching-integ-tests:
|
caching-integ-tests:
|
||||||
uses: ./.github/workflows/suite-integ-test-caching.yml
|
uses: ./.github/workflows/suite-integ-test-caching.yml
|
||||||
@@ -25,6 +25,8 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
other-integ-tests:
|
other-integ-tests:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||||
concurrency:
|
concurrency:
|
||||||
group: CI-integ-test-full
|
group: CI-integ-test-full
|
||||||
|
|||||||
10
.github/workflows/ci-integ-test.yml
vendored
10
.github/workflows/ci-integ-test.yml
vendored
@@ -11,19 +11,19 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: integ-test
|
group: integ-test
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
|
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
@@ -36,6 +36,8 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
other-integ-tests:
|
other-integ-tests:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||||
with:
|
with:
|
||||||
|
|||||||
57
.github/workflows/ci-ossf-scorecard.yml
vendored
Normal file
57
.github/workflows/ci-ossf-scorecard.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: CI-ossf-scorecard
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * 1'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analysis:
|
||||||
|
name: Scorecard analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
# Needed to upload the results to code-scanning dashboard.
|
||||||
|
security-events: write
|
||||||
|
# Needed to publish results and get a badge (see publish_results below).
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout code'
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
|
- name: 'Run analysis'
|
||||||
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||||
|
with:
|
||||||
|
results_file: results.sarif
|
||||||
|
results_format: sarif
|
||||||
|
|
||||||
|
# Public repositories:
|
||||||
|
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||||
|
# - Allows the repository to include the Scorecard badge.
|
||||||
|
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||||
|
# For private repositories:
|
||||||
|
# - `publish_results` will always be set to `false`, regardless
|
||||||
|
# of the value entered here.
|
||||||
|
publish_results: true
|
||||||
|
|
||||||
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||||
|
# format to the repository Actions tab.
|
||||||
|
- name: 'Upload artifact'
|
||||||
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
|
with:
|
||||||
|
name: SARIF file
|
||||||
|
path: results.sarif
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
|
- name: 'Upload to code-scanning'
|
||||||
|
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
||||||
|
with:
|
||||||
|
sarif_file: results.sarif
|
||||||
16
.github/workflows/ci-update-dist.yml
vendored
16
.github/workflows/ci-update-dist.yml
vendored
@@ -10,19 +10,24 @@ on:
|
|||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-dist:
|
update-dist:
|
||||||
|
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
|
||||||
|
# it would erroneously update `dist` on their branch (and the pull request)
|
||||||
|
if: github.repository == 'gradle/actions'
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -43,10 +48,7 @@ jobs:
|
|||||||
# Important: The push event will not trigger any other workflows, see
|
# Important: The push event will not trigger any other workflows, see
|
||||||
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
|
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
|
||||||
- name: Commit & push changes
|
- name: Commit & push changes
|
||||||
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
|
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
|
||||||
# it would erroneously update `dist` on their branch (and the pull request)
|
|
||||||
if: github.repository == 'gradle/actions'
|
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
|
||||||
with:
|
with:
|
||||||
commit_message: '[bot] Update dist directory'
|
commit_message: '[bot] Update dist directory'
|
||||||
file_pattern: dist
|
file_pattern: dist
|
||||||
|
|||||||
17
.github/workflows/ci-validate-wrappers.yml
vendored
Normal file
17
.github/workflows/ci-validate-wrappers.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: CI-validate-wrappers
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
|
||||||
|
with:
|
||||||
|
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||||
13
.github/workflows/demo-job-summary.yml
vendored
13
.github/workflows/demo-job-summary.yml
vendored
@@ -3,12 +3,15 @@ name: Demo Job Summary, for Gradle builds
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
|
|
||||||
@@ -17,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -59,7 +62,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -79,7 +82,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -100,7 +103,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
16
.github/workflows/demo-pr-build-scan-comment.yml
vendored
16
.github/workflows/demo-pr-build-scan-comment.yml
vendored
@@ -4,23 +4,25 @@ on:
|
|||||||
types: [assigned, review_requested]
|
types: [assigned, review_requested]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
|
|
||||||
successful-build-with-always-comment:
|
successful-build-with-always-comment:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -34,11 +36,13 @@ jobs:
|
|||||||
run: ./gradlew build --scan
|
run: ./gradlew build --scan
|
||||||
|
|
||||||
successful-build-with-comment-on-failure:
|
successful-build-with-comment-on-failure:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -52,11 +56,13 @@ jobs:
|
|||||||
run: ./gradlew build --scan
|
run: ./gradlew build --scan
|
||||||
|
|
||||||
failing-build-with-comment-on-failure:
|
failing-build-with-comment-on-failure:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-scan-publish:
|
build-scan-publish:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -27,15 +30,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 11
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -51,7 +49,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ env:
|
|||||||
# Requires a fresh cache entry each run
|
# Requires a fresh cache entry each run
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cache-cleanup-full-build:
|
cache-cleanup-full-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -28,7 +31,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -51,7 +54,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -74,7 +77,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
19
.github/workflows/integ-test-caching-config.yml
vendored
19
.github/workflows/integ-test-caching-config.yml
vendored
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
caching-config-seed-build:
|
caching-config-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -58,7 +61,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -87,7 +90,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -101,7 +104,7 @@ jobs:
|
|||||||
run: ./gradlew help
|
run: ./gradlew help
|
||||||
- name: Check Build Scan url is captured
|
- name: Check Build Scan url is captured
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -111,7 +114,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -125,7 +128,7 @@ jobs:
|
|||||||
run: ./gradlew help
|
run: ./gradlew help
|
||||||
- name: Check Build Scan url is captured
|
- name: Check Build Scan url is captured
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -142,7 +145,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -166,7 +169,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -13,20 +13,20 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-graph-groovy-upload:
|
dependency-graph-groovy-upload:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -39,11 +39,13 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
dependency-graph-groovy-submit:
|
dependency-graph-groovy-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-graph-groovy-upload]
|
needs: [dependency-graph-groovy-upload]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -55,10 +57,12 @@ jobs:
|
|||||||
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
|
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
|
||||||
|
|
||||||
dependency-graph-kotlin-generate-and-submit:
|
dependency-graph-kotlin-generate-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -71,10 +75,12 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
|
||||||
dependency-graph-multiple-builds:
|
dependency-graph-multiple-builds:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -112,10 +118,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-graph-config-cache:
|
dependency-graph-config-cache:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,15 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-submission-failures-failing-build:
|
dependency-submission-failures-failing-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -52,7 +55,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -83,7 +86,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -13,16 +13,18 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-submission-groovy-generate-and-upload:
|
dependency-submission-groovy-generate-and-upload:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -31,7 +33,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -45,6 +47,8 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
||||||
|
|
||||||
dependency-submission-groovy-restore-cache:
|
dependency-submission-groovy-restore-cache:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-submission-groovy-generate-and-upload]
|
needs: [dependency-submission-groovy-generate-and-upload]
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
@@ -54,7 +58,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -67,6 +71,8 @@ jobs:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
|
||||||
|
|
||||||
dependency-submission-groovy-download-and-submit:
|
dependency-submission-groovy-download-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-submission-groovy-generate-and-upload]
|
needs: [dependency-submission-groovy-generate-and-upload]
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
@@ -76,7 +82,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -88,6 +94,8 @@ jobs:
|
|||||||
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
|
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
|
||||||
|
|
||||||
dependency-submission-kotlin-generate-and-submit:
|
dependency-submission-kotlin-generate-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -96,7 +104,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -106,6 +114,8 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/kotlin-dsl
|
build-root-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
|
||||||
dependency-submission-multiple-builds:
|
dependency-submission-multiple-builds:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -114,7 +124,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -152,6 +162,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-multiple-builds-upload:
|
dependency-submission-multiple-builds-upload:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -160,7 +172,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -176,10 +188,12 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
dependency-submission-config-cache:
|
dependency-submission-config-cache:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -211,6 +225,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-gradle-versions:
|
dependency-submission-gradle-versions:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -224,7 +240,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -235,10 +251,12 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
|
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
|
||||||
|
|
||||||
dependency-submission-with-setup-gradle:
|
dependency-submission-with-setup-gradle:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -270,10 +288,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-with-includes-and-excludes:
|
dependency-submission-with-includes-and-excludes:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -304,6 +324,8 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
dependency-submission-custom-report-dir-submit:
|
dependency-submission-custom-report-dir-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -312,7 +334,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -339,10 +361,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dependency-submission-custom-report-dir-upload:
|
dependency-submission-custom-report-dir-upload:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -355,11 +379,13 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
custom-report-dir-download-and-submit:
|
custom-report-dir-download-and-submit:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: [dependency-submission-custom-report-dir-upload]
|
needs: [dependency-submission-custom-report-dir-upload]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Test that pre-installed runner JDKs are detected
|
# Test that pre-installed runner JDKs are detected
|
||||||
detect-toolchains-pre-installed-jdks:
|
detect-toolchains-pre-installed-jdks:
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -57,17 +60,17 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java 20
|
- name: Setup Java 20
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 20
|
java-version: 20
|
||||||
- name: Setup Java 16
|
- name: Setup Java 16
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 16
|
java-version: 16
|
||||||
|
|||||||
@@ -20,38 +20,36 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
inject-develocity:
|
inject-develocity:
|
||||||
env:
|
env:
|
||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
|
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
|
||||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [3.16.2, 3.18.1]
|
plugin-version: [3.16.2, 3.19]
|
||||||
include:
|
include:
|
||||||
- plugin-version: 3.16.2
|
- plugin-version: 3.16.2
|
||||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||||
- plugin-version: 3.18.1
|
- plugin-version: 3.19
|
||||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 11
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -64,7 +62,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -78,24 +76,19 @@ jobs:
|
|||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
||||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [3.16.2, 3.18.1]
|
plugin-version: [3.16.2, 3.19]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -114,7 +107,7 @@ jobs:
|
|||||||
run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
|
run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
@@ -124,7 +117,7 @@ jobs:
|
|||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: 'https://localhost:3333/'
|
DEVELOCITY_URL: 'https://localhost:3333/'
|
||||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0'
|
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
|
||||||
# Access key also set as an env var, we want to check it does not leak
|
# Access key also set as an env var, we want to check it does not leak
|
||||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||||
@@ -133,19 +126,14 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [ 3.16.2, 3.18.1 ]
|
plugin-version: [ 3.16.2, 3.19 ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -169,18 +157,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [ 3.16.2, 3.18.1 ]
|
plugin-version: [ 3.16.2, 3.19 ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
@@ -196,7 +179,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Tests for executing with different Gradle versions.
|
# Tests for executing with different Gradle versions.
|
||||||
# Each build verifies that it is executed with the expected Gradle version.
|
# Each build verifies that it is executed with the expected Gradle version.
|
||||||
@@ -30,7 +33,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -66,7 +69,7 @@ jobs:
|
|||||||
run: gradle help
|
run: gradle help
|
||||||
- name: Check current version output parameter
|
- name: Check current version output parameter
|
||||||
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }}
|
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
|
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
|
||||||
@@ -75,7 +78,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
gradle: ["8.10", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
|
gradle: ["8.11.1", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
include:
|
include:
|
||||||
- java-version: 11
|
- java-version: 11
|
||||||
@@ -92,12 +95,12 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
@@ -109,7 +112,7 @@ jobs:
|
|||||||
gradle-version: ${{ matrix.gradle }}
|
gradle-version: ${{ matrix.gradle }}
|
||||||
- name: Check output parameter
|
- name: Check output parameter
|
||||||
if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
|
if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')
|
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')
|
||||||
@@ -119,7 +122,7 @@ jobs:
|
|||||||
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
|
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
|
||||||
- name: Check Build Scan url
|
- name: Check Build Scan url
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-cc-seed-build-groovy:
|
restore-cc-seed-build-groovy:
|
||||||
env:
|
env:
|
||||||
@@ -32,22 +35,16 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
cache-write-only: true # Ensure we start with a clean cache entry
|
cache-write-only: true # Ensure we start with a clean cache entry
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Groovy build with configuration-cache enabled
|
- name: Groovy build with configuration-cache enabled
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: gradle test --configuration-cache
|
run: gradle test --configuration-cache
|
||||||
@@ -65,22 +62,16 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false
|
cache-read-only: false
|
||||||
cache-cleanup: on-success
|
cache-cleanup: on-success
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Groovy build with configuration-cache enabled
|
- name: Groovy build with configuration-cache enabled
|
||||||
id: execute
|
id: execute
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
@@ -107,21 +98,15 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Groovy build with configuration-cache enabled
|
- name: Groovy build with configuration-cache enabled
|
||||||
id: execute
|
id: execute
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
@@ -148,15 +133,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle with no extracted cache entries restored
|
- name: Setup Gradle with no extracted cache entries restored
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
env:
|
env:
|
||||||
@@ -164,7 +144,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Check execute Gradle build with configuration cache enabled (but not restored)
|
- name: Check execute Gradle build with configuration cache enabled (but not restored)
|
||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: gradle test --configuration-cache
|
run: gradle test --configuration-cache
|
||||||
@@ -180,22 +159,16 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
cache-write-only: true # Ensure we start with a clean cache entry
|
cache-write-only: true # Ensure we start with a clean cache entry
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Execute 'help' with configuration-cache enabled
|
- name: Execute 'help' with configuration-cache enabled
|
||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
run: gradle help --configuration-cache
|
run: gradle help --configuration-cache
|
||||||
@@ -213,21 +186,15 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Execute 'test' with configuration-cache enabled
|
- name: Execute 'test' with configuration-cache enabled
|
||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
run: gradle test --configuration-cache
|
run: gradle test --configuration-cache
|
||||||
@@ -246,21 +213,15 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
- name: Setup Java to ensure consistency
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
gradle-version: 8.6
|
|
||||||
- name: Execute 'test' again with configuration-cache enabled
|
- name: Execute 'test' again with configuration-cache enabled
|
||||||
id: execute
|
id: execute
|
||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
|
|||||||
@@ -14,13 +14,16 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-containerized-seed-build:
|
restore-containerized-seed-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: fedora:latest
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ jobs:
|
|||||||
container: fedora:latest
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,15 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-custom-gradle-home-seed-build:
|
restore-custom-gradle-home-seed-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -41,7 +44,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -63,7 +66,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-gradle-home-seed-build:
|
restore-gradle-home-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -28,7 +31,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -51,7 +54,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -74,7 +77,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -97,7 +100,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -122,7 +125,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
restore-java-toolchain-seed-build:
|
restore-java-toolchain-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -50,7 +53,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sample-gradle-plugin-seed-build:
|
sample-gradle-plugin-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -49,7 +52,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ env:
|
|||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sample-kotlin-dsl-seed-build:
|
sample-kotlin-dsl-seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -49,7 +52,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
SKIP_DIST: ${{ inputs.skip-dist }}
|
SKIP_DIST: ${{ inputs.skip-dist }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wrapper-validation-setup-gradle:
|
wrapper-validation-setup-gradle:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -22,7 +25,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -45,7 +48,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -74,7 +77,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -107,7 +110,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Initialize integ-test
|
- name: Initialize integ-test
|
||||||
uses: ./.github/actions/init-integ-test
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
@@ -137,7 +140,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4 # Checkout the repository with no wrappers
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Checkout the repository with no wrappers
|
||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
.github/actions
|
.github/actions
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||||
|
|||||||
3
.github/workflows/suite-integ-test-other.yml
vendored
3
.github/workflows/suite-integ-test-other.yml
vendored
@@ -10,6 +10,9 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-scan-publish:
|
build-scan-publish:
|
||||||
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||||
|
|||||||
14
.github/workflows/update-checksums-file.yml
vendored
14
.github/workflows/update-checksums-file.yml
vendored
@@ -7,20 +7,22 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-checksums:
|
update-checksums:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
name: Update checksums
|
name: Update checksums
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -28,7 +30,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm install typed-rest-client@1.8.11 --no-save
|
npm clean-install typed-rest-client@1.8.11 --no-save
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
|
|
||||||
- name: Update checksums file
|
- name: Update checksums file
|
||||||
@@ -37,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
# If there are no changes, this action will not create a pull request
|
# If there are no changes, this action will not create a pull request
|
||||||
- name: Create or update pull request
|
- name: Create or update pull request
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
|
||||||
with:
|
with:
|
||||||
branch: bot/wrapper-checksums-update
|
branch: bot/wrapper-checksums-update
|
||||||
commit-message: Update known wrapper checksums
|
commit-message: Update known wrapper checksums
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
The `build` script in the project root provides a convenient way to perform many local build tasks:
|
The `build` script in the project root provides a convenient way to perform many local build tasks:
|
||||||
1. `./build` will lint and compile typescript sources
|
1. `./build` will lint and compile typescript sources
|
||||||
2. `./build all` will lint and compile typescript and run unit tests
|
2. `./build all` will lint and compile typescript and run unit tests
|
||||||
3. `./build init-scripts` will run the init-script integration tests
|
3. `./build install` will install npm packages followed by lint and compile
|
||||||
4. `./build act <act-commands>` will run `act` after building local changes (see below)
|
4. `./build init-scripts` will run the init-script integration tests
|
||||||
|
5. `./build act <act-commands>` will run `act` after building local changes (see below)
|
||||||
|
|
||||||
## Using `act` to run integ-test workflows locally
|
## Using `act` to run integ-test workflows locally
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# GitHub Actions for Gradle builds
|
# GitHub Actions for Gradle builds
|
||||||
|
|
||||||
|
[](https://scorecard.dev/viewer/?uri=github.com/gradle/actions)
|
||||||
|
|
||||||
This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub.
|
This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub.
|
||||||
|
|
||||||
## The `setup-gradle` action
|
## The `setup-gradle` action
|
||||||
|
|||||||
17
build
17
build
@@ -4,12 +4,10 @@ cd sources
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
npm clean-install
|
|
||||||
npm run all
|
npm run all
|
||||||
;;
|
;;
|
||||||
act)
|
act)
|
||||||
# Build and copy outputs to the dist directory
|
# Build and copy outputs to the dist directory
|
||||||
npm install
|
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
@@ -18,18 +16,21 @@ case "$1" in
|
|||||||
# Revert the changes to the dist directory
|
# Revert the changes to the dist directory
|
||||||
git checkout -- dist
|
git checkout -- dist
|
||||||
;;
|
;;
|
||||||
init-scripts)
|
|
||||||
cd test/init-scripts
|
|
||||||
./gradlew check
|
|
||||||
;;
|
|
||||||
dist)
|
dist)
|
||||||
npm install
|
npm clean-install
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
;;
|
;;
|
||||||
|
init-scripts)
|
||||||
|
cd test/init-scripts
|
||||||
|
./gradlew check
|
||||||
|
;;
|
||||||
|
install)
|
||||||
|
npm clean-install
|
||||||
|
npm run build
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
npm install
|
|
||||||
npm run build
|
npm run build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
3339
dist/dependency-submission/main/index.js
vendored
3339
dist/dependency-submission/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dependency-submission/main/index.js.map
vendored
2
dist/dependency-submission/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
9973
dist/dependency-submission/post/index.js
vendored
9973
dist/dependency-submission/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dependency-submission/post/index.js.map
vendored
2
dist/dependency-submission/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
3339
dist/setup-gradle/main/index.js
vendored
3339
dist/setup-gradle/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
3339
dist/setup-gradle/post/index.js
vendored
3339
dist/setup-gradle/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
9548
dist/wrapper-validation/main/index.js
vendored
9548
dist/wrapper-validation/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/wrapper-validation/main/index.js.map
vendored
2
dist/wrapper-validation/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -276,7 +276,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
|
|||||||
uses: gradle/actions/dependency-submission@v4
|
uses: gradle/actions/dependency-submission@v4
|
||||||
with:
|
with:
|
||||||
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
||||||
dependency-graph-exclude-projets: ':buildSrc'
|
dependency-graph-exclude-projects: ':buildSrc'
|
||||||
# Exclude dependencies that are only resolved in test classpaths
|
# Exclude dependencies that are only resolved in test classpaths
|
||||||
dependency-graph-exclude-configurations: '.*[Tt]est(Compile|Runtime)Classpath'
|
dependency-graph-exclude-configurations: '.*[Tt]est(Compile|Runtime)Classpath'
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
|||||||
- name: Setup Gradle for a non-wrapper project
|
- name: Setup Gradle for a non-wrapper project
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: "8.10"
|
gradle-version: "8.11"
|
||||||
|
|
||||||
- name: Assemble the project
|
- name: Assemble the project
|
||||||
run: gradle assemble
|
run: gradle assemble
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ cache-disabled: true
|
|||||||
|
|
||||||
By default, The `setup-gradle` action will only write to the cache from Jobs on the default (`main`/`master`) branch.
|
By default, The `setup-gradle` action will only write to the cache from Jobs on the default (`main`/`master`) branch.
|
||||||
Jobs on other branches will read entries from the cache but will not write updated entries.
|
Jobs on other branches will read entries from the cache but will not write updated entries.
|
||||||
|
|
||||||
|
This setup is designed around [GitHub imposed restrictions on cache access](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache) and should work well in most scenarios.
|
||||||
See [Optimizing cache effectiveness](#select-which-branches-should-write-to-the-cache) for a more detailed explanation.
|
See [Optimizing cache effectiveness](#select-which-branches-should-write-to-the-cache) for a more detailed explanation.
|
||||||
|
|
||||||
In some circumstances, it makes sense to change this default and configure a workflow Job to read existing cache entries but not to write changes back.
|
In some circumstances, it makes sense to change this default and configure a workflow Job to read existing cache entries but not to write changes back.
|
||||||
@@ -196,6 +198,9 @@ When Gradle is executed with the [configuration-cache](https://docs.gradle.org/c
|
|||||||
in the project directory, at `<project-dir>/.gradle/configuration-cache`. Due to the way the configuration-cache works, [this file may contain stored credentials and other
|
in the project directory, at `<project-dir>/.gradle/configuration-cache`. Due to the way the configuration-cache works, [this file may contain stored credentials and other
|
||||||
secrets](https://docs.gradle.org/release-nightly/userguide/configuration_cache.html#config_cache:secrets), and this data needs to be encrypted to be safely stored in the GitHub Actions cache.
|
secrets](https://docs.gradle.org/release-nightly/userguide/configuration_cache.html#config_cache:secrets), and this data needs to be encrypted to be safely stored in the GitHub Actions cache.
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> To avoid potentially leaking secrets in the configuration-cache entry, the action will only save or restore configuration-cache data if the `cache-encryption-key` parameter is set.
|
||||||
|
|
||||||
To benefit from configuration caching in your GitHub Actions workflow, you must:
|
To benefit from configuration caching in your GitHub Actions workflow, you must:
|
||||||
- Execute your build with Gradle 8.6 or newer. This can be achieved directly or via the Gradle Wrapper.
|
- Execute your build with Gradle 8.6 or newer. This can be achieved directly or via the Gradle Wrapper.
|
||||||
- Enable the configuration cache for your build.
|
- Enable the configuration cache for your build.
|
||||||
@@ -220,7 +225,10 @@ jobs:
|
|||||||
- run: gradle build --configuration-cache
|
- run: gradle build --configuration-cache
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!IMPORTANT]
|
Even with everything correctly configured, you may find that the configuration-cache entry is not reused in your workflow.
|
||||||
|
This is often due to a known issue: [Included builds containing build logic prevent configuration-cache reuse](https://github.com/gradle/actions/issues/21). Refer to the issue for more details.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
> The configuration cache cannot be saved or restored in workflows triggered by a pull requests from a repository fork.
|
> The configuration cache cannot be saved or restored in workflows triggered by a pull requests from a repository fork.
|
||||||
> This is because [GitHub secrets are not passed to workflows triggered by PRs from forks](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow).
|
> This is because [GitHub secrets are not passed to workflows triggered by PRs from forks](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow).
|
||||||
> This prevents a malicious PR from reading the configuration-cache data, which may encode secrets read by Gradle.
|
> This prevents a malicious PR from reading the configuration-cache data, which may encode secrets read by Gradle.
|
||||||
@@ -841,7 +849,7 @@ Here's a minimal example:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
This configuration will automatically apply `v3.18.1` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
This configuration will automatically apply `v3.19` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
||||||
|
|
||||||
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
||||||
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
|
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
|
||||||
@@ -907,7 +915,7 @@ Here's an example using the env vars:
|
|||||||
DEVELOCITY_INJECTION_ENABLED: true
|
DEVELOCITY_INJECTION_ENABLED: true
|
||||||
DEVELOCITY_URL: https://develocity.your-server.com
|
DEVELOCITY_URL: https://develocity.your-server.com
|
||||||
DEVELOCITY_ENFORCE_URL: true
|
DEVELOCITY_ENFORCE_URL: true
|
||||||
DEVELOCITY_PLUGIN_VERSION: "3.18.1"
|
DEVELOCITY_PLUGIN_VERSION: "3.19"
|
||||||
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
|
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ A wrapper jar can fail validation for a few reasons:
|
|||||||
1. The wrapper is from a snapshot build of Gradle (nightly or release nightly) and you have not set `allow-snapshots`
|
1. The wrapper is from a snapshot build of Gradle (nightly or release nightly) and you have not set `allow-snapshots`
|
||||||
or `allow-snapshot-wrappers` to `true`.
|
or `allow-snapshot-wrappers` to `true`.
|
||||||
2. The wrapper jar is from a version of Gradle with an unverifiable wrapper jar (see below).
|
2. The wrapper jar is from a version of Gradle with an unverifiable wrapper jar (see below).
|
||||||
3. The wrapper jar was not published by Gradle, and could be compromised.
|
3. The wrapper jar is saved in Git LFS, and has not been correctly restored on checkout (see below).
|
||||||
|
4. The wrapper jar was not published by Gradle, and could be compromised.
|
||||||
|
|
||||||
If this GitHub action fails because a `gradle-wrapper.jar` was not published by Gradle,
|
If this GitHub action fails because a `gradle-wrapper.jar` was not published by Gradle,
|
||||||
we highly recommend that you reach out to us at [security@gradle.com](mailto:security@gradle.com).
|
we highly recommend that you reach out to us at [security@gradle.com](mailto:security@gradle.com).
|
||||||
@@ -113,6 +114,17 @@ Wrapper Jars generated by Gradle versions `3.3` to `4.0` are not verifiable beca
|
|||||||
- If the Gradle version in `gradle-wrapper.properties` is outside of this range, you can regenerate the `gradle-wrapper.jar` by running `./gradlew wrapper`. This will generate a new, verifiable wrapper jar.
|
- If the Gradle version in `gradle-wrapper.properties` is outside of this range, you can regenerate the `gradle-wrapper.jar` by running `./gradlew wrapper`. This will generate a new, verifiable wrapper jar.
|
||||||
- If you need to run your build with a version of Gradle between 3.3 and 4.0, you can use a newer version of Gradle to generate the `gradle-wrapper.jar`.
|
- If you need to run your build with a version of Gradle between 3.3 and 4.0, you can use a newer version of Gradle to generate the `gradle-wrapper.jar`.
|
||||||
|
|
||||||
|
#### Wrapper Jar stored with Git LFS
|
||||||
|
If your repository is configured to store Wrapper Jars in Git Large File Storage (LFS), then you must include the configuration to correctly
|
||||||
|
restore these Jars on checkout. Without this, only a pointer to the Wrapper Jar is restored, and the checksum verification will fail.
|
||||||
|
|
||||||
|
```
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true # gradle-wrapper.jar verification will fail without this
|
||||||
|
```
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
To learn more about verifying the Gradle Wrapper JAR locally, see our
|
To learn more about verifying the Gradle Wrapper JAR locally, see our
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Configuration file for asdf version manager
|
# Configuration file for asdf version manager
|
||||||
nodejs 20.10.0
|
nodejs 20.10.0
|
||||||
gradle 8.11
|
gradle 8.11.1
|
||||||
|
|||||||
958
sources/package-lock.json
generated
958
sources/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "2.1.11",
|
"@actions/artifact": "2.1.11",
|
||||||
"@actions/cache": "3.3.0",
|
"@actions/cache": "4.0.0",
|
||||||
"@actions/core": "1.11.1",
|
"@actions/core": "1.11.1",
|
||||||
"@actions/exec": "1.1.1",
|
"@actions/exec": "1.1.1",
|
||||||
"@actions/github": "6.0.0",
|
"@actions/github": "6.0.0",
|
||||||
@@ -51,21 +51,21 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "29.5.14",
|
"@types/jest": "29.5.14",
|
||||||
"@types/node": "20.17.6",
|
"@types/node": "20.17.10",
|
||||||
"@types/unzipper": "0.10.10",
|
"@types/unzipper": "0.10.10",
|
||||||
"@types/which": "3.0.4",
|
"@types/which": "3.0.4",
|
||||||
"@typescript-eslint/parser": "7.18.0",
|
"@typescript-eslint/parser": "7.18.0",
|
||||||
"@vercel/ncc": "0.38.2",
|
"@vercel/ncc": "0.38.3",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-github": "5.0.2",
|
"eslint-plugin-github": "5.1.4",
|
||||||
"eslint-plugin-jest": "28.9.0",
|
"eslint-plugin-jest": "28.9.0",
|
||||||
"jest": "29.7.0",
|
"jest": "29.7.0",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"nock": "13.5.6",
|
"nock": "13.5.6",
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"patch-package": "8.0.0",
|
"patch-package": "8.0.0",
|
||||||
"prettier": "3.3.3",
|
"prettier": "3.4.2",
|
||||||
"ts-jest": "29.2.5",
|
"ts-jest": "29.2.5",
|
||||||
"typescript": "5.6.3"
|
"typescript": "5.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,113 +0,0 @@
|
|||||||
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
|
|
||||||
index 4658366..b796e58 100644
|
|
||||||
--- a/node_modules/@actions/cache/lib/cache.d.ts
|
|
||||||
+++ b/node_modules/@actions/cache/lib/cache.d.ts
|
|
||||||
@@ -21,7 +21,7 @@ export declare function isFeatureAvailable(): boolean;
|
|
||||||
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
|
||||||
* @returns string returns the key for the cache hit, otherwise returns undefined
|
|
||||||
*/
|
|
||||||
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
|
|
||||||
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
|
|
||||||
/**
|
|
||||||
* Saves a list of files with the specified key
|
|
||||||
*
|
|
||||||
@@ -31,4 +31,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
|
|
||||||
* @param options cache upload options
|
|
||||||
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
|
||||||
*/
|
|
||||||
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
|
|
||||||
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
|
|
||||||
+
|
|
||||||
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
|
|
||||||
+// This allows us to track and report on cache entry sizes.
|
|
||||||
+export declare class CacheEntry {
|
|
||||||
+ key: string;
|
|
||||||
+ size?: number;
|
|
||||||
+ constructor(key: string, size?: number);
|
|
||||||
+}
|
|
||||||
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
|
||||||
index 9d636aa..a176bd7 100644
|
|
||||||
--- a/node_modules/@actions/cache/lib/cache.js
|
|
||||||
+++ b/node_modules/@actions/cache/lib/cache.js
|
|
||||||
@@ -127,18 +127,21 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|
||||||
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
|
||||||
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
|
||||||
core.info('Cache restored successfully');
|
|
||||||
- return cacheEntry.cacheKey;
|
|
||||||
- }
|
|
||||||
- catch (error) {
|
|
||||||
- const typedError = error;
|
|
||||||
- if (typedError.name === ValidationError.name) {
|
|
||||||
- throw error;
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- // Supress all non-validation cache related errors because caching should be optional
|
|
||||||
- core.warning(`Failed to restore: ${error.message}`);
|
|
||||||
- }
|
|
||||||
+
|
|
||||||
+ // PATCHED - Return more inforamtion about restored entry
|
|
||||||
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);;
|
|
||||||
}
|
|
||||||
+ // PATCHED - propagate errors
|
|
||||||
+ // catch (error) {
|
|
||||||
+ // const typedError = error;
|
|
||||||
+ // if (typedError.name === ValidationError.name) {
|
|
||||||
+ // throw error;
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // // Supress all non-validation cache related errors because caching should be optional
|
|
||||||
+ // core.warning(`Failed to restore: ${error.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // }
|
|
||||||
finally {
|
|
||||||
// Try to delete the archive to save space
|
|
||||||
try {
|
|
||||||
@@ -206,19 +209,23 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|
||||||
}
|
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
|
||||||
+
|
|
||||||
+ // PATCHED - Return more inforamtion about saved entry
|
|
||||||
+ return new CacheEntry(key, archiveFileSize);
|
|
||||||
}
|
|
||||||
- catch (error) {
|
|
||||||
- const typedError = error;
|
|
||||||
- if (typedError.name === ValidationError.name) {
|
|
||||||
- throw error;
|
|
||||||
- }
|
|
||||||
- else if (typedError.name === ReserveCacheError.name) {
|
|
||||||
- core.info(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ // PATCHED - propagate errors
|
|
||||||
+ // catch (error) {
|
|
||||||
+ // const typedError = error;
|
|
||||||
+ // if (typedError.name === ValidationError.name) {
|
|
||||||
+ // throw error;
|
|
||||||
+ // }
|
|
||||||
+ // else if (typedError.name === ReserveCacheError.name) {
|
|
||||||
+ // core.info(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // else {
|
|
||||||
+ // core.warning(`Failed to save: ${typedError.message}`);
|
|
||||||
+ // }
|
|
||||||
+ // }
|
|
||||||
finally {
|
|
||||||
// Try to delete the archive to save space
|
|
||||||
try {
|
|
||||||
@@ -232,4 +239,11 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.saveCache = saveCache;
|
|
||||||
+class CacheEntry {
|
|
||||||
+ constructor(key, size) {
|
|
||||||
+ this.key = key;
|
|
||||||
+ this.size = size;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+exports.CacheEntry = CacheEntry;
|
|
||||||
//# sourceMappingURL=cache.js.map
|
|
||||||
\ No newline at end of file
|
|
||||||
183
sources/patches/@actions+cache+4.0.0.patch
Normal file
183
sources/patches/@actions+cache+4.0.0.patch
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
|
||||||
|
index ef0928b..4e2f570 100644
|
||||||
|
--- a/node_modules/@actions/cache/lib/cache.d.ts
|
||||||
|
+++ b/node_modules/@actions/cache/lib/cache.d.ts
|
||||||
|
@@ -21,7 +21,7 @@ export declare function isFeatureAvailable(): boolean;
|
||||||
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
||||||
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
||||||
|
*/
|
||||||
|
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
|
||||||
|
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
|
||||||
|
/**
|
||||||
|
* Saves a list of files with the specified key
|
||||||
|
*
|
||||||
|
@@ -31,4 +31,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
|
||||||
|
* @param options cache upload options
|
||||||
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
||||||
|
*/
|
||||||
|
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
|
||||||
|
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
|
||||||
|
+
|
||||||
|
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
|
||||||
|
+// This allows us to track and report on cache entry sizes.
|
||||||
|
+export declare class CacheEntry {
|
||||||
|
+ key: string;
|
||||||
|
+ size?: number;
|
||||||
|
+ constructor(key: string, size?: number);
|
||||||
|
+}
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
||||||
|
index 45201b6..2654e4b 100644
|
||||||
|
--- a/node_modules/@actions/cache/lib/cache.js
|
||||||
|
+++ b/node_modules/@actions/cache/lib/cache.js
|
||||||
|
@@ -154,18 +154,21 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
||||||
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
- return cacheEntry.cacheKey;
|
||||||
|
- }
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
- core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of restored entry
|
||||||
|
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);;
|
||||||
|
}
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
+ // core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
@@ -232,18 +235,21 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
||||||
|
}
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
- return response.matchedKey;
|
||||||
|
- }
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
- core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of restored entry
|
||||||
|
+ return new CacheEntry(response.matchedKey, archiveFileSize);;
|
||||||
|
}
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // // Supress all non-validation cache related errors because caching should be optional
|
||||||
|
+ // core.warning(`Failed to restore: ${error.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
if (archivePath) {
|
||||||
|
@@ -334,19 +340,23 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
|
||||||
|
}
|
||||||
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
|
yield cacheHttpClient.saveCache(cacheId, archivePath, '', options);
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of saved entry
|
||||||
|
+ return new CacheEntry(key, archiveFileSize);
|
||||||
|
}
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
- core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
+ // core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
@@ -422,19 +432,23 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
|
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||||
|
}
|
||||||
|
cacheId = parseInt(finalizeResponse.entryId);
|
||||||
|
+
|
||||||
|
+ // PATCHED - Include size of saved entry
|
||||||
|
+ return new CacheEntry(key, archiveFileSize);
|
||||||
|
}
|
||||||
|
- catch (error) {
|
||||||
|
- const typedError = error;
|
||||||
|
- if (typedError.name === ValidationError.name) {
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
- core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ // PATCHED - propagate errors
|
||||||
|
+ // catch (error) {
|
||||||
|
+ // const typedError = error;
|
||||||
|
+ // if (typedError.name === ValidationError.name) {
|
||||||
|
+ // throw error;
|
||||||
|
+ // }
|
||||||
|
+ // else if (typedError.name === ReserveCacheError.name) {
|
||||||
|
+ // core.info(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // core.warning(`Failed to save: ${typedError.message}`);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
@@ -447,4 +461,11 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
|
return cacheId;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
+// PATCHED - CacheEntry class
|
||||||
|
+class CacheEntry {
|
||||||
|
+ constructor(key, size) {
|
||||||
|
+ this.key = key;
|
||||||
|
+ this.size = size;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
//# sourceMappingURL=cache.js.map
|
||||||
|
\ No newline at end of file
|
||||||
@@ -57,7 +57,7 @@ export class CacheCleaner {
|
|||||||
|
|
||||||
// Gradle >= 8.11 required for cache cleanup
|
// Gradle >= 8.11 required for cache cleanup
|
||||||
// TODO: This is ineffective: we should be using the newest version of Gradle that ran a build, or a newer version if it's available on PATH.
|
// TODO: This is ineffective: we should be using the newest version of Gradle that ran a build, or a newer version if it's available on PATH.
|
||||||
const executable = await provisioner.provisionGradleAtLeast('8.11')
|
const executable = await provisioner.provisionGradleAtLeast('8.11.1')
|
||||||
|
|
||||||
await core.group('Executing Gradle to clean up caches', async () => {
|
await core.group('Executing Gradle to clean up caches', async () => {
|
||||||
core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
|
core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
|
||||||
|
|||||||
@@ -5,13 +5,6 @@ import {setupToken} from './short-lived-token'
|
|||||||
export async function setup(config: BuildScanConfig): Promise<void> {
|
export async function setup(config: BuildScanConfig): Promise<void> {
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_INIT_SCRIPT_NAME', 'gradle-actions.inject-develocity.init.gradle')
|
maybeExportVariable('DEVELOCITY_INJECTION_INIT_SCRIPT_NAME', 'gradle-actions.inject-develocity.init.gradle')
|
||||||
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
|
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
|
||||||
if (config.getBuildScanPublishEnabled()) {
|
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
|
||||||
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.18.1')
|
|
||||||
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0')
|
|
||||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
|
|
||||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())
|
|
||||||
}
|
|
||||||
|
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENABLED', config.getDevelocityInjectionEnabled())
|
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENABLED', config.getDevelocityInjectionEnabled())
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_URL', config.getDevelocityUrl())
|
maybeExportVariableNotEmpty('DEVELOCITY_URL', config.getDevelocityUrl())
|
||||||
@@ -19,10 +12,22 @@ export async function setup(config: BuildScanConfig): Promise<void> {
|
|||||||
maybeExportVariableNotEmpty('DEVELOCITY_CAPTURE_FILE_FINGERPRINTS', config.getDevelocityCaptureFileFingerprints())
|
maybeExportVariableNotEmpty('DEVELOCITY_CAPTURE_FILE_FINGERPRINTS', config.getDevelocityCaptureFileFingerprints())
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
maybeExportVariableNotEmpty('DEVELOCITY_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
||||||
maybeExportVariableNotEmpty('DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
maybeExportVariableNotEmpty('DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
||||||
|
maybeExportVariableNotEmpty('DEVELOCITY_CCUD_PLUGIN_VERSION', config.getDevelocityCcudPluginVersion())
|
||||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
||||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
|
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
|
||||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())
|
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())
|
||||||
|
|
||||||
|
// If build-scan-publish is enabled, ensure the environment variables are set
|
||||||
|
// The DEVELOCITY_PLUGIN_VERSION and DEVELOCITY_CCUD_PLUGIN_VERSION are set to the latest versions
|
||||||
|
// except if they are defined in the configuration
|
||||||
|
if (config.getBuildScanPublishEnabled()) {
|
||||||
|
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
||||||
|
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.19')
|
||||||
|
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0.2')
|
||||||
|
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
|
||||||
|
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())
|
||||||
|
}
|
||||||
|
|
||||||
return setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
|
return setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,15 +32,19 @@ if (isTopLevelBuild) {
|
|||||||
|
|
||||||
// Use the Develocity plugin to also capture build scan links, when available
|
// Use the Develocity plugin to also capture build scan links, when available
|
||||||
settingsEvaluated { settings ->
|
settingsEvaluated { settings ->
|
||||||
settings.pluginManager.withPlugin(GE_PLUGIN_ID) {
|
def captureBuildScanLink = {
|
||||||
// Only execute if develocity plugin isn't applied.
|
// Prefer the 'develocity' extension, if available
|
||||||
if (!settings.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
if (settings.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
||||||
|
captureUsingBuildScanPublished(settings.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
||||||
|
} else {
|
||||||
captureUsingBuildScanPublished(settings.extensions[GE_EXTENSION].buildScan, invocationId, resultsWriter)
|
captureUsingBuildScanPublished(settings.extensions[GE_EXTENSION].buildScan, invocationId, resultsWriter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
settings.pluginManager.withPlugin(GE_PLUGIN_ID, captureBuildScanLink)
|
||||||
settings.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
settings.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||||
captureUsingBuildScanPublished(settings.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
// Develocity plugin applies GE plugin: avoid duplicate call
|
||||||
|
if (settings.pluginManager.hasPlugin(GE_PLUGIN_ID)) return
|
||||||
|
captureBuildScanLink()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (atLeastGradle3) {
|
} else if (atLeastGradle3) {
|
||||||
@@ -48,15 +52,21 @@ if (isTopLevelBuild) {
|
|||||||
// By default, use 'buildFinished' to capture build results
|
// By default, use 'buildFinished' to capture build results
|
||||||
captureUsingBuildFinished(gradle, invocationId, resultsWriter)
|
captureUsingBuildFinished(gradle, invocationId, resultsWriter)
|
||||||
|
|
||||||
gradle.rootProject.pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
def captureBuildScanLink = {
|
||||||
// Only execute if develocity plugin isn't applied.
|
// Prefer the 'develocity' extension, if available
|
||||||
if (!gradle.rootProject.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
if (gradle.rootProject.extensions.findByName(DEVELOCITY_EXTENSION)) {
|
||||||
|
captureUsingBuildScanPublished(gradle.rootProject.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
||||||
|
} else {
|
||||||
captureUsingBuildScanPublished(gradle.rootProject.extensions[BUILD_SCAN_EXTENSION], invocationId, resultsWriter)
|
captureUsingBuildScanPublished(gradle.rootProject.extensions[BUILD_SCAN_EXTENSION], invocationId, resultsWriter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradle.rootProject.pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID, captureBuildScanLink)
|
||||||
|
|
||||||
gradle.rootProject.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
gradle.rootProject.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||||
captureUsingBuildScanPublished(gradle.rootProject.extensions[DEVELOCITY_EXTENSION].buildScan, invocationId, resultsWriter)
|
// Develocity plugin applies Build Scan plugin: avoid duplicate call
|
||||||
|
if (gradle.rootProject.pluginManager.hasPlugin(BUILD_SCAN_PLUGIN_ID)) return
|
||||||
|
captureBuildScanLink()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ buildscript {
|
|||||||
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url') ?: 'https://plugins.gradle.org/m2'
|
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url') ?: 'https://plugins.gradle.org/m2'
|
||||||
def pluginRepositoryUsername = getInputParam('gradle.plugin-repository.username')
|
def pluginRepositoryUsername = getInputParam('gradle.plugin-repository.username')
|
||||||
def pluginRepositoryPassword = getInputParam('gradle.plugin-repository.password')
|
def pluginRepositoryPassword = getInputParam('gradle.plugin-repository.password')
|
||||||
def dependencyGraphPluginVersion = getInputParam('dependency-graph-plugin.version') ?: '1.3.1'
|
def dependencyGraphPluginVersion = getInputParam('dependency-graph-plugin.version') ?: '1.3.2'
|
||||||
|
|
||||||
logger.lifecycle("Resolving dependency graph plugin ${dependencyGraphPluginVersion} from plugin repository: ${pluginRepositoryUrl}")
|
logger.lifecycle("Resolving dependency graph plugin ${dependencyGraphPluginVersion} from plugin repository: ${pluginRepositoryUrl}")
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url pluginRepositoryUrl
|
url = pluginRepositoryUrl
|
||||||
if (pluginRepositoryUsername && pluginRepositoryPassword) {
|
if (pluginRepositoryUsername && pluginRepositoryPassword) {
|
||||||
logger.lifecycle("Applying credentials for plugin repository: ${pluginRepositoryUrl}")
|
logger.lifecycle("Applying credentials for plugin repository: ${pluginRepositoryUrl}")
|
||||||
credentials {
|
credentials {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Initscript for injection of Develocity into Gradle builds.
|
* Initscript for injection of Develocity into Gradle builds.
|
||||||
* Version: v1.0
|
* Version: v1.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
@@ -12,29 +12,29 @@ initscript {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def getInputParam = { String name ->
|
def getInputParam = { Gradle gradle, String name ->
|
||||||
def ENV_VAR_PREFIX = ''
|
def ENV_VAR_PREFIX = ''
|
||||||
def envVarName = ENV_VAR_PREFIX + name.toUpperCase().replace('.', '_').replace('-', '_')
|
def envVarName = ENV_VAR_PREFIX + name.toUpperCase().replace('.', '_').replace('-', '_')
|
||||||
return System.getProperty(name) ?: System.getenv(envVarName)
|
return gradle.startParameter.systemPropertiesArgs[name] ?: System.getProperty(name) ?: System.getenv(envVarName)
|
||||||
}
|
}
|
||||||
|
|
||||||
def requestedInitScriptName = getInputParam('develocity.injection.init-script-name')
|
def requestedInitScriptName = getInputParam(gradle, 'develocity.injection.init-script-name')
|
||||||
def initScriptName = buildscript.sourceFile.name
|
def initScriptName = buildscript.sourceFile.name
|
||||||
if (requestedInitScriptName != initScriptName) {
|
if (requestedInitScriptName != initScriptName) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin loading is only required for Develocity injection. Abort early if not enabled.
|
// Plugin loading is only required for Develocity injection. Abort early if not enabled.
|
||||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam("develocity.injection-enabled"))
|
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity.injection-enabled"))
|
||||||
if (!develocityInjectionEnabled) {
|
if (!develocityInjectionEnabled) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url')
|
def pluginRepositoryUrl = getInputParam(gradle, 'gradle.plugin-repository.url')
|
||||||
def pluginRepositoryUsername = getInputParam('gradle.plugin-repository.username')
|
def pluginRepositoryUsername = getInputParam(gradle, 'gradle.plugin-repository.username')
|
||||||
def pluginRepositoryPassword = getInputParam('gradle.plugin-repository.password')
|
def pluginRepositoryPassword = getInputParam(gradle, 'gradle.plugin-repository.password')
|
||||||
def develocityPluginVersion = getInputParam('develocity.plugin.version')
|
def develocityPluginVersion = getInputParam(gradle, 'develocity.plugin.version')
|
||||||
def ccudPluginVersion = getInputParam('develocity.ccud-plugin.version')
|
def ccudPluginVersion = getInputParam(gradle, 'develocity.ccud-plugin.version')
|
||||||
|
|
||||||
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
|
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
|
||||||
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
|
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
|
||||||
@@ -79,10 +79,10 @@ initscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static getInputParam(String name) {
|
static getInputParam(Gradle gradle, String name) {
|
||||||
def ENV_VAR_PREFIX = ''
|
def ENV_VAR_PREFIX = ''
|
||||||
def envVarName = ENV_VAR_PREFIX + name.toUpperCase().replace('.', '_').replace('-', '_')
|
def envVarName = ENV_VAR_PREFIX + name.toUpperCase().replace('.', '_').replace('-', '_')
|
||||||
return System.getProperty(name) ?: System.getenv(envVarName)
|
return gradle.startParameter.systemPropertiesArgs[name] ?: System.getProperty(name) ?: System.getenv(envVarName)
|
||||||
}
|
}
|
||||||
|
|
||||||
def isTopLevelBuild = !gradle.parent
|
def isTopLevelBuild = !gradle.parent
|
||||||
@@ -90,14 +90,14 @@ if (!isTopLevelBuild) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def requestedInitScriptName = getInputParam('develocity.injection.init-script-name')
|
def requestedInitScriptName = getInputParam(gradle, 'develocity.injection.init-script-name')
|
||||||
def initScriptName = buildscript.sourceFile.name
|
def initScriptName = buildscript.sourceFile.name
|
||||||
if (requestedInitScriptName != initScriptName) {
|
if (requestedInitScriptName != initScriptName) {
|
||||||
logger.quiet("Ignoring init script '${initScriptName}' as requested name '${requestedInitScriptName}' does not match")
|
logger.quiet("Ignoring init script '${initScriptName}' as requested name '${requestedInitScriptName}' does not match")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam("develocity.injection-enabled"))
|
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity.injection-enabled"))
|
||||||
if (develocityInjectionEnabled) {
|
if (develocityInjectionEnabled) {
|
||||||
enableDevelocityInjection()
|
enableDevelocityInjection()
|
||||||
}
|
}
|
||||||
@@ -123,16 +123,16 @@ void enableDevelocityInjection() {
|
|||||||
def CCUD_PLUGIN_ID = 'com.gradle.common-custom-user-data-gradle-plugin'
|
def CCUD_PLUGIN_ID = 'com.gradle.common-custom-user-data-gradle-plugin'
|
||||||
def CCUD_PLUGIN_CLASS = 'com.gradle.CommonCustomUserDataGradlePlugin'
|
def CCUD_PLUGIN_CLASS = 'com.gradle.CommonCustomUserDataGradlePlugin'
|
||||||
|
|
||||||
def develocityUrl = getInputParam('develocity.url')
|
def develocityUrl = getInputParam(gradle, 'develocity.url')
|
||||||
def develocityAllowUntrustedServer = Boolean.parseBoolean(getInputParam('develocity.allow-untrusted-server'))
|
def develocityAllowUntrustedServer = Boolean.parseBoolean(getInputParam(gradle, 'develocity.allow-untrusted-server'))
|
||||||
def develocityEnforceUrl = Boolean.parseBoolean(getInputParam('develocity.enforce-url'))
|
def develocityEnforceUrl = Boolean.parseBoolean(getInputParam(gradle, 'develocity.enforce-url'))
|
||||||
def buildScanUploadInBackground = Boolean.parseBoolean(getInputParam('develocity.build-scan.upload-in-background'))
|
def buildScanUploadInBackground = Boolean.parseBoolean(getInputParam(gradle, 'develocity.build-scan.upload-in-background'))
|
||||||
def develocityCaptureFileFingerprints = getInputParam('develocity.capture-file-fingerprints') ? Boolean.parseBoolean(getInputParam('develocity.capture-file-fingerprints')) : true
|
def develocityCaptureFileFingerprints = getInputParam(gradle, 'develocity.capture-file-fingerprints') ? Boolean.parseBoolean(getInputParam(gradle, 'develocity.capture-file-fingerprints')) : true
|
||||||
def develocityPluginVersion = getInputParam('develocity.plugin.version')
|
def develocityPluginVersion = getInputParam(gradle, 'develocity.plugin.version')
|
||||||
def ccudPluginVersion = getInputParam('develocity.ccud-plugin.version')
|
def ccudPluginVersion = getInputParam(gradle, 'develocity.ccud-plugin.version')
|
||||||
def buildScanTermsOfUseUrl = getInputParam('develocity.terms-of-use.url')
|
def buildScanTermsOfUseUrl = getInputParam(gradle, 'develocity.terms-of-use.url')
|
||||||
def buildScanTermsOfUseAgree = getInputParam('develocity.terms-of-use.agree')
|
def buildScanTermsOfUseAgree = getInputParam(gradle, 'develocity.terms-of-use.agree')
|
||||||
def ciAutoInjectionCustomValueValue = getInputParam('develocity.auto-injection.custom-value')
|
def ciAutoInjectionCustomValueValue = getInputParam(gradle, 'develocity.auto-injection.custom-value')
|
||||||
|
|
||||||
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
|
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
|
||||||
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
|
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
|
||||||
@@ -145,6 +145,14 @@ void enableDevelocityInjection() {
|
|||||||
return geValue instanceof Closure<?> ? geValue() : geValue
|
return geValue instanceof Closure<?> ? geValue() : geValue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def printEnforcingDevelocityUrl = {
|
||||||
|
logger.lifecycle("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||||
|
}
|
||||||
|
|
||||||
|
def printAcceptingGradleTermsOfUse = {
|
||||||
|
logger.lifecycle("Accepting Gradle Terms of Use: $buildScanTermsOfUseUrl")
|
||||||
|
}
|
||||||
|
|
||||||
// finish early if configuration parameters passed in via system properties are not valid/supported
|
// finish early if configuration parameters passed in via system properties are not valid/supported
|
||||||
if (ccudPluginVersion && isNotAtLeast(ccudPluginVersion, '1.7')) {
|
if (ccudPluginVersion && isNotAtLeast(ccudPluginVersion, '1.7')) {
|
||||||
logger.warn("Common Custom User Data Gradle plugin must be at least 1.7. Configured version is $ccudPluginVersion.")
|
logger.warn("Common Custom User Data Gradle plugin must be at least 1.7. Configured version is $ccudPluginVersion.")
|
||||||
@@ -163,8 +171,8 @@ void enableDevelocityInjection() {
|
|||||||
}
|
}
|
||||||
if (!scanPluginComponent) {
|
if (!scanPluginComponent) {
|
||||||
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, BUILD_SCAN_PLUGIN_CLASS)
|
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, BUILD_SCAN_PLUGIN_CLASS)
|
||||||
logger.lifecycle("Applying $pluginClass via init script")
|
def pluginVersion = atLeastGradle5 ? develocityPluginVersion : "1.16"
|
||||||
applyPluginExternally(pluginManager, pluginClass)
|
applyPluginExternally(pluginManager, pluginClass, pluginVersion)
|
||||||
def rootExtension = dvOrGe(
|
def rootExtension = dvOrGe(
|
||||||
{ develocity },
|
{ develocity },
|
||||||
{ buildScan }
|
{ buildScan }
|
||||||
@@ -196,48 +204,52 @@ void enableDevelocityInjection() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
eachDevelocityProjectExtension(project,
|
||||||
logger.lifecycle("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
{ develocity ->
|
||||||
}
|
|
||||||
|
|
||||||
pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
|
||||||
// Only execute if develocity plugin isn't applied.
|
|
||||||
if (gradle.rootProject.extensions.findByName("develocity")) return
|
|
||||||
afterEvaluate {
|
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
|
||||||
buildScan.server = develocityUrl
|
|
||||||
buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
|
||||||
buildScan.termsOfServiceUrl = buildScanTermsOfUseUrl
|
|
||||||
buildScan.termsOfServiceAgree = buildScanTermsOfUseAgree
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
if (develocityUrl && develocityEnforceUrl) {
|
||||||
|
printEnforcingDevelocityUrl()
|
||||||
develocity.server = develocityUrl
|
develocity.server = develocityUrl
|
||||||
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
||||||
|
printAcceptingGradleTermsOfUse()
|
||||||
develocity.buildScan.termsOfUseUrl = buildScanTermsOfUseUrl
|
develocity.buildScan.termsOfUseUrl = buildScanTermsOfUseUrl
|
||||||
develocity.buildScan.termsOfUseAgree = buildScanTermsOfUseAgree
|
develocity.buildScan.termsOfUseAgree = buildScanTermsOfUseAgree
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{ buildScan ->
|
||||||
|
afterEvaluate {
|
||||||
|
if (develocityUrl && develocityEnforceUrl) {
|
||||||
|
printEnforcingDevelocityUrl()
|
||||||
|
buildScan.server = develocityUrl
|
||||||
|
buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
||||||
|
printAcceptingGradleTermsOfUse()
|
||||||
|
if (buildScan.metaClass.respondsTo(buildScan, 'setTermsOfServiceUrl', String)) {
|
||||||
|
buildScan.termsOfServiceUrl = buildScanTermsOfUseUrl
|
||||||
|
buildScan.termsOfServiceAgree = buildScanTermsOfUseAgree
|
||||||
|
} else {
|
||||||
|
buildScan.licenseAgreementUrl = buildScanTermsOfUseUrl
|
||||||
|
buildScan.licenseAgree = buildScanTermsOfUseAgree
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
|
|
||||||
if (ccudPluginVersion && atLeastGradle4) {
|
if (ccudPluginVersion && atLeastGradle4) {
|
||||||
def ccudPluginComponent = resolutionResult.allComponents.find {
|
def ccudPluginComponent = resolutionResult.allComponents.find {
|
||||||
it.moduleVersion.with { group == "com.gradle" && name == "common-custom-user-data-gradle-plugin" }
|
it.moduleVersion.with { group == "com.gradle" && name == "common-custom-user-data-gradle-plugin" }
|
||||||
}
|
}
|
||||||
if (!ccudPluginComponent) {
|
if (!ccudPluginComponent) {
|
||||||
logger.lifecycle("Applying $CCUD_PLUGIN_CLASS via init script")
|
logger.lifecycle("Applying $CCUD_PLUGIN_CLASS with version $ccudPluginVersion via init script")
|
||||||
pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
|
pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,13 +260,18 @@ void enableDevelocityInjection() {
|
|||||||
if (develocityPluginVersion) {
|
if (develocityPluginVersion) {
|
||||||
if (!settings.pluginManager.hasPlugin(GRADLE_ENTERPRISE_PLUGIN_ID) && !settings.pluginManager.hasPlugin(DEVELOCITY_PLUGIN_ID)) {
|
if (!settings.pluginManager.hasPlugin(GRADLE_ENTERPRISE_PLUGIN_ID) && !settings.pluginManager.hasPlugin(DEVELOCITY_PLUGIN_ID)) {
|
||||||
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, GRADLE_ENTERPRISE_PLUGIN_CLASS)
|
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, GRADLE_ENTERPRISE_PLUGIN_CLASS)
|
||||||
logger.lifecycle("Applying $pluginClass via init script")
|
applyPluginExternally(settings.pluginManager, pluginClass, develocityPluginVersion)
|
||||||
applyPluginExternally(settings.pluginManager, pluginClass)
|
|
||||||
if (develocityUrl) {
|
if (develocityUrl) {
|
||||||
logger.lifecycle("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
logger.lifecycle("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||||
eachDevelocitySettingsExtension(settings) { ext ->
|
eachDevelocitySettingsExtension(settings) { ext ->
|
||||||
ext.server = develocityUrl
|
// server and allowUntrustedServer must be configured via buildScan extension for gradle-enterprise-plugin 3.1.1 and earlier
|
||||||
ext.allowUntrustedServer = develocityAllowUntrustedServer
|
if (ext.metaClass.respondsTo(ext, 'getServer')) {
|
||||||
|
ext.server = develocityUrl
|
||||||
|
ext.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
|
} else {
|
||||||
|
ext.buildScan.server = develocityUrl
|
||||||
|
ext.buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,40 +298,46 @@ void enableDevelocityInjection() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
eachDevelocitySettingsExtension(settings,
|
||||||
logger.lifecycle("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
{ develocity ->
|
||||||
}
|
if (develocityUrl && develocityEnforceUrl) {
|
||||||
|
printEnforcingDevelocityUrl()
|
||||||
|
develocity.server = develocityUrl
|
||||||
|
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
|
}
|
||||||
|
|
||||||
eachDevelocitySettingsExtension(settings,
|
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
||||||
{ develocity ->
|
printAcceptingGradleTermsOfUse()
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
develocity.buildScan.termsOfUseUrl = buildScanTermsOfUseUrl
|
||||||
develocity.server = develocityUrl
|
develocity.buildScan.termsOfUseAgree = buildScanTermsOfUseAgree
|
||||||
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
}
|
||||||
}
|
},
|
||||||
|
{ gradleEnterprise ->
|
||||||
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
if (develocityUrl && develocityEnforceUrl) {
|
||||||
develocity.buildScan.termsOfUseUrl = buildScanTermsOfUseUrl
|
printEnforcingDevelocityUrl()
|
||||||
develocity.buildScan.termsOfUseAgree = buildScanTermsOfUseAgree
|
// server and allowUntrustedServer must be configured via buildScan extension for gradle-enterprise-plugin 3.1.1 and earlier
|
||||||
}
|
if (gradleEnterprise.metaClass.respondsTo(gradleEnterprise, 'getServer')) {
|
||||||
},
|
|
||||||
{ gradleEnterprise ->
|
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
|
||||||
gradleEnterprise.server = develocityUrl
|
gradleEnterprise.server = develocityUrl
|
||||||
gradleEnterprise.allowUntrustedServer = develocityAllowUntrustedServer
|
gradleEnterprise.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
}
|
} else {
|
||||||
|
gradleEnterprise.buildScan.server = develocityUrl
|
||||||
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
gradleEnterprise.buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
gradleEnterprise.buildScan.termsOfServiceUrl = buildScanTermsOfUseUrl
|
|
||||||
gradleEnterprise.buildScan.termsOfServiceAgree = buildScanTermsOfUseAgree
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
}
|
if (buildScanTermsOfUseUrl && buildScanTermsOfUseAgree) {
|
||||||
|
printAcceptingGradleTermsOfUse()
|
||||||
|
gradleEnterprise.buildScan.termsOfServiceUrl = buildScanTermsOfUseUrl
|
||||||
|
gradleEnterprise.buildScan.termsOfServiceAgree = buildScanTermsOfUseAgree
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (ccudPluginVersion) {
|
if (ccudPluginVersion) {
|
||||||
if (!settings.pluginManager.hasPlugin(CCUD_PLUGIN_ID)) {
|
if (!settings.pluginManager.hasPlugin(CCUD_PLUGIN_ID)) {
|
||||||
logger.lifecycle("Applying $CCUD_PLUGIN_CLASS via init script")
|
logger.lifecycle("Applying $CCUD_PLUGIN_CLASS with version $ccudPluginVersion via init script")
|
||||||
settings.pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
|
settings.pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -322,7 +345,9 @@ void enableDevelocityInjection() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyPluginExternally(def pluginManager, String pluginClassName) {
|
void applyPluginExternally(def pluginManager, String pluginClassName, String pluginVersion) {
|
||||||
|
logger.lifecycle("Applying $pluginClassName with version $pluginVersion via init script")
|
||||||
|
|
||||||
def externallyApplied = 'develocity.externally-applied'
|
def externallyApplied = 'develocity.externally-applied'
|
||||||
def externallyAppliedDeprecated = 'gradle.enterprise.externally-applied'
|
def externallyAppliedDeprecated = 'gradle.enterprise.externally-applied'
|
||||||
def oldValue = System.getProperty(externallyApplied)
|
def oldValue = System.getProperty(externallyApplied)
|
||||||
@@ -367,6 +392,32 @@ static def eachDevelocitySettingsExtension(def settings, def dvAction, def geAct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the `dvAction` to the 'develocity' extension.
|
||||||
|
* If no 'develocity' extension is found, apply the `bsAction` to the 'buildScan' extension.
|
||||||
|
* (The develocity plugin creates both extensions, and we want to prefer configuring 'develocity').
|
||||||
|
*/
|
||||||
|
static def eachDevelocityProjectExtension(def project, def dvAction, def bsAction = dvAction) {
|
||||||
|
def BUILD_SCAN_PLUGIN_ID = 'com.gradle.build-scan'
|
||||||
|
def DEVELOCITY_PLUGIN_ID = 'com.gradle.develocity'
|
||||||
|
|
||||||
|
def configureDvOrBsExtension = {
|
||||||
|
if (project.extensions.findByName("develocity")) {
|
||||||
|
dvAction(project.develocity)
|
||||||
|
} else {
|
||||||
|
bsAction(project.buildScan)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
project.pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID, configureDvOrBsExtension)
|
||||||
|
|
||||||
|
project.pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||||
|
// Proper extension will be configured by the build-scan callback.
|
||||||
|
if (project.pluginManager.hasPlugin(BUILD_SCAN_PLUGIN_ID)) return
|
||||||
|
configureDvOrBsExtension()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static boolean isAtLeast(String versionUnderTest, String referenceVersion) {
|
static boolean isAtLeast(String versionUnderTest, String referenceVersion) {
|
||||||
GradleVersion.version(versionUnderTest) >= GradleVersion.version(referenceVersion)
|
GradleVersion.version(versionUnderTest) >= GradleVersion.version(referenceVersion)
|
||||||
}
|
}
|
||||||
@@ -376,21 +427,13 @@ static boolean isNotAtLeast(String versionUnderTest, String referenceVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void enableBuildScanLinkCapture(BuildScanCollector collector) {
|
void enableBuildScanLinkCapture(BuildScanCollector collector) {
|
||||||
def BUILD_SCAN_PLUGIN_ID = 'com.gradle.build-scan'
|
|
||||||
def DEVELOCITY_PLUGIN_ID = 'com.gradle.develocity'
|
|
||||||
|
|
||||||
// Conditionally apply and configure the Develocity plugin
|
// Conditionally apply and configure the Develocity plugin
|
||||||
if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
||||||
rootProject {
|
rootProject {
|
||||||
pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
eachDevelocityProjectExtension(project,
|
||||||
// Only execute if develocity plugin isn't applied.
|
{ develocity -> buildScanPublishedAction(develocity.buildScan, collector) },
|
||||||
if (gradle.rootProject.extensions.findByName("develocity")) return
|
{ buildScan -> buildScanPublishedAction(buildScan, collector) }
|
||||||
buildScanPublishedAction(buildScan, collector)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
|
||||||
buildScanPublishedAction(develocity.buildScan, collector)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gradle.settingsEvaluated { settings ->
|
gradle.settingsEvaluated { settings ->
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as httpm from 'typed-rest-client/HttpClient'
|
import * as httpm from 'typed-rest-client/HttpClient'
|
||||||
import * as cheerio from 'cheerio'
|
import * as cheerio from 'cheerio'
|
||||||
|
import * as core from '@actions/core'
|
||||||
|
|
||||||
import fileWrapperChecksums from './wrapper-checksums.json'
|
import fileWrapperChecksums from './wrapper-checksums.json'
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ export const KNOWN_CHECKSUMS = loadKnownChecksums()
|
|||||||
export async function fetchUnknownChecksums(
|
export async function fetchUnknownChecksums(
|
||||||
allowSnapshots: boolean,
|
allowSnapshots: boolean,
|
||||||
knownChecksums: WrapperChecksums
|
knownChecksums: WrapperChecksums
|
||||||
): Promise<Set<string>> {
|
): Promise<WrapperChecksums> {
|
||||||
const all = await httpGetJsonArray('https://services.gradle.org/versions/all')
|
const all = await httpGetJsonArray('https://services.gradle.org/versions/all')
|
||||||
const withChecksum = all.filter(
|
const withChecksum = all.filter(
|
||||||
entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl')
|
entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl')
|
||||||
@@ -51,20 +52,16 @@ export async function fetchUnknownChecksums(
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(entry: any) => !knownChecksums.versions.has(entry.version)
|
(entry: any) => !knownChecksums.versions.has(entry.version)
|
||||||
)
|
)
|
||||||
const checksumUrls = notKnown.map(
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(entry: any) => entry.wrapperChecksumUrl as string
|
const checksumUrls = notKnown.map((entry: any) => [entry.version, entry.wrapperChecksumUrl] as [string, string])
|
||||||
)
|
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls)
|
await addDistributionSnapshotChecksumUrls(checksumUrls)
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(
|
|
||||||
checksumUrls.map(async (url: string) => {
|
const wrapperChecksums = new WrapperChecksums()
|
||||||
// console.log(`Fetching checksum from ${url}`)
|
await fetchAndStoreChecksums(checksumUrls, wrapperChecksums)
|
||||||
return httpGetText(url)
|
return wrapperChecksums
|
||||||
})
|
|
||||||
)
|
|
||||||
return new Set(checksums)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function httpGetJsonArray(url: string): Promise<unknown[]> {
|
async function httpGetJsonArray(url: string): Promise<unknown[]> {
|
||||||
@@ -76,21 +73,37 @@ async function httpGetText(url: string): Promise<string> {
|
|||||||
return await response.readBody()
|
return await response.readBody()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Public for testing
|
async function addDistributionSnapshotChecksumUrls(checksumUrls: [string, string][]): Promise<void> {
|
||||||
export async function addDistributionSnapshotChecksums(checksumUrls: string[]): Promise<void> {
|
// Load the index page of the distribution snapshot repository into cheerio
|
||||||
// Load the index page of the distribution snapshot repository
|
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/')
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/')
|
||||||
|
|
||||||
// // Extract all wrapper checksum from the index page. These end in -wrapper.jar.sha256
|
|
||||||
// // Load the HTML into cheerio
|
|
||||||
const $ = cheerio.load(indexPage)
|
const $ = cheerio.load(indexPage)
|
||||||
|
|
||||||
// // Find all links ending with '-wrapper.jar.sha256'
|
// // Find all links ending with '-wrapper.jar.sha256'
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
|
||||||
|
|
||||||
// build the absolute URL for each wrapper checksum
|
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href')
|
const url = $(element).attr('href')!
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`)
|
|
||||||
|
// Extract the version from the url
|
||||||
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1]
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchAndStoreChecksums(
|
||||||
|
checksumUrls: [string, string][],
|
||||||
|
wrapperChecksums: WrapperChecksums
|
||||||
|
): Promise<void> {
|
||||||
|
const batchSize = 10
|
||||||
|
for (let i = 0; i < checksumUrls.length; i += batchSize) {
|
||||||
|
const batch = checksumUrls.slice(i, i + batchSize)
|
||||||
|
await Promise.all(
|
||||||
|
batch.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url)
|
||||||
|
wrapperChecksums.add(version, checksum)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
core.info(`Fetched ${i + batch.length} of ${checksumUrls.length} checksums`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,9 +18,14 @@ async function recursivelyListFiles(baseDir: string): Promise<string[]> {
|
|||||||
const childrenPaths = await Promise.all(
|
const childrenPaths = await Promise.all(
|
||||||
childrenNames.map(async childName => {
|
childrenNames.map(async childName => {
|
||||||
const childPath = path.resolve(baseDir, childName)
|
const childPath = path.resolve(baseDir, childName)
|
||||||
return fs.lstatSync(childPath).isDirectory()
|
const stat = fs.lstatSync(childPath, {throwIfNoEntry: false})
|
||||||
? recursivelyListFiles(childPath)
|
if (stat === undefined) {
|
||||||
: new Promise(resolve => resolve([childPath]))
|
return []
|
||||||
|
} else if (stat.isDirectory()) {
|
||||||
|
return recursivelyListFiles(childPath)
|
||||||
|
} else {
|
||||||
|
return new Promise(resolve => resolve([childPath]))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
return Array.prototype.concat(...childrenPaths)
|
return Array.prototype.concat(...childrenPaths)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export async function findInvalidWrapperJars(
|
|||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums)
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums)
|
||||||
|
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar)
|
result.invalid.push(wrapperJar)
|
||||||
} else {
|
} else {
|
||||||
result.valid.push(wrapperJar)
|
result.valid.push(wrapperJar)
|
||||||
|
|||||||
@@ -1,4 +1,16 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "8.12-rc-2",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.12-rc-1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.11.1",
|
||||||
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "8.11",
|
"version": "8.11",
|
||||||
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ dependencies {
|
|||||||
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
||||||
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
||||||
}
|
}
|
||||||
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.1'
|
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "3.18.1"
|
id "com.gradle.develocity" version "3.19"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import java.nio.file.Files
|
|||||||
import java.util.zip.GZIPOutputStream
|
import java.util.zip.GZIPOutputStream
|
||||||
|
|
||||||
class BaseInitScriptTest extends Specification {
|
class BaseInitScriptTest extends Specification {
|
||||||
static final String DEVELOCITY_PLUGIN_VERSION = '3.18.1'
|
static final String DEVELOCITY_PLUGIN_VERSION = '3.19'
|
||||||
static final String CCUD_PLUGIN_VERSION = '2.0.1'
|
static final String CCUD_PLUGIN_VERSION = '2.0.2'
|
||||||
|
|
||||||
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
|
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
|
||||||
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
||||||
@@ -28,7 +28,7 @@ class BaseInitScriptTest extends Specification {
|
|||||||
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.1.1'), 8, 16)
|
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.1.1'), 8, 16)
|
||||||
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
||||||
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
|
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
|
||||||
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.10'), 8, 23)
|
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.11.1'), 8, 23)
|
||||||
|
|
||||||
static final List<TestGradleVersion> ALL_VERSIONS = [
|
static final List<TestGradleVersion> ALL_VERSIONS = [
|
||||||
GRADLE_3_X, // First version where TestKit supports environment variables
|
GRADLE_3_X, // First version where TestKit supports environment variables
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
|
|||||||
when:
|
when:
|
||||||
settingsFile.text = """
|
settingsFile.text = """
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gradle.develocity' version '3.18.1' apply(false)
|
id 'com.gradle.develocity' version '3.19' apply(false)
|
||||||
}
|
}
|
||||||
gradle.settingsEvaluated {
|
gradle.settingsEvaluated {
|
||||||
apply plugin: 'com.gradle.develocity'
|
apply plugin: 'com.gradle.develocity'
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class TestDependencyGraph extends BaseInitScriptTest {
|
|||||||
// TODO:DAZ This props are set too late to control init-script plugin resolution
|
// TODO:DAZ This props are set too late to control init-script plugin resolution
|
||||||
// This makes the tests fail on Mac with Gradle < 6
|
// This makes the tests fail on Mac with Gradle < 6
|
||||||
def args = jvmArgs
|
def args = jvmArgs
|
||||||
args.add('-DGRADLE_PLUGIN_REPOSITORY_URL=https://plugins.grdev.net/m2')
|
args.add('-Dgradle.plugin-repository.url=https://plugins.grdev.net/m2')
|
||||||
def result = run(['help', '--info'], initScript, testGradleVersion.gradleVersion, args, vars)
|
def result = run(['help', '--info'], initScript, testGradleVersion.gradleVersion, args, vars)
|
||||||
|
|
||||||
then:
|
then:
|
||||||
@@ -160,12 +160,11 @@ class TestDependencyGraph extends BaseInitScriptTest {
|
|||||||
vars.put('GRADLE_PLUGIN_REPOSITORY_URL', 'https://plugins.grdev.net/m2')
|
vars.put('GRADLE_PLUGIN_REPOSITORY_URL', 'https://plugins.grdev.net/m2')
|
||||||
vars.put('GRADLE_PLUGIN_REPOSITORY_USERNAME', 'REPO_USER')
|
vars.put('GRADLE_PLUGIN_REPOSITORY_USERNAME', 'REPO_USER')
|
||||||
vars.put('GRADLE_PLUGIN_REPOSITORY_PASSWORD', 'REPO_PASSWORD')
|
vars.put('GRADLE_PLUGIN_REPOSITORY_PASSWORD', 'REPO_PASSWORD')
|
||||||
// TODO:DAZ This props are set too late to control init-script plugin resolution
|
|
||||||
// This makes the tests fail on Mac with Gradle < 6
|
|
||||||
def args = jvmArgs
|
def args = jvmArgs
|
||||||
args.add('-DGRADLE_PLUGIN_REPOSITORY_URL=https://plugins.grdev.net/m2')
|
args.add('-Dgradle.plugin-repository.url=https://plugins.grdev.net/m2')
|
||||||
args.add('-DGRADLE_PLUGIN_REPOSITORY_USERNAME=REPO_USER')
|
args.add('-Dgradle.plugin-repository.username=REPO_USER')
|
||||||
args.add('-DGRADLE_PLUGIN_REPOSITORY_PASSWORD=REPO_PASSWORD')
|
args.add('-Dgradle.plugin-repository.password=REPO_PASSWORD')
|
||||||
def result = run(['help', '--info'], initScript, testGradleVersion.gradleVersion, args, vars)
|
def result = run(['help', '--info'], initScript, testGradleVersion.gradleVersion, args, vars)
|
||||||
|
|
||||||
then:
|
then:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||||||
def initScript = 'gradle-actions.inject-develocity.init.gradle'
|
def initScript = 'gradle-actions.inject-develocity.init.gradle'
|
||||||
|
|
||||||
private static final GradleVersion GRADLE_5 = GradleVersion.version('5.0')
|
private static final GradleVersion GRADLE_5 = GradleVersion.version('5.0')
|
||||||
|
private static final GradleVersion GRADLE_6 = GradleVersion.version('6.0')
|
||||||
|
|
||||||
def "does not apply Develocity plugins when not requested"() {
|
def "does not apply Develocity plugins when not requested"() {
|
||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
@@ -91,19 +92,12 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||||||
def "applies deprecated Gradle Enterprise or Build Scan plugins if requested"() {
|
def "applies deprecated Gradle Enterprise or Build Scan plugins if requested"() {
|
||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
||||||
given:
|
|
||||||
def appliedPluginClass = testGradleVersion.gradleVersion >= GradleVersion.version("6.0")
|
|
||||||
? "com.gradle.enterprise.gradleplugin.GradleEnterprisePlugin"
|
|
||||||
: "com.gradle.scan.plugin.BuildScanPlugin"
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
// 3.16.2 is the latest version of deprecated plugins
|
// 3.16.2 is the latest version of deprecated plugins
|
||||||
def result = run(testGradleVersion, testConfig('3.16.2'))
|
def result = run(testGradleVersion, testConfig('3.16.2'))
|
||||||
|
|
||||||
then:
|
then:
|
||||||
1 == result.output.count("Applying $appliedPluginClass via init script")
|
outputContainsDevelocityPluginApplicationViaInitScript(result, testGradleVersion.gradleVersion, '3.16.2')
|
||||||
|
|
||||||
and:
|
|
||||||
outputContainsBuildScanUrl(result)
|
outputContainsBuildScanUrl(result)
|
||||||
|
|
||||||
where:
|
where:
|
||||||
@@ -366,35 +360,52 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||||||
assert 1 == result.output.count(message)
|
assert 1 == result.output.count(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
void outputContainsDevelocityPluginApplicationViaInitScript(BuildResult result, GradleVersion gradleVersion) {
|
void outputContainsDevelocityPluginApplicationViaInitScript(BuildResult result, GradleVersion gradleVersion, String pluginVersion = DEVELOCITY_PLUGIN_VERSION) {
|
||||||
def pluginApplicationLogMsgGradle4 = "Applying com.gradle.scan.plugin.BuildScanPlugin via init script"
|
def pluginApplicationLogMsgGradle4 = "Applying com.gradle.scan.plugin.BuildScanPlugin with version 1.16 via init script"
|
||||||
def pluginApplicationLogMsgGradle5AndHigher = "Applying com.gradle.develocity.agent.gradle.DevelocityPlugin via init script"
|
def pluginApplicationLogMsgBuildScanPlugin = "Applying com.gradle.scan.plugin.BuildScanPlugin with version ${pluginVersion} via init script"
|
||||||
|
def pluginApplicationLogMsgGEPlugin = "Applying com.gradle.enterprise.gradleplugin.GradleEnterprisePlugin with version ${pluginVersion} via init script"
|
||||||
|
def pluginApplicationLogMsgDVPlugin = "Applying com.gradle.develocity.agent.gradle.DevelocityPlugin with version ${pluginVersion} via init script"
|
||||||
|
|
||||||
|
def isGEPluginVersion = GradleVersion.version(pluginVersion) < GradleVersion.version("3.17")
|
||||||
|
|
||||||
if (gradleVersion < GRADLE_5) {
|
if (gradleVersion < GRADLE_5) {
|
||||||
assert result.output.contains(pluginApplicationLogMsgGradle4)
|
assert result.output.contains(pluginApplicationLogMsgGradle4)
|
||||||
assert 1 == result.output.count(pluginApplicationLogMsgGradle4)
|
assert 1 == result.output.count(pluginApplicationLogMsgGradle4)
|
||||||
assert !result.output.contains(pluginApplicationLogMsgGradle5AndHigher)
|
assert !result.output.contains(pluginApplicationLogMsgGEPlugin)
|
||||||
} else {
|
assert !result.output.contains(pluginApplicationLogMsgDVPlugin)
|
||||||
assert result.output.contains(pluginApplicationLogMsgGradle5AndHigher)
|
} else if (gradleVersion < GRADLE_6 && isGEPluginVersion) {
|
||||||
assert 1 == result.output.count(pluginApplicationLogMsgGradle5AndHigher)
|
assert result.output.contains(pluginApplicationLogMsgBuildScanPlugin)
|
||||||
|
assert 1 == result.output.count(pluginApplicationLogMsgBuildScanPlugin)
|
||||||
|
assert !result.output.contains(pluginApplicationLogMsgGEPlugin)
|
||||||
|
assert !result.output.contains(pluginApplicationLogMsgDVPlugin)
|
||||||
|
} else if (isGEPluginVersion) {
|
||||||
|
assert result.output.contains(pluginApplicationLogMsgGEPlugin)
|
||||||
|
assert 1 == result.output.count(pluginApplicationLogMsgGEPlugin)
|
||||||
assert !result.output.contains(pluginApplicationLogMsgGradle4)
|
assert !result.output.contains(pluginApplicationLogMsgGradle4)
|
||||||
|
assert !result.output.contains(pluginApplicationLogMsgDVPlugin)
|
||||||
|
} else {
|
||||||
|
assert result.output.contains(pluginApplicationLogMsgDVPlugin)
|
||||||
|
assert 1 == result.output.count(pluginApplicationLogMsgDVPlugin)
|
||||||
|
assert !result.output.contains(pluginApplicationLogMsgGradle4)
|
||||||
|
assert !result.output.contains(pluginApplicationLogMsgGEPlugin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void outputMissesDevelocityPluginApplicationViaInitScript(BuildResult result) {
|
void outputMissesDevelocityPluginApplicationViaInitScript(BuildResult result) {
|
||||||
def pluginApplicationLogMsgGradle4 = "Applying com.gradle.scan.plugin.BuildScanPlugin via init script"
|
def pluginApplicationLogMsgGradle4 = "Applying com.gradle.scan.plugin.BuildScanPlugin"
|
||||||
def pluginApplicationLogMsgGradle5AndHigher = "Applying com.gradle.develocity.agent.gradle.DevelocityPlugin via init script"
|
def pluginApplicationLogMsgGradle5AndHigher = "Applying com.gradle.develocity.agent.gradle.DevelocityPlugin"
|
||||||
assert !result.output.contains(pluginApplicationLogMsgGradle4)
|
assert !result.output.contains(pluginApplicationLogMsgGradle4)
|
||||||
assert !result.output.contains(pluginApplicationLogMsgGradle5AndHigher)
|
assert !result.output.contains(pluginApplicationLogMsgGradle5AndHigher)
|
||||||
}
|
}
|
||||||
|
|
||||||
void outputContainsCcudPluginApplicationViaInitScript(BuildResult result) {
|
void outputContainsCcudPluginApplicationViaInitScript(BuildResult result, String ccudPluginVersion = CCUD_PLUGIN_VERSION) {
|
||||||
def pluginApplicationLogMsg = "Applying com.gradle.CommonCustomUserDataGradlePlugin via init script"
|
def pluginApplicationLogMsg = "Applying com.gradle.CommonCustomUserDataGradlePlugin with version ${ccudPluginVersion} via init script"
|
||||||
assert result.output.contains(pluginApplicationLogMsg)
|
assert result.output.contains(pluginApplicationLogMsg)
|
||||||
assert 1 == result.output.count(pluginApplicationLogMsg)
|
assert 1 == result.output.count(pluginApplicationLogMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void outputMissesCcudPluginApplicationViaInitScript(BuildResult result) {
|
void outputMissesCcudPluginApplicationViaInitScript(BuildResult result) {
|
||||||
def pluginApplicationLogMsg = "Applying com.gradle.CommonCustomUserDataGradlePlugin via init script"
|
def pluginApplicationLogMsg = "Applying com.gradle.CommonCustomUserDataGradlePlugin"
|
||||||
assert !result.output.contains(pluginApplicationLogMsg)
|
assert !result.output.contains(pluginApplicationLogMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ test('will cleanup unused gradle versions', async () => {
|
|||||||
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
|
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
|
||||||
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
|
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
|
||||||
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
|
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
|
||||||
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.11")
|
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.11.1")
|
||||||
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.107")
|
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.107")
|
||||||
|
|
||||||
expect(fs.existsSync(gradle802)).toBe(true)
|
expect(fs.existsSync(gradle802)).toBe(true)
|
||||||
|
|||||||
@@ -2,7 +2,23 @@ import * as checksums from '../../../src/wrapper-validation/checksums'
|
|||||||
import nock from 'nock'
|
import nock from 'nock'
|
||||||
import {afterEach, describe, expect, test, jest} from '@jest/globals'
|
import {afterEach, describe, expect, test, jest} from '@jest/globals'
|
||||||
|
|
||||||
jest.setTimeout(30000)
|
jest.setTimeout(60000)
|
||||||
|
|
||||||
|
const CHECKSUM_8_1 = 'ed2c26eba7cfb93cc2b7785d05e534f07b5b48b5e7fc941921cd098628abca58'
|
||||||
|
|
||||||
|
function knownChecksumsWithout8_1(): checksums.WrapperChecksums {
|
||||||
|
const knownChecksums = new checksums.WrapperChecksums()
|
||||||
|
// iterate over all known checksums and add them to the knownChecksums object
|
||||||
|
for (const [checksum, versions] of checksums.KNOWN_CHECKSUMS.checksums) {
|
||||||
|
if (checksum !== CHECKSUM_8_1) {
|
||||||
|
for (const version of versions) {
|
||||||
|
knownChecksums.add(version, checksum)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return knownChecksums
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
test('has loaded hardcoded wrapper jars checksums', async () => {
|
test('has loaded hardcoded wrapper jars checksums', async () => {
|
||||||
// Sanity check that generated checksums file is not empty and was properly imported
|
// Sanity check that generated checksums file is not empty and was properly imported
|
||||||
@@ -20,33 +36,23 @@ test('has loaded hardcoded wrapper jars checksums', async () => {
|
|||||||
).toEqual(new Set(['6.0-rc-1', '6.0-rc-2', '6.0-rc-3', '6.0', '6.0.1']))
|
).toEqual(new Set(['6.0-rc-1', '6.0-rc-2', '6.0-rc-3', '6.0', '6.0.1']))
|
||||||
})
|
})
|
||||||
|
|
||||||
test('fetches wrapper jars checksums', async () => {
|
test('fetches wrapper jar checksums that are missing from hardcoded set', async () => {
|
||||||
const validChecksums = await checksums.fetchUnknownChecksums(false, new checksums.WrapperChecksums)
|
const unknownChecksums = await checksums.fetchUnknownChecksums(false, knownChecksumsWithout8_1())
|
||||||
expect(validChecksums.size).toBeGreaterThan(10)
|
|
||||||
// Verify that checksum of arbitrary version is contained
|
expect(unknownChecksums.checksums.size).toBeGreaterThan(0)
|
||||||
expect(
|
expect(unknownChecksums.checksums.has(CHECKSUM_8_1)).toBe(true)
|
||||||
validChecksums.has(
|
expect(unknownChecksums.checksums.get(CHECKSUM_8_1)).toEqual(new Set(['8.1-rc-1', '8.1-rc-2', '8.1-rc-3', '8.1-rc-4', '8.1', '8.1.1']))
|
||||||
// Checksum for version 6.0
|
|
||||||
'28b330c20a9a73881dfe9702df78d4d78bf72368e8906c70080ab6932462fe9e'
|
|
||||||
)
|
|
||||||
).toBe(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('fetches wrapper jar checksums for snapshots', async () => {
|
test('fetches wrapper jar checksums for snapshots', async () => {
|
||||||
const nonSnapshotChecksums = await checksums.fetchUnknownChecksums(false, new checksums.WrapperChecksums)
|
const knownChecksums = knownChecksumsWithout8_1()
|
||||||
const validChecksums = await checksums.fetchUnknownChecksums(true, new checksums.WrapperChecksums)
|
const nonSnapshotChecksums = await checksums.fetchUnknownChecksums(false, knownChecksums)
|
||||||
|
const allValidChecksums = await checksums.fetchUnknownChecksums(true, knownChecksums)
|
||||||
|
|
||||||
// Expect that at least one snapshot checksum is different from the non-snapshot checksums
|
// Should always be many more snapshot versions
|
||||||
expect(nonSnapshotChecksums.size).toBeGreaterThan(10)
|
expect(allValidChecksums.versions.size - nonSnapshotChecksums.versions.size).toBeGreaterThan(20)
|
||||||
expect(validChecksums.size).toBeGreaterThanOrEqual(nonSnapshotChecksums.size)
|
// May not be any unique snapshot checksums
|
||||||
})
|
expect(allValidChecksums.checksums.size).toBeGreaterThanOrEqual(nonSnapshotChecksums.checksums.size)
|
||||||
|
|
||||||
test('fetches all wrapper checksum URLS for snapshots', async () => {
|
|
||||||
const checksumUrls: string[] = []
|
|
||||||
await checksums.addDistributionSnapshotChecksums(checksumUrls)
|
|
||||||
|
|
||||||
expect(checksumUrls.length).toBeGreaterThan(100) // May only be a few unique checksums
|
|
||||||
console.log(checksumUrls)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('retry', () => {
|
describe('retry', () => {
|
||||||
@@ -64,8 +70,8 @@ describe('retry', () => {
|
|||||||
code: 'ECONNREFUSED'
|
code: 'ECONNREFUSED'
|
||||||
})
|
})
|
||||||
|
|
||||||
const validChecksums = await checksums.fetchUnknownChecksums(false, new checksums.WrapperChecksums)
|
const validChecksums = await checksums.fetchUnknownChecksums(false, knownChecksumsWithout8_1())
|
||||||
expect(validChecksums.size).toBeGreaterThan(10)
|
expect(validChecksums.checksums.size).toBeGreaterThan(0)
|
||||||
nock.isDone()
|
nock.isDone()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as path from 'path'
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as validate from '../../../src/wrapper-validation/validate'
|
import * as validate from '../../../src/wrapper-validation/validate'
|
||||||
import {expect, test, jest} from '@jest/globals'
|
import {expect, test, jest} from '@jest/globals'
|
||||||
import { WrapperChecksums } from '../../../src/wrapper-validation/checksums'
|
import { WrapperChecksums, KNOWN_CHECKSUMS } from '../../../src/wrapper-validation/checksums'
|
||||||
import { ChecksumCache } from '../../../src/wrapper-validation/cache'
|
import { ChecksumCache } from '../../../src/wrapper-validation/cache'
|
||||||
import exp from 'constants'
|
import exp from 'constants'
|
||||||
|
|
||||||
@@ -11,6 +11,21 @@ jest.setTimeout(30000)
|
|||||||
const baseDir = path.resolve('./test/jest/wrapper-validation')
|
const baseDir = path.resolve('./test/jest/wrapper-validation')
|
||||||
const tmpDir = path.resolve('./test/jest/tmp')
|
const tmpDir = path.resolve('./test/jest/tmp')
|
||||||
|
|
||||||
|
const CHECKSUM_3888 = '3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce'
|
||||||
|
|
||||||
|
function knownChecksumsWithout3888(): WrapperChecksums {
|
||||||
|
const knownChecksums = new WrapperChecksums()
|
||||||
|
// iterate over all known checksums and add them to the knownChecksums object
|
||||||
|
for (const [checksum, versions] of KNOWN_CHECKSUMS.checksums) {
|
||||||
|
if (checksum !== CHECKSUM_3888) {
|
||||||
|
for (const version of versions) {
|
||||||
|
knownChecksums.add(version, checksum)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return knownChecksums
|
||||||
|
}
|
||||||
|
|
||||||
test('succeeds if all found wrapper jars are valid', async () => {
|
test('succeeds if all found wrapper jars are valid', async () => {
|
||||||
const result = await validate.findInvalidWrapperJars(baseDir, false, [
|
const result = await validate.findInvalidWrapperJars(baseDir, false, [
|
||||||
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
||||||
@@ -47,7 +62,7 @@ test('succeeds if all found wrapper jars are previously valid', async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('succeeds if all found wrapper jars are valid (and checksums are fetched from Gradle API)', async () => {
|
test('succeeds if all found wrapper jars are valid (and checksums are fetched from Gradle API)', async () => {
|
||||||
const knownValidChecksums = new WrapperChecksums()
|
const knownValidChecksums = knownChecksumsWithout3888()
|
||||||
const result = await validate.findInvalidWrapperJars(
|
const result = await validate.findInvalidWrapperJars(
|
||||||
baseDir,
|
baseDir,
|
||||||
false,
|
false,
|
||||||
|
|||||||
Reference in New Issue
Block a user