File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 4040 # Extract version from gradle.properties
4141 version=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}')
4242 echo "project_version=$version" >>$GITHUB_OUTPUT
43+ samples_branch=$(cat gradle.properties | grep "samplesBranch=" | awk -F'=' '{print $2}')
44+ echo "samples_branch=$samples_branch" >>$GITHUB_OUTPUT
4345 build_jdk_17 :
4446 name : Build JDK 17
4547 needs : [prerequisites]
@@ -101,12 +103,13 @@ jobs:
101103 LOCAL_REPOSITORY_PATH : ${{ github.workspace }}/build/publications/repos
102104 SAMPLES_DIR : ../spring-security-samples
103105 VERSION : ${{ needs.prerequisites.outputs.project_version }}
106+ SAMPLES_BRANCH : ${{ needs.prerequisites.outputs.samples_branch }}
104107 run : |
105108 export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
106109 export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
107110 export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
108111 ./gradlew publishMavenJavaPublicationToLocalRepository
109- ./gradlew cloneSamples -PcloneOutputDirectory="$SAMPLES_DIR"
112+ ./gradlew cloneRepository -PrepositoryName="spring-projects/spring-security-samples" -Pref="$SAMPLES_BRANCH" -PcloneOutputDirectory="$SAMPLES_DIR"
110113 ./gradlew --project-dir "$SAMPLES_DIR" --init-script spring-security-ci.gradle -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" -PspringSecurityVersion="$VERSION" :runAllTests
111114 check_tangles :
112115 name : Check for Package Tangles
Original file line number Diff line number Diff line change @@ -143,10 +143,11 @@ nohttp {
143143 source. builtBy(project(' :spring-security-config' ). tasks. withType(RncToXsd ))
144144}
145145
146- tasks. register(' cloneSamples' , IncludeRepoTask ) {
147- repository = ' spring-projects/spring-security-samples'
148- ref = samplesBranch
149- outputDirectory = project. hasProperty(" cloneOutputDirectory" ) ? project. file(" $cloneOutputDirectory " ) : project. file(" build/samples" )
146+ tasks. register(' cloneRepository' , IncludeRepoTask ) {
147+ repository = project. getProperties(). get(" repositoryName" )
148+ ref = project. getProperties(). get(" ref" )
149+ var defaultDirectory = project. file(" build/tmp/clone" )
150+ outputDirectory = project. hasProperty(" cloneOutputDirectory" ) ? project. file(" $cloneOutputDirectory " ) : defaultDirectory
150151}
151152
152153s101 {
You can’t perform that action at this time.
0 commit comments