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]
@@ -101,12 +103,13 @@ jobs:
101
103
LOCAL_REPOSITORY_PATH : ${{ github.workspace }}/build/publications/repos
102
104
SAMPLES_DIR : ../spring-security-samples
103
105
VERSION : ${{ needs.prerequisites.outputs.project_version }}
106
+ SAMPLES_BRANCH : ${{ needs.prerequisites.outputs.samples_branch }}
104
107
run : |
105
108
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
106
109
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
107
110
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
108
111
./gradlew publishMavenJavaPublicationToLocalRepository
109
- ./gradlew cloneSamples -PcloneOutputDirectory="$SAMPLES_DIR"
112
+ ./gradlew cloneRepository -PrepositoryName="spring-projects/spring-security-samples" -Pref="$SAMPLES_BRANCH" -PcloneOutputDirectory="$SAMPLES_DIR"
110
113
./gradlew --project-dir "$SAMPLES_DIR" --init-script spring-security-ci.gradle -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" -PspringSecurityVersion="$VERSION" :runAllTests
111
114
check_tangles :
112
115
name : Check for Package Tangles
Original file line number Diff line number Diff line change @@ -143,10 +143,11 @@ nohttp {
143
143
source. builtBy(project(' :spring-security-config' ). tasks. withType(RncToXsd ))
144
144
}
145
145
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
150
151
}
151
152
152
153
s101 {
You can’t perform that action at this time.
0 commit comments