mirror of
https://github.com/gradle/actions.git
synced 2026-06-14 07:30:41 +00:00
Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f5a111e6f | |||
| 4ecda0ee35 | |||
| 79c65f4225 | |||
| cb8f8c9bc3 | |||
| 88020b1ce1 | |||
| d885df93e3 | |||
| fccb7323bf | |||
| ab6eefcd4a | |||
| ce13e2edb5 | |||
| 54d3208a40 | |||
| e993c93d71 | |||
| 3f131e8634 | |||
| 97715a29bc | |||
| 8b6cdb5f58 | |||
| 5852e0e5d8 | |||
| 318eed7038 | |||
| a740661292 | |||
| 7ae0d0208c | |||
| e473973a5b | |||
| 35a4a3f355 | |||
| b6eebf33f1 | |||
| 9901393644 | |||
| 20ce680c89 | |||
| 5e2ebd065d | |||
| 9e2c1cc01d | |||
| 657f690528 | |||
| 9d6bacde37 | |||
| 79f6b196a7 | |||
| 6781648d2b | |||
| a3b40d2308 | |||
| f37016fb25 | |||
| 2afdab2a02 | |||
| 1046ffaf33 | |||
| 8499b50242 | |||
| a16ad4ab25 | |||
| e9965bd762 | |||
| 6959d5a1db | |||
| 139f652ee4 | |||
| 77818a6789 | |||
| d0dd67506b | |||
| 0f159117b5 | |||
| 11d4d83c63 |
@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
@@ -23,7 +23,7 @@ runs:
|
||||
cp -r sources/dist .
|
||||
|
||||
- name: Upload distribution
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
@@ -15,12 +15,6 @@ updates:
|
||||
npm-dependencies:
|
||||
patterns:
|
||||
- "*"
|
||||
ignore:
|
||||
# Keep actions/cache and actions/artifact major aligned and force actions/cache version to match patch
|
||||
- dependency-name: "*actions/cache*"
|
||||
- dependency-name: "*actions/artifact*"
|
||||
update-types: ["version-update:semver-major", "version-update:semver-minor"]
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
# github-actions with directory: "/" only monitors .github/workflows
|
||||
# https://github.com/dependabot/dependabot-core/issues/6345
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,7 +65,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
@@ -73,21 +73,10 @@ goto fail
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,7 +65,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
@@ -73,21 +73,10 @@ goto fail
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.4.0"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,7 +65,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
@@ -73,21 +73,10 @@ goto fail
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,7 +65,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
@@ -73,21 +73,10 @@ goto fail
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("com.gradle.develocity") version "4.4.0"
|
||||
id("com.gradle.develocity") version "4.4.2"
|
||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.4.0"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.4.0"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.4.0"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
||||
@@ -18,15 +18,15 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: sources/package-lock.json
|
||||
- name: Setup Gradle
|
||||
# Use a released version to avoid breakages
|
||||
uses: gradle/actions/setup-gradle@39e147cb9de83bb9910b8ef8bd7fff0ee20fcd6f # v6.0.1
|
||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
env:
|
||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||
with:
|
||||
|
||||
@@ -15,13 +15,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
||||
with:
|
||||
files: |
|
||||
dist/**
|
||||
|
||||
@@ -31,11 +31,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
|
||||
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3.29.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config: |
|
||||
@@ -43,4 +43,4 @@ jobs:
|
||||
- sources/src
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
|
||||
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3.29.5
|
||||
|
||||
@@ -8,10 +8,6 @@ on:
|
||||
paths-ignore:
|
||||
- 'dist/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/ci-init-script-check.yml'
|
||||
- 'sources/src/resources/init-scripts/**'
|
||||
- 'sources/test/init-scripts/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -22,17 +18,35 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Detect whether anything relevant to the init-script tests changed.
|
||||
# The workflow always runs (so it always reports a status check, making it safe
|
||||
# to mark as required), but the heavy steps below are skipped on pull requests
|
||||
# that don't touch the init-scripts. Pushes and manual runs always execute fully.
|
||||
- name: Check for relevant changes
|
||||
id: changes
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
||||
with:
|
||||
files: |
|
||||
.github/workflows/ci-init-script-check.yml
|
||||
sources/src/resources/init-scripts/**
|
||||
sources/test/init-scripts/**
|
||||
- name: Setup Java
|
||||
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Setup Gradle
|
||||
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||
# Use a released version to avoid breakages
|
||||
uses: gradle/actions/setup-gradle@39e147cb9de83bb9910b8ef8bd7fff0ee20fcd6f # v6.0.1
|
||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
env:
|
||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||
- name: Run integration tests
|
||||
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||
working-directory: sources/test/init-scripts
|
||||
run: ./gradlew check
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Build and upload distribution
|
||||
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
|
||||
uses: ./.github/actions/build-dist
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/suite-integ-test-caching.yml
|
||||
concurrency:
|
||||
group: CI-integ-test-caching
|
||||
group: CI-integ-test-caching-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
with:
|
||||
skip-dist: false
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
needs: caching-integ-tests
|
||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||
concurrency:
|
||||
group: CI-integ-test-other
|
||||
group: CI-integ-test-other-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
with:
|
||||
skip-dist: false
|
||||
@@ -52,8 +52,29 @@ jobs:
|
||||
needs: other-integ-tests
|
||||
uses: ./.github/workflows/suite-integ-test-dependency-submission.yml
|
||||
concurrency:
|
||||
group: CI-integ-test-dependency-submission
|
||||
group: CI-integ-test-dependency-submission-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
with:
|
||||
skip-dist: false
|
||||
secrets: inherit
|
||||
|
||||
# Aggregate gate: a single check that succeeds only when all integ-test jobs succeed.
|
||||
# Require this one check in branch protection instead of every fanned-out matrix job.
|
||||
integ-test-success:
|
||||
if: ${{ always() }}
|
||||
needs:
|
||||
- build-distribution
|
||||
- caching-integ-tests
|
||||
- other-integ-tests
|
||||
- dependency-submission-integ-tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fail if any integ-test job failed or was cancelled
|
||||
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
||||
run: |
|
||||
echo "One or more integ-test jobs did not succeed:"
|
||||
echo " build-distribution: ${{ needs.build-distribution.result }}"
|
||||
echo " caching-integ-tests: ${{ needs.caching-integ-tests.result }}"
|
||||
echo " other-integ-tests: ${{ needs.other-integ-tests.result }}"
|
||||
echo " dependency-submission-integ-tests: ${{ needs.dependency-submission-integ-tests.result }}"
|
||||
exit 1
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
# 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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
|
||||
@@ -23,12 +23,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
validate-typings:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: typesafegithub/github-actions-typing@9ddf35b71a482be7d8922b28e8d00df16b77e315 # v2.2.2
|
||||
with:
|
||||
ignored-action-files: |
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
validation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: gradle/actions/wrapper-validation@39e147cb9de83bb9910b8ef8bd7fff0ee20fcd6f # v6.0.1
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
with:
|
||||
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -137,7 +137,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -154,7 +154,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
run: gradle help
|
||||
- name: Check Build Scan url
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
run: ./gradlew help
|
||||
- name: Check Build Scan url is captured
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
run: ./gradlew help
|
||||
- name: Check Build Scan url is captured
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -170,7 +170,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -123,7 +123,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -255,7 +255,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -272,7 +272,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -309,7 +309,7 @@ jobs:
|
||||
runs-on: ubuntu-latest # Test is not compatible with Windows
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -350,7 +350,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -382,7 +382,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -401,7 +401,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: ['3.16.2', '4.4.0']
|
||||
plugin-version: ['3.16.2', '4.4.2']
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
java-version: 11
|
||||
- plugin-version: '3.16.2'
|
||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||
- plugin-version: '4.4.0'
|
||||
- plugin-version: '4.4.2'
|
||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
run: gradle help
|
||||
- name: Check Build Scan url
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: ['3.16.2', '4.4.0']
|
||||
plugin-version: ['3.16.2', '4.4.2']
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
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
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
@@ -148,7 +148,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: [ '3.16.2', '4.4.0' ]
|
||||
plugin-version: [ '3.16.2', '4.4.2' ]
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -162,7 +162,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -191,7 +191,7 @@ jobs:
|
||||
matrix:
|
||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
plugin-version: [ '3.16.2', '4.4.0' ]
|
||||
plugin-version: [ '3.16.2', '4.4.2' ]
|
||||
include:
|
||||
- java-version: 17
|
||||
- gradle: '8.14.3'
|
||||
@@ -205,7 +205,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -225,7 +225,7 @@ jobs:
|
||||
run: gradle help
|
||||
- name: Check Build Scan url
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
run: gradle help
|
||||
- name: Check current version output parameter
|
||||
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '9.') }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
gradle-version: ${{ matrix.gradle }}
|
||||
- name: Check output parameter
|
||||
if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')
|
||||
@@ -132,7 +132,7 @@ jobs:
|
||||
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
|
||||
- name: Check Build Scan url
|
||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('No Build Scan detected')
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
container: fedora:latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
container: fedora:latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
with:
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Initialize integ-test
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.2.2 # Checkout the repository with no wrappers
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v4.2.2 # Checkout the repository with no wrappers
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github/actions
|
||||
|
||||
@@ -19,10 +19,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
# If there are no changes, this action will not create a pull request
|
||||
- name: Create or update pull request
|
||||
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||||
with:
|
||||
branch: bot/wrapper-checksums-update
|
||||
author: bot-githubaction <bot-githubaction@gradle.com>
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
```
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
```
|
||||
|
||||
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: gradle/actions/wrapper-validation@v5
|
||||
- uses: gradle/actions/wrapper-validation@v6
|
||||
```
|
||||
|
||||
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.
|
||||
|
||||
+4
-4
@@ -11,16 +11,16 @@
|
||||
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
|
||||
|
||||
## Release gradle/actions
|
||||
- Create a tag for the release. The tag should have the format `v5.0.0`
|
||||
- From CLI: `git tag -s -m "v5.0.0" v5.0.0 && git push --tags`
|
||||
- Create a tag for the release. The tag should have the format `v6.2.0`
|
||||
- From CLI: `git tag -s -m "v6.2.0" v6.2.0 && git push --tags`
|
||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||
- Go to https://github.com/gradle/actions/releases and "Draft new release"
|
||||
- Use the newly created tag and copy the tag name exactly as the release title.
|
||||
- Craft release notes content based on issues closed, PRs merged and commits
|
||||
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
|
||||
- Publish the release.
|
||||
- Force push the `v5` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
|
||||
- From CLI: `git tag -f -s -a -m "v5.0.0" v5 && git push -f --tags`
|
||||
- Force push the `v6` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
|
||||
- From CLI: `git tag -f -s -a -m "v6.2.0" v6 && git push -f --tags`
|
||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||
- Your HEAD must point at the commit to be tagged.
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
```
|
||||
|
||||
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.
|
||||
|
||||
@@ -8,10 +8,16 @@ inputs:
|
||||
type: string
|
||||
|
||||
dependency-resolution-task:
|
||||
type: string
|
||||
type: list
|
||||
separator: ' '
|
||||
list-item:
|
||||
type: string
|
||||
|
||||
additional-arguments:
|
||||
type: string
|
||||
type: list
|
||||
separator: ' '
|
||||
list-item:
|
||||
type: string
|
||||
|
||||
# Cache configuration
|
||||
cache-provider:
|
||||
@@ -115,7 +121,7 @@ inputs:
|
||||
build-scan-terms-of-use-agree:
|
||||
type: enum
|
||||
allowed-values:
|
||||
- 'yes'
|
||||
- yes
|
||||
|
||||
develocity-access-key:
|
||||
type: string
|
||||
|
||||
+162
-158
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+198
-142
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+161
-157
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+222
-165
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+76
-62
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@ If you're confused by the behaviour you're seeing or have specific questions, pl
|
||||
> **Prefer a 100% Open Source (MIT) path?**
|
||||
> We also provide a **Basic Caching** provider as a thin wrapper over `actions/cache`. This provider is **free for all repositories** (public and private) and can be enabled at any time by setting `cache-provider: basic`.
|
||||
>
|
||||
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](./DISTRIBUTION.md).
|
||||
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](../DISTRIBUTION.md).
|
||||
|
||||
## General usage
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
```
|
||||
|
||||
### Gradle execution
|
||||
@@ -88,7 +88,7 @@ Three input parameters are required, one to enable publishing and two more to ac
|
||||
|
||||
```yaml
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
build-scan-publish: true
|
||||
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
|
||||
@@ -103,7 +103,7 @@ In some cases, the default action configuration will not be sufficient, and addi
|
||||
|
||||
```yaml
|
||||
- name: Generate and save dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
# Use a particular Gradle version instead of the configured wrapper.
|
||||
gradle-version: '8.6'
|
||||
@@ -150,7 +150,7 @@ To reduce storage costs for these artifacts, you can:
|
||||
|
||||
```yaml
|
||||
- name: Generate dependency graph but only store workflow artifacts for 1 day
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
artifact-retention-days: 1 # Default is 30 days or as configured for repository
|
||||
```
|
||||
@@ -159,7 +159,7 @@ To reduce storage costs for these artifacts, you can:
|
||||
|
||||
```yaml
|
||||
- name: Generate and submit dependency graph but do not store as workflow artifact
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
dependency-graph: 'generate-and-submit' # Default value is 'generate-submit-and-upload'
|
||||
```
|
||||
@@ -319,7 +319,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
|
||||
|
||||
```yaml
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
||||
dependency-graph-exclude-projects: ':buildSrc'
|
||||
@@ -370,7 +370,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
```
|
||||
|
||||
#### 2. Add a dedicated Dependency Review workflow
|
||||
@@ -432,7 +432,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Generate and save dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
dependency-graph: generate-and-upload
|
||||
```
|
||||
@@ -455,7 +455,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v5
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
with:
|
||||
dependency-graph: download-and-submit # Download saved dependency-graph and submit
|
||||
```
|
||||
|
||||
@@ -20,7 +20,7 @@ To convert your workflows, simply replace:
|
||||
```
|
||||
with
|
||||
```
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
```
|
||||
|
||||
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
|
||||
@@ -40,7 +40,7 @@ To convert your workflows, simply replace:
|
||||
```
|
||||
with
|
||||
```
|
||||
uses: gradle/actions/wrapper-validation@v5
|
||||
uses: gradle/actions/wrapper-validation@v6
|
||||
```
|
||||
|
||||
## Using the action to execute Gradle via the `arguments` parameter is deprecated
|
||||
@@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
||||
|
||||
```
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Assemble the project
|
||||
run: ./gradlew assemble
|
||||
@@ -99,7 +99,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
||||
|
||||
```
|
||||
- name: Setup Gradle for a non-wrapper project
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
gradle-version: '8.11'
|
||||
|
||||
|
||||
+30
-22
@@ -9,7 +9,7 @@ This GitHub Action can be used to configure Gradle for optimal execution on any
|
||||
> **Prefer a 100% Open Source (MIT) path?**
|
||||
> We also provide a **Basic Caching** provider as a thin wrapper over `actions/cache`. This provider is **free for all repositories** (public and private) and can be enabled at any time by setting `cache-provider: basic`.
|
||||
>
|
||||
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](./DISTRIBUTION.md).
|
||||
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](../DISTRIBUTION.md).
|
||||
|
||||
## Why use the `setup-gradle` action?
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Execute Gradle build
|
||||
run: ./gradlew build
|
||||
@@ -68,7 +68,7 @@ Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid havi
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle 8.10
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
gradle-version: '8.10' # Quotes required to prevent YAML converting to number
|
||||
- name: Build with Gradle 8.10
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- uses: gradle/actions/setup-gradle@v5
|
||||
- uses: gradle/actions/setup-gradle@v6
|
||||
id: setup-gradle
|
||||
with:
|
||||
gradle-version: release-candidate
|
||||
@@ -135,8 +135,11 @@ You choose which provider to use via the `cache-provider` input:
|
||||
- **`basic`**: A fully open-source (MIT) caching implementation built on the standard GitHub Actions cache (`@actions/cache`). Uses the same caching strategy as `actions/setup-java` with `cache: gradle`. See [Basic Caching](#basic-caching) for details.
|
||||
|
||||
```yaml
|
||||
# Use the open-source basic cache provider
|
||||
cache-provider: basic
|
||||
# Use the open-source basic cache provider
|
||||
- uses: gradle/actions/setup-gradle@v6
|
||||
id: setup-gradle
|
||||
with:
|
||||
cache-provider: basic
|
||||
```
|
||||
|
||||
### Common cache configuration
|
||||
@@ -538,13 +541,18 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
add-job-summary-as-pr-comment: 'on-failure' # Valid values are 'never' (default), 'always', and 'on-failure'
|
||||
|
||||
- run: ./gradlew build --scan
|
||||
```
|
||||
|
||||
When a comment is added, any earlier Job Summary comments posted by the same job on that Pull Request are
|
||||
automatically minimized, so only the most recent result remains expanded. This also applies when
|
||||
`add-job-summary-as-pr-comment: 'on-failure'` is used: once a later run of the job succeeds, the previous
|
||||
failure comment is collapsed.
|
||||
|
||||
Note that to add a Pull Request comment, the workflow must be configured with the `pull-requests: write` permission.
|
||||
|
||||
|
||||
@@ -575,7 +583,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Run build with Gradle wrapper
|
||||
run: ./gradlew build --scan
|
||||
@@ -606,7 +614,7 @@ If you do not want wrapper-validation to occur automatically, you can disable it
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
validate-wrappers: false
|
||||
```
|
||||
@@ -618,7 +626,7 @@ These are not allowed by default.
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
validate-wrappers: true
|
||||
allow-snapshot-wrappers: true
|
||||
@@ -683,7 +691,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle to generate and submit dependency graphs
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
dependency-graph: generate-and-submit
|
||||
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
|
||||
@@ -710,7 +718,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
|
||||
|
||||
```yaml
|
||||
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
|
||||
- uses: gradle/actions/setup-gradle@v5
|
||||
- uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
dependency-graph: generate-and-submit
|
||||
dependency-graph-continue-on-failure: false
|
||||
@@ -735,7 +743,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle to generate and submit dependency graphs
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
dependency-graph: generate-and-submit
|
||||
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
|
||||
@@ -765,7 +773,7 @@ jobs:
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle to generate and submit dependency graphs
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
dependency-graph: generate-and-submit
|
||||
- name: Build the app, generating a graph of dependencies required
|
||||
@@ -809,7 +817,7 @@ To publish to https://scans.gradle.com, you must specify in your workflow that y
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle to publish build scans
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
build-scan-publish: true
|
||||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
||||
@@ -831,7 +839,7 @@ The short-lived access token will then be used wherever a Develocity access key
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
|
||||
|
||||
@@ -849,7 +857,7 @@ To avoid this, use the `develocity-token-expiry` parameter to specify a differen
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||
develocity-token-expiry: '8' # The number of hours that the access token should remain valid (max 24).
|
||||
@@ -871,7 +879,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
# The build will automatically use a short-lived access token to authenticate with Develocity
|
||||
- name: Run a Gradle build that is configured to publish to Develocity.
|
||||
@@ -903,7 +911,7 @@ Here's a minimal example:
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
develocity-injection-enabled: true
|
||||
develocity-url: 'https://develocity.your-server.com'
|
||||
@@ -913,14 +921,14 @@ Here's a minimal example:
|
||||
run: ./gradlew build
|
||||
```
|
||||
|
||||
This configuration will automatically apply `v4.4.0` 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 `v4.4.2` 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.
|
||||
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:
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
with:
|
||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||
|
||||
@@ -971,7 +979,7 @@ Here's an example using the env vars:
|
||||
|
||||
```yaml
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Run a Gradle build with Develocity injection enabled with environment variables
|
||||
run: ./gradlew build
|
||||
|
||||
@@ -50,7 +50,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
|
||||
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
|
||||
|
||||
```yaml
|
||||
uses: gradle/actions/wrapper-validation@v5
|
||||
uses: gradle/actions/wrapper-validation@v6
|
||||
```
|
||||
|
||||
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: gradle/actions/wrapper-validation@v5
|
||||
- uses: gradle/actions/wrapper-validation@v6
|
||||
```
|
||||
|
||||
## Contributing to an external GitHub Repository
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
```
|
||||
|
||||
@@ -69,6 +69,7 @@ inputs:
|
||||
- disabled
|
||||
- generate
|
||||
- generate-and-submit
|
||||
- generate-submit-and-upload
|
||||
- generate-and-upload
|
||||
- download-and-submit
|
||||
|
||||
@@ -106,7 +107,7 @@ inputs:
|
||||
build-scan-terms-of-use-agree:
|
||||
type: enum
|
||||
allowed-values:
|
||||
- 'yes'
|
||||
- yes
|
||||
|
||||
develocity-access-key:
|
||||
type: string
|
||||
@@ -153,7 +154,10 @@ inputs:
|
||||
|
||||
# Deprecated action inputs
|
||||
arguments:
|
||||
type: string
|
||||
type: list
|
||||
separator: ' '
|
||||
list-item:
|
||||
type: string
|
||||
|
||||
# Experimental action inputs
|
||||
gradle-home-cache-strict-match:
|
||||
|
||||
Generated
+985
-2222
File diff suppressed because it is too large
Load Diff
+16
-22
@@ -35,44 +35,38 @@
|
||||
"node": ">=24.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/artifact": "6.1.0",
|
||||
"@actions/cache": "6.0.0",
|
||||
"@actions/core": "3.0.0",
|
||||
"@actions/artifact": "6.2.1",
|
||||
"@actions/cache": "6.0.1",
|
||||
"@actions/core": "3.0.1",
|
||||
"@actions/exec": "3.0.0",
|
||||
"@actions/github": "9.0.0",
|
||||
"@actions/glob": "0.6.1",
|
||||
"@actions/http-client": "4.0.0",
|
||||
"@actions/github": "9.1.1",
|
||||
"@actions/glob": "0.7.0",
|
||||
"@actions/http-client": "4.0.1",
|
||||
"@actions/tool-cache": "4.0.0",
|
||||
"@octokit/webhooks-types": "7.6.1",
|
||||
"cheerio": "1.2.0",
|
||||
"semver": "7.7.4",
|
||||
"semver": "7.8.3",
|
||||
"string-argv": "0.3.2",
|
||||
"unhomoglyph": "1.0.6",
|
||||
"which": "6.0.1"
|
||||
"which": "7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "30.3.0",
|
||||
"@jest/globals": "30.4.1",
|
||||
"@types/jest": "30.0.0",
|
||||
"@types/node": "25.5.0",
|
||||
"@types/node": "25.9.2",
|
||||
"@types/semver": "7.7.1",
|
||||
"@types/unzipper": "0.10.11",
|
||||
"@types/which": "3.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "8.58.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.61.0",
|
||||
"dedent": "1.7.2",
|
||||
"esbuild": "0.28.0",
|
||||
"eslint": "10.1.0",
|
||||
"globals": "17.4.0",
|
||||
"jest": "30.3.0",
|
||||
"eslint": "10.4.1",
|
||||
"globals": "17.6.0",
|
||||
"jest": "30.4.2",
|
||||
"nock": "15.0.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "3.8.1",
|
||||
"ts-jest": "29.4.9",
|
||||
"prettier": "3.8.4",
|
||||
"ts-jest": "29.4.11",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"overrides": {
|
||||
"@azure/logger": "1.1.4",
|
||||
"@octokit/request": "8.4.1",
|
||||
"@octokit/request-error": "5.1.1",
|
||||
"@octokit/plugin-paginate-rest": "9.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as setupGradle from '../../setup-gradle'
|
||||
|
||||
import {CacheConfig, SummaryConfig} from '../../configuration'
|
||||
import {CacheConfig, DevelocityConfig, SummaryConfig} from '../../configuration'
|
||||
import {handlePostActionError} from '../../errors'
|
||||
import {forceExit} from '../../force-exit'
|
||||
|
||||
@@ -14,7 +14,7 @@ process.on('uncaughtException', e => handlePostActionError(e))
|
||||
*/
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
await setupGradle.complete(new CacheConfig(), new SummaryConfig())
|
||||
await setupGradle.complete(new CacheConfig(), new DevelocityConfig(), new SummaryConfig())
|
||||
} catch (error) {
|
||||
handlePostActionError(error)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as setupGradle from '../../setup-gradle'
|
||||
import * as dependencyGraph from '../../dependency-graph'
|
||||
|
||||
import {CacheConfig, DependencyGraphConfig, SummaryConfig} from '../../configuration'
|
||||
import {CacheConfig, DependencyGraphConfig, DevelocityConfig, SummaryConfig} from '../../configuration'
|
||||
import {handlePostActionError} from '../../errors'
|
||||
import {emitDeprecationWarnings, restoreDeprecationState} from '../../deprecation-collector'
|
||||
import {forceExit} from '../../force-exit'
|
||||
@@ -19,7 +19,7 @@ export async function run(): Promise<void> {
|
||||
restoreDeprecationState()
|
||||
emitDeprecationWarnings()
|
||||
|
||||
if (await setupGradle.complete(new CacheConfig(), new SummaryConfig())) {
|
||||
if (await setupGradle.complete(new CacheConfig(), new DevelocityConfig(), new SummaryConfig())) {
|
||||
// Only submit the dependency graphs once per job
|
||||
await dependencyGraph.complete(new DependencyGraphConfig())
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import * as glob from '@actions/glob'
|
||||
import * as path from 'path'
|
||||
|
||||
import {BuildResult} from './build-results'
|
||||
import {CacheOptions, CacheService} from './cache-service'
|
||||
import {CacheEntryReport, CacheOptions, CacheReport, CacheService} from './cache-service'
|
||||
|
||||
const ENTRY_NAME = 'Gradle User Home'
|
||||
|
||||
const PRIMARY_KEY_STATE = 'BASIC_CACHE_PRIMARY_KEY'
|
||||
const RESTORED_KEY_STATE = 'BASIC_CACHE_RESTORED_KEY'
|
||||
@@ -40,21 +42,39 @@ export class BasicCacheService implements CacheService {
|
||||
}
|
||||
}
|
||||
|
||||
async save(gradleUserHome: string, _buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<string> {
|
||||
if (cacheOptions.readOnly) {
|
||||
const restoredKey = core.getState(RESTORED_KEY_STATE)
|
||||
if (restoredKey) {
|
||||
return `Basic caching was read-only. Restored from cache key \`${restoredKey}\`.`
|
||||
}
|
||||
return 'Basic caching was read-only. No cache entry was found to restore.'
|
||||
}
|
||||
|
||||
async save(gradleUserHome: string, _buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<CacheReport> {
|
||||
const primaryKey = core.getState(PRIMARY_KEY_STATE)
|
||||
const restoredKey = core.getState(RESTORED_KEY_STATE)
|
||||
|
||||
if (cacheOptions.readOnly) {
|
||||
return {
|
||||
status: 'read-only',
|
||||
entries: [
|
||||
entryReport({
|
||||
primaryKey,
|
||||
restoredKey,
|
||||
restoredOutcome: restoredKey
|
||||
? '(Entry restored: exact match found)'
|
||||
: '(Entry not restored: no match found)',
|
||||
savedOutcome: '(Entry not saved: cache is read-only)'
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (restoredKey === primaryKey) {
|
||||
core.info(`Basic caching restored entry with key \`${primaryKey}\`. Save was skipped.`)
|
||||
return `Basic caching restored entry with key \`${primaryKey}\`. Save was skipped.`
|
||||
return {
|
||||
status: 'enabled',
|
||||
entries: [
|
||||
entryReport({
|
||||
primaryKey,
|
||||
restoredKey,
|
||||
restoredOutcome: '(Entry restored: exact match found)',
|
||||
savedOutcome: '(Entry not saved: entry with key already exists)'
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
const cachePaths = getCachePaths(gradleUserHome)
|
||||
@@ -62,14 +82,56 @@ export class BasicCacheService implements CacheService {
|
||||
try {
|
||||
await cache.saveCache(cachePaths, primaryKey)
|
||||
core.info(`Basic caching saved entry with key: ${primaryKey}`)
|
||||
return `Basic caching saved entry with key \`${primaryKey}\`.`
|
||||
return {
|
||||
status: 'enabled',
|
||||
entries: [
|
||||
entryReport({
|
||||
primaryKey,
|
||||
restoredKey,
|
||||
savedKey: primaryKey,
|
||||
restoredOutcome: restoredKey
|
||||
? '(Entry restored: exact match found)'
|
||||
: '(Entry not restored: no match found)',
|
||||
savedOutcome: '(Entry saved)'
|
||||
})
|
||||
]
|
||||
}
|
||||
} catch (error) {
|
||||
core.warning(`Basic caching failed to save entry with key \`${primaryKey}\`: ${error}`)
|
||||
return `Basic caching save failed: ${error}`
|
||||
return {
|
||||
status: 'enabled',
|
||||
entries: [
|
||||
entryReport({
|
||||
primaryKey,
|
||||
restoredKey,
|
||||
restoredOutcome: restoredKey
|
||||
? '(Entry restored: exact match found)'
|
||||
: '(Entry not restored: no match found)',
|
||||
savedOutcome: `(Entry not saved: ${error})`
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function entryReport(opts: {
|
||||
primaryKey: string
|
||||
restoredKey?: string
|
||||
savedKey?: string
|
||||
restoredOutcome: string
|
||||
savedOutcome: string
|
||||
}): CacheEntryReport {
|
||||
return {
|
||||
entryName: ENTRY_NAME,
|
||||
requestedKey: opts.primaryKey || undefined,
|
||||
restoredKey: opts.restoredKey || undefined,
|
||||
restoredOutcome: opts.restoredOutcome,
|
||||
savedKey: opts.savedKey || undefined,
|
||||
savedOutcome: opts.savedOutcome
|
||||
}
|
||||
}
|
||||
|
||||
function getCachePaths(gradleUserHome: string): string[] {
|
||||
return [path.join(gradleUserHome, 'caches'), path.join(gradleUserHome, 'wrapper')]
|
||||
}
|
||||
|
||||
@@ -5,57 +5,24 @@ import {pathToFileURL} from 'url'
|
||||
import {CacheConfig, CacheProvider} from './configuration'
|
||||
import {BasicCacheService} from './cache-service-basic'
|
||||
import {BuildResult} from './build-results'
|
||||
import {CacheOptions, CacheService} from './cache-service'
|
||||
|
||||
const NOOP_CACHING_REPORT = `
|
||||
[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching). Gradle User Home was not restored from or saved to the cache.
|
||||
`
|
||||
import {CacheOptions, CacheReport, CacheService} from './cache-service'
|
||||
import {ProviderNote} from './caching-report'
|
||||
|
||||
const ENHANCED_CACHE_MESSAGE = `Enhanced Caching: This build is using the proprietary 'gradle-actions-caching' provider for optimized caching support. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for terms of use and opt-out instructions.`
|
||||
|
||||
const ENHANCED_CACHE_SUMMARY = `
|
||||
> [!NOTE]
|
||||
> ### ⚡️ Enhanced Caching enabled
|
||||
> This build provides optimized caching support via the proprietary **gradle-actions-caching** provider.
|
||||
> See [DISTRIBUTION.md](https://github.com/gradle/actions/blob/main/DISTRIBUTION.md) for terms of use and opt-out instructions.
|
||||
`
|
||||
|
||||
const BASIC_CACHE_MESSAGE = `Basic Caching: This build uses the open-source caching provider for reliable, path-based caching of Gradle dependencies. Upgrade available: for faster builds and advanced features, consider switching to the Enhanced Caching provider. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for details.`
|
||||
|
||||
const BASIC_CACHE_SUMMARY = `
|
||||
> [!NOTE]
|
||||
> ### 🛡️ Basic Caching enabled
|
||||
> This build uses the open-source caching provider for reliable, path-based caching of Gradle dependencies.
|
||||
>
|
||||
> **Upgrade Available:** For faster builds and advanced features, consider switching to the **Enhanced Caching** provider.
|
||||
> See [DISTRIBUTION.md](https://github.com/gradle/actions/blob/main/DISTRIBUTION.md) for details.`
|
||||
const BASIC_CACHE_MESSAGE = `Basic Caching: This build uses the basic open-source caching provider. For faster builds and advanced features, consider switching to the Enhanced Caching provider. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for details.`
|
||||
|
||||
class NoOpCacheService implements CacheService {
|
||||
async restore(_gradleUserHome: string, _cacheOptions: CacheOptions): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
async save(_gradleUserHome: string, _buildResults: BuildResult[], _cacheOptions: CacheOptions): Promise<string> {
|
||||
return NOOP_CACHING_REPORT
|
||||
}
|
||||
}
|
||||
|
||||
class LicenseWarningCacheService implements CacheService {
|
||||
private delegate: CacheService
|
||||
private summary: string
|
||||
|
||||
constructor(delegate: CacheService, summary: string) {
|
||||
this.delegate = delegate
|
||||
this.summary = summary
|
||||
}
|
||||
|
||||
async restore(gradleUserHome: string, cacheOptions: CacheOptions): Promise<void> {
|
||||
await this.delegate.restore(gradleUserHome, cacheOptions)
|
||||
}
|
||||
|
||||
async save(gradleUserHome: string, buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<string> {
|
||||
const cachingReport = await this.delegate.save(gradleUserHome, buildResults, cacheOptions)
|
||||
return `${cachingReport}\n${this.summary}`
|
||||
async save(
|
||||
_gradleUserHome: string,
|
||||
_buildResults: BuildResult[],
|
||||
_cacheOptions: CacheOptions
|
||||
): Promise<CacheReport> {
|
||||
return {status: 'disabled', entries: []}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,16 +34,22 @@ export async function getCacheService(cacheConfig: CacheConfig): Promise<CacheSe
|
||||
|
||||
if (cacheConfig.getCacheProvider() === CacheProvider.Basic) {
|
||||
logCacheMessage(BASIC_CACHE_MESSAGE)
|
||||
return new LicenseWarningCacheService(new BasicCacheService(), BASIC_CACHE_SUMMARY)
|
||||
return new BasicCacheService()
|
||||
}
|
||||
|
||||
logCacheMessage(ENHANCED_CACHE_MESSAGE)
|
||||
const cacheService = await loadVendoredCacheService()
|
||||
if (cacheConfig.isCacheLicenseAccepted()) {
|
||||
return cacheService
|
||||
}
|
||||
return loadVendoredCacheService()
|
||||
}
|
||||
|
||||
return new LicenseWarningCacheService(cacheService, ENHANCED_CACHE_SUMMARY)
|
||||
/**
|
||||
* Identifies the caching provider for the Job Summary. Returns `undefined` when
|
||||
* caching is disabled, since no provider is engaged in that case.
|
||||
*/
|
||||
export function getProviderNote(cacheConfig: CacheConfig): ProviderNote | undefined {
|
||||
if (cacheConfig.isCacheDisabled()) {
|
||||
return undefined
|
||||
}
|
||||
return cacheConfig.getCacheProvider() === CacheProvider.Basic ? {kind: 'basic'} : {kind: 'enhanced'}
|
||||
}
|
||||
|
||||
export async function loadVendoredCacheService(): Promise<CacheService> {
|
||||
|
||||
@@ -8,11 +8,59 @@ export interface CacheOptions {
|
||||
strictMatch: boolean
|
||||
cleanup: string
|
||||
encryptionKey?: string
|
||||
develocityAccessToken?: string
|
||||
develocityServerUrl?: string
|
||||
includes: string[]
|
||||
excludes: string[]
|
||||
}
|
||||
|
||||
export type CacheStatus =
|
||||
| 'enabled'
|
||||
| 'read-only'
|
||||
| 'write-only'
|
||||
| 'disabled'
|
||||
| 'disabled-existing-home'
|
||||
| 'not-available'
|
||||
|
||||
export type CacheCleanupStatus =
|
||||
| 'enabled'
|
||||
| 'disabled-param'
|
||||
| 'disabled-failure'
|
||||
| 'disabled-config-cache-hit'
|
||||
| 'disabled-readonly'
|
||||
|
||||
export type ProjectCacheStatus =
|
||||
| 'not-enabled' // the hidden opt-in env var was not set (rendered as nothing)
|
||||
| 'trial-expired' // past the hard trial expiry
|
||||
| 'trial-not-licensed' // Develocity trial token missing or invalid
|
||||
| 'no-encryption-key' // Cannot store due to missing encryption key
|
||||
| 'enabled' // Trial in effect: will attempt to save project state
|
||||
|
||||
export interface CacheEntryReport {
|
||||
entryName: string
|
||||
requestedKey?: string
|
||||
restoredKey?: string
|
||||
restoredSize?: number
|
||||
restoredTime?: number
|
||||
restoredOutcome: string
|
||||
savedKey?: string
|
||||
savedSize?: number
|
||||
savedTime?: number
|
||||
savedOutcome: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Structured result of a cache save operation. Rendering this into a human-readable
|
||||
* Job Summary is handled centrally by `caching-report.ts`.
|
||||
*/
|
||||
export interface CacheReport {
|
||||
status: CacheStatus
|
||||
cleanup?: CacheCleanupStatus
|
||||
projectCache?: ProjectCacheStatus
|
||||
entries: CacheEntryReport[]
|
||||
}
|
||||
|
||||
export interface CacheService {
|
||||
restore(gradleUserHome: string, cacheOptions: CacheOptions): Promise<void>
|
||||
save(gradleUserHome: string, buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<string>
|
||||
save(gradleUserHome: string, buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<CacheReport>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
import {CacheCleanupStatus, CacheEntryReport, CacheReport, CacheStatus, ProjectCacheStatus} from './cache-service'
|
||||
|
||||
const DOCS = 'https://github.com/gradle/actions/blob/main/docs/setup-gradle.md'
|
||||
const DISTRIBUTION = 'https://github.com/gradle/actions/blob/main/DISTRIBUTION.md'
|
||||
|
||||
/**
|
||||
* Identifies the caching provider in use, so the report can attribute the cache
|
||||
* and surface the relevant terms-of-use / upgrade information.
|
||||
*/
|
||||
export interface ProviderNote {
|
||||
kind: 'enhanced' | 'basic'
|
||||
}
|
||||
|
||||
const STATUS_COPY: Record<CacheStatus, string> = {
|
||||
enabled: `[Cache was enabled](${DOCS}#caching-build-state-between-jobs) — Gradle User Home was restored from the cache and saved for use by subsequent jobs.`,
|
||||
'read-only': `[Cache was read-only](${DOCS}#using-the-cache-read-only) — by default, the action only writes to the cache for jobs running on the default branch.`,
|
||||
'write-only': `[Cache was write-only](${DOCS}#using-the-cache-write-only) — Gradle User Home was not restored from the cache.`,
|
||||
disabled: `[Caching was disabled](${DOCS}#disabling-caching) — Gradle User Home was not restored from or saved to the cache.`,
|
||||
'disabled-existing-home': `⚠️ [Caching was skipped](${DOCS}#overwriting-an-existing-gradle-user-home) — a pre-existing Gradle User Home was found, so the cache was not restored or saved.`,
|
||||
'not-available': `Caching is not available — the GitHub Actions cache service could not be reached, so Gradle User Home was not restored or saved.`
|
||||
}
|
||||
|
||||
const CLEANUP_COPY: Record<CacheCleanupStatus, string> = {
|
||||
enabled: `[Cache cleanup](${DOCS}#configuring-cache-cleanup) purged stale files from Gradle User Home before saving.`,
|
||||
'disabled-param': `[Cache cleanup](${DOCS}#configuring-cache-cleanup) was disabled via action parameter.`,
|
||||
'disabled-failure': `[Cache cleanup](${DOCS}#configuring-cache-cleanup) was skipped due to a build failure. Use \`cache-cleanup: always\` to override.`,
|
||||
'disabled-config-cache-hit': `[Cache cleanup](${DOCS}#configuring-cache-cleanup) was skipped due to configuration-cache reuse.`,
|
||||
'disabled-readonly': `[Cache cleanup](${DOCS}#configuring-cache-cleanup) is always disabled when the cache is read-only.`
|
||||
}
|
||||
|
||||
const PROJECT_CACHE_COPY: Record<ProjectCacheStatus, string> = {
|
||||
'not-enabled': ``,
|
||||
'trial-expired': `Project state (build-logic and configuration cache) was not cached - the Develocity caching trial has expired.`,
|
||||
'trial-not-licensed': `Project state (build-logic and configuration cache) was not cached - a develocity-access-key and develocity-server-url is required.`,
|
||||
'no-encryption-key': `Project state (build-logic and configuration cache) was not cached - a [cache-encryption-key](${DOCS}#cache-encryption-key) is required.`,
|
||||
enabled: `Caching of project state (build-logic and configuration cache) was enabled.`
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a cache report into the unified Job Summary markdown, with a consistent
|
||||
* skeleton across every variant: a section heading, a status line, an integrated
|
||||
* provider note, and (when there are entries) an expandable details section.
|
||||
*/
|
||||
export function renderCachingReport(report: CacheReport, providerNote?: ProviderNote): string {
|
||||
if (!isActive(report.status)) {
|
||||
// Disabled / skipped / unavailable: a compact heading + status line, no expandable section.
|
||||
return `${renderHeading(report.status, providerNote)}\n\n${STATUS_COPY[report.status]}\n`
|
||||
}
|
||||
const sections = [
|
||||
renderHeading(report.status, providerNote),
|
||||
renderProviderNote(providerNote),
|
||||
// Status and cleanup messages live inside the details expando; if there are no entries
|
||||
// to expand, fall back to showing the status line directly.
|
||||
report.entries.length > 0 ? renderDetails(report) : STATUS_COPY[report.status]
|
||||
]
|
||||
return `${sections.filter(section => section !== undefined && section !== '').join('\n\n')}\n`
|
||||
}
|
||||
|
||||
function isActive(status: CacheStatus): boolean {
|
||||
return status === 'enabled' || status === 'read-only' || status === 'write-only'
|
||||
}
|
||||
|
||||
function renderHeading(status: CacheStatus, providerNote?: ProviderNote): string {
|
||||
if (!isActive(status)) {
|
||||
const label =
|
||||
status === 'disabled-existing-home' ? 'Skipped' : status === 'not-available' ? 'Unavailable' : 'Disabled'
|
||||
return `<h4>Gradle State Caching - ${label}</h4>`
|
||||
}
|
||||
|
||||
const icon = providerNote?.kind === 'basic' ? '🛡️' : '⚡'
|
||||
const provider = providerNote?.kind === 'basic' ? 'Basic' : 'Enhanced'
|
||||
const suffix = status === 'read-only' ? ' (read-only)' : status === 'write-only' ? ' (write-only)' : ''
|
||||
return `<h4>Gradle State Caching - ${icon} ${provider}${suffix}</h4>`
|
||||
}
|
||||
|
||||
function renderCleanupLine(cleanup?: CacheCleanupStatus): string | undefined {
|
||||
return cleanup ? CLEANUP_COPY[cleanup] : undefined
|
||||
}
|
||||
|
||||
function renderProjectCacheLine(projectCache?: ProjectCacheStatus): string | undefined {
|
||||
// PROJECT_CACHE_COPY['not-enabled'] is '', which the .filter(Boolean) at the call site drops.
|
||||
return projectCache ? PROJECT_CACHE_COPY[projectCache] : undefined
|
||||
}
|
||||
|
||||
function renderProviderNote(providerNote?: ProviderNote): string | undefined {
|
||||
if (!providerNote) {
|
||||
return undefined
|
||||
}
|
||||
if (providerNote.kind === 'enhanced') {
|
||||
return `**[Enhanced Caching](${DOCS}#enhanced-caching)** uses the proprietary \`gradle-actions-caching\` provider. See [DISTRIBUTION.md](${DISTRIBUTION}) for terms of use and opt-out instructions.`
|
||||
}
|
||||
return `**[Basic Caching](${DOCS}#basic-caching)** uses the basic open-source caching provider. For faster builds and advanced features, consider the **[Enhanced Caching](${DOCS}#enhanced-caching)** provider.`
|
||||
}
|
||||
|
||||
function renderDetails(report: CacheReport): string {
|
||||
const entries = report.entries
|
||||
const restored = entries.filter(entry => entry.restoredKey).length
|
||||
const saved = entries.filter(entry => entry.savedKey).length
|
||||
const summary = hasMetrics(entries)
|
||||
? `Entries: ${restored} restored (${getSize(entries, e => e.restoredSize)}Mb), ${saved} saved (${getSize(entries, e => e.savedSize)}Mb) - Expand for more details`
|
||||
: `Entries: ${restored} restored, ${saved} saved - Expand for more details`
|
||||
|
||||
const cleanup = report.status === 'enabled' ? renderCleanupLine(report.cleanup) : undefined
|
||||
const projectCache = renderProjectCacheLine(report.projectCache)
|
||||
const table = renderEntryTable(report.entries)
|
||||
const pre = `<pre>\n${renderEntryDetails(report.entries)}</pre>`
|
||||
const body = [STATUS_COPY[report.status], cleanup, projectCache, table, pre].filter(Boolean).join('\n\n')
|
||||
|
||||
return `<details>
|
||||
<summary>${summary}</summary>
|
||||
|
||||
${body}
|
||||
</details>`
|
||||
}
|
||||
|
||||
function hasMetrics(entries: CacheEntryReport[]): boolean {
|
||||
return entries.some(entry => entry.restoredSize || entry.restoredTime || entry.savedSize || entry.savedTime)
|
||||
}
|
||||
|
||||
function renderEntryTable(entries: CacheEntryReport[]): string {
|
||||
if (!hasMetrics(entries)) {
|
||||
return ''
|
||||
}
|
||||
return `<table>
|
||||
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</th></tr>
|
||||
<tr><td>Entries Restored</td>
|
||||
<td>${getCount(entries, e => e.restoredSize)}</td>
|
||||
<td>${getSize(entries, e => e.restoredSize)}</td>
|
||||
<td>${getTime(entries, e => e.restoredTime)}</td>
|
||||
</tr>
|
||||
<tr><td>Entries Saved</td>
|
||||
<td>${getCount(entries, e => e.savedSize)}</td>
|
||||
<td>${getSize(entries, e => e.savedSize)}</td>
|
||||
<td>${getTime(entries, e => e.savedTime)}</td>
|
||||
</tr>
|
||||
</table>`
|
||||
}
|
||||
|
||||
function renderEntryDetails(entries: CacheEntryReport[]): string {
|
||||
return entries
|
||||
.map(
|
||||
entry => `Entry: ${entry.entryName}
|
||||
Requested Key : ${entry.requestedKey ?? ''}
|
||||
Restored Key : ${entry.restoredKey ?? ''}
|
||||
Size: ${formatSize(entry.restoredSize)}
|
||||
Time: ${formatTime(entry.restoredTime)}
|
||||
${entry.restoredOutcome}
|
||||
Saved Key : ${entry.savedKey ?? ''}
|
||||
Size: ${formatSize(entry.savedSize)}
|
||||
Time: ${formatTime(entry.savedTime)}
|
||||
${entry.savedOutcome}
|
||||
`
|
||||
)
|
||||
.join('---\n')
|
||||
}
|
||||
|
||||
function getCount(entries: CacheEntryReport[], predicate: (value: CacheEntryReport) => number | undefined): number {
|
||||
return entries.filter(e => predicate(e)).length
|
||||
}
|
||||
|
||||
function getSize(entries: CacheEntryReport[], predicate: (value: CacheEntryReport) => number | undefined): number {
|
||||
const bytes = entries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0)
|
||||
return Math.round(bytes / (1024 * 1024))
|
||||
}
|
||||
|
||||
function getTime(entries: CacheEntryReport[], predicate: (value: CacheEntryReport) => number | undefined): number {
|
||||
return entries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0)
|
||||
}
|
||||
|
||||
function formatSize(bytes: number | undefined): string {
|
||||
if (bytes === undefined || bytes === 0) {
|
||||
return ''
|
||||
}
|
||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`
|
||||
}
|
||||
|
||||
function formatTime(ms: number | undefined): string {
|
||||
if (ms === undefined || ms === 0) {
|
||||
return ''
|
||||
}
|
||||
return `${ms} ms`
|
||||
}
|
||||
@@ -167,11 +167,6 @@ export class CacheConfig {
|
||||
return core.getMultilineInput('gradle-home-cache-excludes')
|
||||
}
|
||||
|
||||
isCacheLicenseAccepted(): boolean {
|
||||
const dvConfig = new DevelocityConfig()
|
||||
return dvConfig.getDevelocityAccessKey() !== '' || dvConfig.hasTermsOfUseAgreement()
|
||||
}
|
||||
|
||||
getCacheProvider(): CacheProvider {
|
||||
const val = core.getInput('cache-provider')
|
||||
switch (val.toLowerCase().trim()) {
|
||||
@@ -206,6 +201,10 @@ export class SummaryConfig {
|
||||
return this.shouldAddJobSummary(this.getJobSummaryOption(), hasFailure)
|
||||
}
|
||||
|
||||
canAddPRComment(): boolean {
|
||||
return this.getPRCommentOption() !== JobSummaryOption.Never
|
||||
}
|
||||
|
||||
shouldAddPRComment(hasFailure: boolean): boolean {
|
||||
return this.shouldAddJobSummary(this.getPRCommentOption(), hasFailure)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export async function setup(config: DevelocityConfig): Promise<void> {
|
||||
// except if they are defined in the configuration
|
||||
if (config.getBuildScanPublishEnabled()) {
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.4.0')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.4.2')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getTermsOfUseUrl())
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getTermsOfUseAgree())
|
||||
|
||||
@@ -174,3 +174,34 @@ export class DevelocityAccessCredentials {
|
||||
return this.accessKeyRegexp.test(allKeys)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the access key that matches a given Develocity server, for use as the
|
||||
* `develocityAccessToken` cache option. Returns `undefined` (fail-closed) when the access key is
|
||||
* empty, the server URL is empty/unparseable, or no entry matches the server's host.
|
||||
*
|
||||
* Parses the `host=value;host=value` form leniently rather than via `DevelocityAccessCredentials`:
|
||||
* at save time the value is typically a short-lived token (a JWT whose `.`/`-` characters the strict
|
||||
* parser rejects), but it is still a valid access token for that host.
|
||||
*/
|
||||
export function resolveAccessKeyForServer(accessKey: string, serverUrl: string): string | undefined {
|
||||
if (!accessKey || !serverUrl) {
|
||||
return undefined
|
||||
}
|
||||
let host: string
|
||||
try {
|
||||
host = new URL(serverUrl).hostname
|
||||
} catch {
|
||||
host = serverUrl // tolerate a bare hostname (no scheme)
|
||||
}
|
||||
for (const entry of accessKey.split(';')) {
|
||||
const sep = entry.indexOf('=')
|
||||
if (sep < 1) {
|
||||
continue // skip blanks / malformed entries with no `host=` prefix
|
||||
}
|
||||
if (entry.slice(0, sep) === host) {
|
||||
return entry.slice(sep + 1) || undefined
|
||||
}
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
@@ -2,12 +2,15 @@ import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
|
||||
import {BuildResult} from './build-results'
|
||||
import {SummaryConfig, getActionId, getGithubToken} from './configuration'
|
||||
import {CacheReport} from './cache-service'
|
||||
import {ProviderNote, renderCachingReport} from './caching-report'
|
||||
import {DependencyGraphConfig, getActionId, getGithubToken, getJobMatrix, SummaryConfig} from './configuration'
|
||||
import {Deprecation, getDeprecations, getErrors} from './deprecation-collector'
|
||||
|
||||
export async function generateJobSummary(
|
||||
buildResults: BuildResult[],
|
||||
cachingReport: string,
|
||||
cacheReport: CacheReport,
|
||||
providerNote: ProviderNote | undefined,
|
||||
config: SummaryConfig
|
||||
): Promise<void> {
|
||||
const errors = renderErrors()
|
||||
@@ -18,6 +21,7 @@ export async function generateJobSummary(
|
||||
}
|
||||
|
||||
const summaryTable = renderSummaryTable(buildResults)
|
||||
const cachingReport = renderCachingReport(cacheReport, providerNote)
|
||||
const hasFailure = anyFailed(buildResults)
|
||||
if (config.shouldGenerateJobSummary(hasFailure)) {
|
||||
core.info('Generating Job Summary')
|
||||
@@ -33,6 +37,10 @@ export async function generateJobSummary(
|
||||
core.info('============================')
|
||||
}
|
||||
|
||||
if (config.canAddPRComment()) {
|
||||
await minimizeObsoletePRComments()
|
||||
}
|
||||
|
||||
if (config.shouldAddPRComment(hasFailure)) {
|
||||
await addPRComment(summaryTable)
|
||||
}
|
||||
@@ -48,7 +56,8 @@ async function addPRComment(jobSummary: string): Promise<void> {
|
||||
const pull_request_number = context.payload.pull_request.number
|
||||
core.info(`Adding Job Summary as comment to PR #${pull_request_number}.`)
|
||||
|
||||
const prComment = `<h3>Job Summary for Gradle</h3>
|
||||
const prComment = `${jobMarker(context)}
|
||||
<h3>Job Summary for Gradle</h3>
|
||||
<a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">
|
||||
<h5>${context.workflow} :: <em>${context.job}</em></h5>
|
||||
</a>
|
||||
@@ -57,6 +66,7 @@ ${jobSummary}`
|
||||
|
||||
const github_token = getGithubToken()
|
||||
const octokit = github.getOctokit(github_token)
|
||||
|
||||
try {
|
||||
await octokit.rest.issues.createComment({
|
||||
...context.repo,
|
||||
@@ -201,3 +211,77 @@ function truncateString(str: string, maxLength: number): string {
|
||||
return str
|
||||
}
|
||||
}
|
||||
|
||||
async function minimizeObsoletePRComments(): Promise<void> {
|
||||
const context = github.context
|
||||
if (context.payload.pull_request == null) {
|
||||
core.info('No pull_request trigger detected: not minimizing obsolete PR comments')
|
||||
return
|
||||
}
|
||||
|
||||
const prNumber = context.payload.pull_request.number
|
||||
core.info(`Minimizing obsolete Job Summary comments on PR #${prNumber}.`)
|
||||
|
||||
const marker = jobMarker(context)
|
||||
const octokit = github.getOctokit(getGithubToken())
|
||||
const {owner, repo} = context.repo
|
||||
|
||||
const query = `
|
||||
query($owner: String!, $repo: String!, $prNumber: Int!) {
|
||||
repository(owner: $owner, name: $repo) {
|
||||
pullRequest(number: $prNumber) {
|
||||
comments(last: 100) {
|
||||
nodes { id body isMinimized url }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
let comments: PullRequestComment[]
|
||||
try {
|
||||
const {repository} = await octokit.graphql<CommentsQueryResult>(query, {owner, repo, prNumber})
|
||||
comments = repository.pullRequest?.comments?.nodes?.filter((c): c is PullRequestComment => c !== null) ?? []
|
||||
} catch (error) {
|
||||
return core.warning(`Failed to fetch comments: ${error}`)
|
||||
}
|
||||
|
||||
const mutation = `
|
||||
mutation($id: ID!) {
|
||||
minimizeComment(input: {subjectId: $id, classifier: OUTDATED}) {
|
||||
clientMutationId
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const commentsToMinimize = comments
|
||||
.filter(c => !c.isMinimized && c.body.includes(marker))
|
||||
.map(async c =>
|
||||
octokit
|
||||
.graphql(mutation, {id: c.id})
|
||||
.then(() => core.info(`Successfully minimized (id:${c.id}, url:${c.url})`))
|
||||
.catch(e => core.warning(`Failed to minimize (id:${c.id}, url:${c.url}, error:${e?.message || e})`))
|
||||
)
|
||||
await Promise.allSettled(commentsToMinimize)
|
||||
}
|
||||
|
||||
export function jobMarker(context: typeof github.context): string {
|
||||
const jobCorrelator = DependencyGraphConfig.constructJobCorrelator(context.workflow, context.job, getJobMatrix())
|
||||
return `<!-- gradle-job-summary: ${jobCorrelator} -->`
|
||||
}
|
||||
|
||||
interface PullRequestComment {
|
||||
id: string
|
||||
body: string
|
||||
isMinimized: boolean
|
||||
url: string
|
||||
}
|
||||
|
||||
interface CommentsQueryResult {
|
||||
repository: {
|
||||
pullRequest?: {
|
||||
comments?: {
|
||||
nodes?: (PullRequestComment | null)[] | null
|
||||
} | null
|
||||
} | null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ import * as path from 'path'
|
||||
import * as os from 'os'
|
||||
import * as jobSummary from './job-summary'
|
||||
import * as buildScan from './develocity/build-scan'
|
||||
import {resolveAccessKeyForServer} from './develocity/short-lived-token'
|
||||
|
||||
import {loadBuildResults, markBuildResultsProcessed} from './build-results'
|
||||
import {getCacheService} from './cache-service-loader'
|
||||
import {getCacheService, getProviderNote} from './cache-service-loader'
|
||||
import {CacheOptions} from './cache-service'
|
||||
import {
|
||||
DevelocityConfig,
|
||||
@@ -45,7 +46,7 @@ export async function setup(
|
||||
initializeGradleUserHome(userHome, gradleUserHome, cacheConfig.getCacheEncryptionKey())
|
||||
|
||||
const cacheService = await getCacheService(cacheConfig)
|
||||
await cacheService.restore(gradleUserHome, cacheOptionsFrom(cacheConfig))
|
||||
await cacheService.restore(gradleUserHome, cacheOptionsFrom(cacheConfig, develocityConfig))
|
||||
|
||||
await wrapperValidator.validateWrappers(wrapperValidationConfig, getWorkspaceDirectory(), gradleUserHome)
|
||||
|
||||
@@ -54,7 +55,11 @@ export async function setup(
|
||||
return true
|
||||
}
|
||||
|
||||
export async function complete(cacheConfig: CacheConfig, summaryConfig: SummaryConfig): Promise<boolean> {
|
||||
export async function complete(
|
||||
cacheConfig: CacheConfig,
|
||||
develocityConfig: DevelocityConfig,
|
||||
summaryConfig: SummaryConfig
|
||||
): Promise<boolean> {
|
||||
if (!core.getState(GRADLE_SETUP_VAR)) {
|
||||
core.info('Gradle setup post-action only performed for first gradle/actions step in workflow.')
|
||||
return false
|
||||
@@ -65,8 +70,12 @@ export async function complete(cacheConfig: CacheConfig, summaryConfig: SummaryC
|
||||
|
||||
const gradleUserHome = core.getState(GRADLE_USER_HOME)
|
||||
const cacheService = await getCacheService(cacheConfig)
|
||||
const cachingReport = await cacheService.save(gradleUserHome, buildResults, cacheOptionsFrom(cacheConfig))
|
||||
await jobSummary.generateJobSummary(buildResults, cachingReport, summaryConfig)
|
||||
const cacheReport = await cacheService.save(
|
||||
gradleUserHome,
|
||||
buildResults,
|
||||
cacheOptionsFrom(cacheConfig, develocityConfig)
|
||||
)
|
||||
await jobSummary.generateJobSummary(buildResults, cacheReport, getProviderNote(cacheConfig), summaryConfig)
|
||||
|
||||
markBuildResultsProcessed()
|
||||
|
||||
@@ -75,7 +84,12 @@ export async function complete(cacheConfig: CacheConfig, summaryConfig: SummaryC
|
||||
return true
|
||||
}
|
||||
|
||||
function cacheOptionsFrom(config: CacheConfig): CacheOptions {
|
||||
function cacheOptionsFrom(config: CacheConfig, develocityConfig: DevelocityConfig): CacheOptions {
|
||||
const develocityServerUrl = develocityConfig?.getDevelocityUrl() || undefined
|
||||
const develocityAccessToken =
|
||||
develocityConfig && develocityServerUrl
|
||||
? resolveAccessKeyForServer(develocityConfig.getDevelocityAccessKey(), develocityServerUrl)
|
||||
: undefined
|
||||
return {
|
||||
disabled: config.isCacheDisabled(),
|
||||
readOnly: config.isCacheReadOnly(),
|
||||
@@ -84,6 +98,8 @@ function cacheOptionsFrom(config: CacheConfig): CacheOptions {
|
||||
strictMatch: config.isCacheStrictMatch(),
|
||||
cleanup: config.getCacheCleanupOption(),
|
||||
encryptionKey: config.getCacheEncryptionKey() || undefined,
|
||||
develocityAccessToken,
|
||||
develocityServerUrl,
|
||||
includes: config.getCacheIncludes(),
|
||||
excludes: config.getCacheExcludes()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,48 @@
|
||||
[
|
||||
{
|
||||
"version": "9.6.0-rc-1",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0-milestone-3",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.5.1",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0-milestone-2",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "8.14.5",
|
||||
"checksum": "7d3a4ac4de1c32b59bc6a4eb8ecb8e612ccd0cf1ae1e99f66902da64df296172"
|
||||
},
|
||||
{
|
||||
"version": "9.5.0",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.5.0-rc-4",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.6.0-milestone-1",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.5.0-rc-3",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.5.0-rc-2",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.5.0-rc-1",
|
||||
"checksum": "497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7"
|
||||
},
|
||||
{
|
||||
"version": "9.4.1",
|
||||
"checksum": "55243ef57851f12b070ad14f7f5bb8302daceeebc5bce5ece5fa6edb23e1145c"
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Vendored
+1
-1
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
+10
-21
@@ -23,8 +23,8 @@
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,7 +65,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
@@ -73,21 +73,10 @@ goto fail
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "4.4.0"
|
||||
id "com.gradle.develocity" version "4.4.2"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import java.nio.file.Files
|
||||
import java.util.zip.GZIPOutputStream
|
||||
|
||||
class BaseInitScriptTest extends Specification {
|
||||
static final String DEVELOCITY_PLUGIN_VERSION = '4.4.0'
|
||||
static final String DEVELOCITY_PLUGIN_VERSION = '4.4.2'
|
||||
static final String CCUD_PLUGIN_VERSION = '2.1'
|
||||
|
||||
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ task expectFailure {
|
||||
when:
|
||||
settingsFile.text = """
|
||||
plugins {
|
||||
id 'com.gradle.develocity' version '4.4.0' apply(false)
|
||||
id 'com.gradle.develocity' version '4.4.2' apply(false)
|
||||
}
|
||||
gradle.settingsEvaluated {
|
||||
apply plugin: 'com.gradle.develocity'
|
||||
|
||||
@@ -138,8 +138,8 @@ describe('BasicCacheService', () => {
|
||||
})
|
||||
|
||||
expect(mockSaveCache).not.toHaveBeenCalled()
|
||||
expect(report).toContain('read-only')
|
||||
expect(report).toContain(PRIMARY_KEY)
|
||||
expect(report.status).toBe('read-only')
|
||||
expect(report.entries[0].restoredKey).toBe(PRIMARY_KEY)
|
||||
})
|
||||
|
||||
it('reports readOnly with no restore when cache was missed', async () => {
|
||||
@@ -156,8 +156,9 @@ describe('BasicCacheService', () => {
|
||||
})
|
||||
|
||||
expect(mockSaveCache).not.toHaveBeenCalled()
|
||||
expect(report).toContain('read-only')
|
||||
expect(report).toContain('No cache entry')
|
||||
expect(report.status).toBe('read-only')
|
||||
expect(report.entries[0].restoredKey).toBeUndefined()
|
||||
expect(report.entries[0].restoredOutcome).toContain('not restored')
|
||||
})
|
||||
|
||||
it('skips save when restored key equals primary key', async () => {
|
||||
@@ -179,7 +180,8 @@ describe('BasicCacheService', () => {
|
||||
})
|
||||
|
||||
expect(mockSaveCache).not.toHaveBeenCalled()
|
||||
expect(report).toContain('Save was skipped')
|
||||
expect(report.status).toBe('enabled')
|
||||
expect(report.entries[0].savedOutcome).toContain('already exists')
|
||||
})
|
||||
|
||||
it('saves cache and returns report on success', async () => {
|
||||
@@ -204,7 +206,9 @@ describe('BasicCacheService', () => {
|
||||
['/home/.gradle/caches', '/home/.gradle/wrapper'],
|
||||
PRIMARY_KEY
|
||||
)
|
||||
expect(report).toContain('saved entry with key')
|
||||
expect(report.status).toBe('enabled')
|
||||
expect(report.entries[0].savedKey).toBe(PRIMARY_KEY)
|
||||
expect(report.entries[0].savedOutcome).toBe('(Entry saved)')
|
||||
})
|
||||
|
||||
it('warns on save failure instead of throwing', async () => {
|
||||
@@ -228,7 +232,7 @@ describe('BasicCacheService', () => {
|
||||
expect(mockWarning).toHaveBeenCalledWith(
|
||||
expect.stringContaining('failed to save')
|
||||
)
|
||||
expect(report).toContain('failed')
|
||||
expect(report.entries[0].savedOutcome).toContain('not saved')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -12,8 +12,7 @@ describe('getCacheService selection logic', () => {
|
||||
const {getCacheService} = await import('../../src/cache-service-loader')
|
||||
const mockConfig = {
|
||||
isCacheDisabled: () => true,
|
||||
getCacheProvider: () => CacheProvider.Enhanced,
|
||||
isCacheLicenseAccepted: () => true
|
||||
getCacheProvider: () => CacheProvider.Enhanced
|
||||
} as unknown as CacheConfig
|
||||
|
||||
const service = await getCacheService(mockConfig)
|
||||
@@ -28,23 +27,53 @@ describe('getCacheService selection logic', () => {
|
||||
excludes: []
|
||||
})
|
||||
|
||||
// NoOpCacheService returns a specific report mentioning cache was disabled
|
||||
expect(report).toContain('Cache was disabled')
|
||||
// NoOpCacheService reports a disabled cache with no entries
|
||||
expect(report.status).toBe('disabled')
|
||||
expect(report.entries).toHaveLength(0)
|
||||
})
|
||||
|
||||
it('wraps BasicCacheService with LicenseWarningCacheService when cache-provider is basic', async () => {
|
||||
it('returns a BasicCacheService when cache-provider is basic', async () => {
|
||||
const {getCacheService} = await import('../../src/cache-service-loader')
|
||||
const mockConfig = {
|
||||
isCacheDisabled: () => false,
|
||||
getCacheProvider: () => CacheProvider.Basic,
|
||||
isCacheLicenseAccepted: () => false
|
||||
getCacheProvider: () => CacheProvider.Basic
|
||||
} as unknown as CacheConfig
|
||||
|
||||
const service = await getCacheService(mockConfig)
|
||||
|
||||
// The service should not be a bare BasicCacheService — it should be wrapped
|
||||
// with LicenseWarningCacheService that appends the basic caching summary
|
||||
const {BasicCacheService} = await import('../../src/cache-service-basic')
|
||||
expect(service).not.toBeInstanceOf(BasicCacheService)
|
||||
expect(service).toBeInstanceOf(BasicCacheService)
|
||||
})
|
||||
|
||||
describe('getProviderNote', () => {
|
||||
it('returns undefined when cache is disabled', async () => {
|
||||
const {getProviderNote} = await import('../../src/cache-service-loader')
|
||||
const mockConfig = {
|
||||
isCacheDisabled: () => true,
|
||||
getCacheProvider: () => CacheProvider.Enhanced
|
||||
} as unknown as CacheConfig
|
||||
|
||||
expect(getProviderNote(mockConfig)).toBeUndefined()
|
||||
})
|
||||
|
||||
it('returns basic note for the basic provider', async () => {
|
||||
const {getProviderNote} = await import('../../src/cache-service-loader')
|
||||
const mockConfig = {
|
||||
isCacheDisabled: () => false,
|
||||
getCacheProvider: () => CacheProvider.Basic
|
||||
} as unknown as CacheConfig
|
||||
|
||||
expect(getProviderNote(mockConfig)).toEqual({kind: 'basic'})
|
||||
})
|
||||
|
||||
it('returns enhanced note for the enhanced provider', async () => {
|
||||
const {getProviderNote} = await import('../../src/cache-service-loader')
|
||||
const mockConfig = {
|
||||
isCacheDisabled: () => false,
|
||||
getCacheProvider: () => CacheProvider.Enhanced
|
||||
} as unknown as CacheConfig
|
||||
|
||||
expect(getProviderNote(mockConfig)).toEqual({kind: 'enhanced'})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
import {describe, expect, it} from '@jest/globals'
|
||||
|
||||
import {CacheReport} from '../../src/cache-service'
|
||||
import {renderCachingReport} from '../../src/caching-report'
|
||||
|
||||
const ENHANCED = {kind: 'enhanced'} as const
|
||||
const BASIC = {kind: 'basic'} as const
|
||||
|
||||
function entry(overrides: Partial<CacheReport['entries'][number]> = {}): CacheReport['entries'][number] {
|
||||
return {
|
||||
entryName: 'Gradle User Home',
|
||||
requestedKey: 'gradle-home-v1|key',
|
||||
restoredKey: 'gradle-home-v1|key',
|
||||
restoredSize: 535792,
|
||||
restoredTime: 253,
|
||||
restoredOutcome: '(Entry restored: exact match found)',
|
||||
savedKey: 'gradle-home-v1|key',
|
||||
savedSize: 528509,
|
||||
savedTime: 257,
|
||||
savedOutcome: '(Entry saved)',
|
||||
...overrides
|
||||
}
|
||||
}
|
||||
|
||||
describe('renderCachingReport', () => {
|
||||
it('renders an enhanced read-only report with heading, note and details', () => {
|
||||
const report: CacheReport = {status: 'read-only', cleanup: 'disabled-readonly', entries: [entry()]}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
expect(md).toContain('<h4>Gradle State Caching - ⚡ Enhanced (read-only)</h4>')
|
||||
expect(md).toContain('[Enhanced Caching]')
|
||||
expect(md).toContain('`gradle-actions-caching`')
|
||||
expect(md).toContain('DISTRIBUTION.md')
|
||||
expect(md).toContain('<details>')
|
||||
expect(md).toContain('<summary>Entries: 1 restored (1Mb), 1 saved (1Mb) - Expand for more details</summary>')
|
||||
// status message moves inside the details expando
|
||||
expect(md).toContain('Cache was read-only')
|
||||
// read-only does not render the cleanup line
|
||||
expect(md).not.toContain('Cache cleanup')
|
||||
})
|
||||
|
||||
it('renders an enhanced enabled report with status and cleanup inside the details', () => {
|
||||
const report: CacheReport = {status: 'enabled', cleanup: 'enabled', entries: [entry()]}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
expect(md).toContain('<h4>Gradle State Caching - ⚡ Enhanced</h4>')
|
||||
// status and cleanup messages are within the expando, after the summary
|
||||
const detailsBody = md.slice(md.indexOf('</summary>'))
|
||||
expect(detailsBody).toContain('Cache was enabled')
|
||||
expect(detailsBody).toContain('Cache cleanup')
|
||||
expect(md).toContain('<table>')
|
||||
expect(md).toContain('Entries Restored')
|
||||
})
|
||||
|
||||
it('renders a basic report with the upgrade note and no metrics table', () => {
|
||||
const report: CacheReport = {
|
||||
status: 'read-only',
|
||||
entries: [
|
||||
entry({
|
||||
restoredSize: undefined,
|
||||
restoredTime: undefined,
|
||||
savedKey: undefined,
|
||||
savedSize: undefined,
|
||||
savedTime: undefined,
|
||||
savedOutcome: '(Entry not saved: cache is read-only)'
|
||||
})
|
||||
]
|
||||
}
|
||||
const md = renderCachingReport(report, BASIC)
|
||||
|
||||
expect(md).toContain('<h4>Gradle State Caching - 🛡️ Basic (read-only)</h4>')
|
||||
expect(md).toContain('[Basic Caching]')
|
||||
expect(md).toContain('[Enhanced Caching]')
|
||||
// DISTRIBUTION.md is only referenced for the enhanced provider
|
||||
expect(md).not.toContain('DISTRIBUTION.md')
|
||||
// No size/time data, so the metrics table is omitted but the entry list remains
|
||||
expect(md).not.toContain('<table>')
|
||||
expect(md).toContain('<pre>')
|
||||
expect(md).toContain('<summary>Entries: 1 restored, 0 saved - Expand for more details</summary>')
|
||||
})
|
||||
|
||||
it('renders the project-cache status line inside the details', () => {
|
||||
const report: CacheReport = {
|
||||
status: 'enabled',
|
||||
cleanup: 'enabled',
|
||||
projectCache: 'enabled',
|
||||
entries: [entry()]
|
||||
}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
const detailsBody = md.slice(md.indexOf('</summary>'))
|
||||
expect(detailsBody).toContain(
|
||||
'Caching of project state (build-logic and configuration cache) was enabled.'
|
||||
)
|
||||
})
|
||||
|
||||
it('renders nothing for the not-enabled project-cache status', () => {
|
||||
const report: CacheReport = {
|
||||
status: 'enabled',
|
||||
cleanup: 'enabled',
|
||||
projectCache: 'not-enabled',
|
||||
entries: [entry()]
|
||||
}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
expect(md).not.toContain('Project state')
|
||||
expect(md).not.toContain('build-logic')
|
||||
})
|
||||
|
||||
it('omits the project-cache line when the status is absent', () => {
|
||||
const report: CacheReport = {status: 'enabled', cleanup: 'enabled', entries: [entry()]}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
expect(md).not.toContain('Project state')
|
||||
})
|
||||
|
||||
it('renders a compact disabled report with no note and no details', () => {
|
||||
const report: CacheReport = {status: 'disabled', entries: []}
|
||||
const md = renderCachingReport(report, undefined)
|
||||
|
||||
expect(md).toContain('<h4>Gradle State Caching - Disabled</h4>')
|
||||
expect(md).toContain('Caching was disabled')
|
||||
expect(md).not.toContain('<details>')
|
||||
expect(md).not.toContain('DISTRIBUTION.md')
|
||||
})
|
||||
|
||||
it('renders a compact skipped report for a pre-existing Gradle User Home', () => {
|
||||
const report: CacheReport = {status: 'disabled-existing-home', entries: []}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
expect(md).toContain('<h4>Gradle State Caching - Skipped</h4>')
|
||||
expect(md).toContain('pre-existing Gradle User Home')
|
||||
expect(md).not.toContain('<details>')
|
||||
// no provider note for non-active states
|
||||
expect(md).not.toContain('DISTRIBUTION.md')
|
||||
})
|
||||
|
||||
it('renders an unavailable report compactly', () => {
|
||||
const report: CacheReport = {status: 'not-available', entries: []}
|
||||
const md = renderCachingReport(report, ENHANCED)
|
||||
|
||||
expect(md).toContain('<h4>Gradle State Caching - Unavailable</h4>')
|
||||
expect(md).not.toContain('<details>')
|
||||
})
|
||||
})
|
||||
@@ -1,8 +1,15 @@
|
||||
import dedent from 'dedent'
|
||||
import {describe, expect, it} from '@jest/globals'
|
||||
import * as github from '@actions/github'
|
||||
import {afterEach, describe, expect, it} from '@jest/globals'
|
||||
|
||||
import {BuildResult} from '../../src/build-results'
|
||||
import {renderSummaryTable} from '../../src/job-summary'
|
||||
import {jobMarker, renderSummaryTable} from '../../src/job-summary'
|
||||
|
||||
const MATRIX_INPUT_ENV = 'INPUT_WORKFLOW-JOB-CONTEXT'
|
||||
|
||||
function fakeContext(workflow: string, job: string): typeof github.context {
|
||||
return {workflow, job} as unknown as typeof github.context
|
||||
}
|
||||
|
||||
const successfulHelpBuild: BuildResult = {
|
||||
rootProjectName: 'root',
|
||||
@@ -177,3 +184,27 @@ describe('renderSummaryTable', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('jobMarker', () => {
|
||||
const original = process.env[MATRIX_INPUT_ENV]
|
||||
|
||||
afterEach(() => {
|
||||
if (original === undefined) {
|
||||
delete process.env[MATRIX_INPUT_ENV]
|
||||
} else {
|
||||
process.env[MATRIX_INPUT_ENV] = original
|
||||
}
|
||||
})
|
||||
|
||||
it('builds a hidden marker from the workflow and job', () => {
|
||||
process.env[MATRIX_INPUT_ENV] = 'null'
|
||||
const marker = jobMarker(fakeContext('CI', 'build'))
|
||||
expect(marker).toBe('<!-- gradle-job-summary: ci-build -->')
|
||||
})
|
||||
|
||||
it('includes the job matrix in the marker', () => {
|
||||
process.env[MATRIX_INPUT_ENV] = JSON.stringify({os: 'ubuntu', java: '17'})
|
||||
const marker = jobMarker(fakeContext('CI', 'build'))
|
||||
expect(marker).toBe('<!-- gradle-job-summary: ci-build-ubuntu-17 -->')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import nock from "nock";
|
||||
import {describe, expect, it} from '@jest/globals'
|
||||
|
||||
import {DevelocityAccessCredentials, getToken} from "../../src/develocity/short-lived-token";
|
||||
import {DevelocityAccessCredentials, getToken, resolveAccessKeyForServer} from "../../src/develocity/short-lived-token";
|
||||
|
||||
describe('short lived tokens', () => {
|
||||
it('parse valid access key should return an object', async () => {
|
||||
@@ -134,3 +134,42 @@ describe('short lived tokens with retry', () => {
|
||||
.toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
describe('resolveAccessKeyForServer', () => {
|
||||
it('returns the key matching the server host from a full URL', () => {
|
||||
expect(resolveAccessKeyForServer('ge.example.com=key1;other=key2', 'https://ge.example.com')).toBe('key1')
|
||||
})
|
||||
|
||||
it('matches on hostname, ignoring scheme, port and path', () => {
|
||||
expect(resolveAccessKeyForServer('ge.example.com=key1', 'https://ge.example.com:8443/path')).toBe('key1')
|
||||
})
|
||||
|
||||
it('tolerates a bare hostname with no scheme', () => {
|
||||
expect(resolveAccessKeyForServer('ge.example.com=key1', 'ge.example.com')).toBe('key1')
|
||||
})
|
||||
|
||||
it('selects the matching key when multiple are present', () => {
|
||||
expect(resolveAccessKeyForServer('dev=key1;ge.example.com=key2', 'https://ge.example.com')).toBe('key2')
|
||||
})
|
||||
|
||||
it('accepts a short-lived token value (JWT with dots and dashes)', () => {
|
||||
const token = 'eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ4In0.sig-na_ture'
|
||||
expect(resolveAccessKeyForServer(`ge.example.com=${token}`, 'https://ge.example.com')).toBe(token)
|
||||
})
|
||||
|
||||
it('returns undefined when no key matches the server host', () => {
|
||||
expect(resolveAccessKeyForServer('ge.example.com=key1', 'https://other.example.com')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('returns undefined for an empty server URL', () => {
|
||||
expect(resolveAccessKeyForServer('ge.example.com=key1', '')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('returns undefined for an empty access key', () => {
|
||||
expect(resolveAccessKeyForServer('', 'https://ge.example.com')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('returns undefined for a malformed access key', () => {
|
||||
expect(resolveAccessKeyForServer('not-a-valid-access-key', 'https://ge.example.com')).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
+41
-2
@@ -11,6 +11,23 @@ export declare interface BuildResult {
|
||||
get buildScanFailed(): boolean;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare type CacheCleanupStatus = 'enabled' | 'disabled-param' | 'disabled-failure' | 'disabled-config-cache-hit' | 'disabled-readonly';
|
||||
|
||||
/** @public */
|
||||
export declare interface CacheEntryReport {
|
||||
entryName: string;
|
||||
requestedKey?: string;
|
||||
restoredKey?: string;
|
||||
restoredSize?: number;
|
||||
restoredTime?: number;
|
||||
restoredOutcome: string;
|
||||
savedKey?: string;
|
||||
savedSize?: number;
|
||||
savedTime?: number;
|
||||
savedOutcome: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare interface CacheOptions {
|
||||
disabled: boolean;
|
||||
@@ -18,16 +35,38 @@ export declare interface CacheOptions {
|
||||
writeOnly: boolean;
|
||||
overwriteExisting: boolean;
|
||||
strictMatch: boolean;
|
||||
cleanup: string;
|
||||
cleanup: 'always' | 'on-success' | 'never';
|
||||
encryptionKey?: string;
|
||||
develocityAccessToken?: string;
|
||||
develocityServerUrl?: string;
|
||||
includes: string[];
|
||||
excludes: string[];
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare interface CacheReport {
|
||||
status: CacheStatus;
|
||||
cleanup?: CacheCleanupStatus;
|
||||
projectCache?: ProjectCacheStatus;
|
||||
entries: CacheEntryReport[];
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare type CacheStatus = 'enabled' | 'read-only' | 'write-only' | 'disabled' | 'disabled-existing-home' | 'not-available';
|
||||
|
||||
/**
|
||||
* Status of project-entry caching (build-logic artifacts + configuration-cache data) for a run.
|
||||
* The first three are set on restore (always ungated); the rest are set on save and reflect the
|
||||
* two-tier gate (opt-in + Develocity trial, then encryption key + Gradle version). Still beta.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
declare type ProjectCacheStatus = 'not-enabled' | 'trial-expired' | 'trial-not-licensed' | 'no-encryption-key' | 'enabled';
|
||||
|
||||
/** @public */
|
||||
export declare function restore(gradleUserHome: string, cacheOptions: CacheOptions): Promise<void>;
|
||||
|
||||
/** @public */
|
||||
export declare function save(gradleUserHome: string, buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<string>;
|
||||
export declare function save(gradleUserHome: string, buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<CacheReport>;
|
||||
|
||||
export { }
|
||||
|
||||
+2
-1
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user