Skip to content

Commit bd48fdf

Browse files
Merge branch '6.1.x'
2 parents 67d3e4c + de0b887 commit bd48fdf

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
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]
@@ -108,12 +110,13 @@ jobs:
108110
LOCAL_REPOSITORY_PATH: ${{ github.workspace }}/build/publications/repos
109111
SAMPLES_DIR: ../spring-security-samples
110112
VERSION: ${{ needs.prerequisites.outputs.project_version }}
113+
SAMPLES_BRANCH: ${{ needs.prerequisites.outputs.samples_branch }}
111114
run: |
112115
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
113116
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
114117
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
115118
./gradlew publishMavenJavaPublicationToLocalRepository
116-
./gradlew cloneSamples -PcloneOutputDirectory="$SAMPLES_DIR"
119+
./gradlew cloneRepository -PrepositoryName="spring-projects/spring-security-samples" -Pref="$SAMPLES_BRANCH" -PcloneOutputDirectory="$SAMPLES_DIR"
117120
./gradlew --project-dir "$SAMPLES_DIR" --init-script spring-security-ci.gradle -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" -PspringSecurityVersion="$VERSION" :runAllTests
118121
check_tangles:
119122
name: Check for Package Tangles

build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,11 @@ nohttp {
154154
source.builtBy(project(':spring-security-config').tasks.withType(RncToXsd))
155155
}
156156

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
161162
}
162163

163164
s101 {

0 commit comments

Comments
 (0)