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 40
40
# Extract version from gradle.properties
41
41
version=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}')
42
42
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
43
45
build_jdk_17 :
44
46
name : Build JDK 17
45
47
needs : [prerequisites]
@@ -108,12 +110,13 @@ jobs:
108
110
LOCAL_REPOSITORY_PATH : ${{ github.workspace }}/build/publications/repos
109
111
SAMPLES_DIR : ../spring-security-samples
110
112
VERSION : ${{ needs.prerequisites.outputs.project_version }}
113
+ SAMPLES_BRANCH : ${{ needs.prerequisites.outputs.samples_branch }}
111
114
run : |
112
115
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
113
116
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
114
117
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
115
118
./gradlew publishMavenJavaPublicationToLocalRepository
116
- ./gradlew cloneSamples -PcloneOutputDirectory="$SAMPLES_DIR"
119
+ ./gradlew cloneRepository -PrepositoryName="spring-projects/spring-security-samples" -Pref="$SAMPLES_BRANCH" -PcloneOutputDirectory="$SAMPLES_DIR"
117
120
./gradlew --project-dir "$SAMPLES_DIR" --init-script spring-security-ci.gradle -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" -PspringSecurityVersion="$VERSION" :runAllTests
118
121
check_tangles :
119
122
name : Check for Package Tangles
Original file line number Diff line number Diff line change @@ -154,10 +154,11 @@ nohttp {
154
154
source. builtBy(project(' :spring-security-config' ). tasks. withType(RncToXsd ))
155
155
}
156
156
157
- tasks. register(' cloneSamples' , IncludeRepoTask ) {
158
- repository = ' spring-projects/spring-security-samples'
159
- ref = samplesBranch
160
- outputDirectory = project. hasProperty(" cloneOutputDirectory" ) ? project. file(" $cloneOutputDirectory " ) : project. file(" build/samples" )
157
+ tasks. register(' cloneRepository' , IncludeRepoTask ) {
158
+ repository = project. getProperties(). get(" repositoryName" )
159
+ ref = project. getProperties(). get(" ref" )
160
+ var defaultDirectory = project. file(" build/tmp/clone" )
161
+ outputDirectory = project. hasProperty(" cloneOutputDirectory" ) ? project. file(" $cloneOutputDirectory " ) : defaultDirectory
161
162
}
162
163
163
164
s101 {
You can’t perform that action at this time.
0 commit comments