Skip to content

Commit 6c8bc06

Browse files
authored
Merge pull request #1116 from jdaugherty/7.0.x
2 parents 24a5fb7 + 3b86b2a commit 6c8bc06

File tree

67 files changed

+512
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+512
-167
lines changed

.asf.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
github:
2+
environments:
3+
source:
4+
required_reviewers:
5+
- id: grails-committers
6+
type: Team
7+
wait_timer: 0
8+
release:
9+
required_reviewers:
10+
- id: grails-committers
11+
type: Team
12+
wait_timer: 0
13+
docs:
14+
required_reviewers:
15+
- id: grails-committers
16+
type: Team
17+
wait_timer: 0

.github/workflows/gradle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ concurrency:
2929
cancel-in-progress: false
3030
jobs:
3131
coreTests:
32-
if: ${{ contains(github.event.head_commit.message, '[skip tests]') }}
32+
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
3333
runs-on: ubuntu-24.04
3434
steps:
3535
- name: "📥 Checkout repository"
@@ -46,7 +46,7 @@ jobs:
4646
- name: "🏃‍♂️ Run Tests"
4747
run: ./gradlew check --max-workers=2 --refresh-dependencies --continue
4848
functionalTests:
49-
if: ${{ contains(github.event.head_commit.message, '[skip tests]') }}
49+
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
5050
runs-on: ubuntu-24.04
5151
strategy:
5252
fail-fast: false
@@ -68,7 +68,7 @@ jobs:
6868
run: ./gradlew core-examples-functional-test-app:check -DTESTCONFIG=${{ matrix.test-config }}
6969
publish:
7070
needs: [ coreTests, functionalTests ]
71-
if: ${{ always() && github.repository_owner == 'apache' && github.event_name == 'push' && (needs.coreTests.result == 'success' || needs.coreTests.result == 'skipped') && (needs.functionalTests.result == 'success' || needs.functionalTests.result == 'skipped') }}
71+
if: ${{ always() && github.repository_owner == 'apache' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (needs.coreTests.result == 'success' || needs.coreTests.result == 'skipped') && (needs.functionalTests.result == 'success' || needs.functionalTests.result == 'skipped') }}
7272
runs-on: ubuntu-24.04
7373
permissions:
7474
contents: write

.github/workflows/release.yml

Lines changed: 151 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ jobs:
3131
runs-on: ubuntu-24.04
3232
outputs:
3333
release_version: ${{ steps.release_version.outputs.value }}
34+
extract_repository_name: ${{ steps.extract_repository_name.outputs.repository_name }}
3435
steps:
3536
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
3637
run: curl -s https://api.ipify.org
38+
- name: "Extract repository name"
39+
id: extract_repository_name
40+
run: |
41+
echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
3742
- name: "📥 Checkout repository"
3843
uses: actions/checkout@v4
3944
- name: 'Ensure Common Build Date' # to ensure a reproducible build
@@ -51,7 +56,7 @@ jobs:
5156
uses: actions/setup-java@v4
5257
with:
5358
distribution: liberica
54-
java-version: '17.0.14' # this must be a specific version for reproducible builds
59+
java-version: '17.0.15' # this must be a specific version for reproducible builds
5560
- name: "🐘 Setup Gradle"
5661
uses: gradle/actions/setup-gradle@v4
5762
with:
@@ -70,12 +75,26 @@ jobs:
7075
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
7176
NEXUS_PUBLISH_URL: 'https://repository.apache.org/service/local/'
7277
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
73-
NEXUS_PUBLISH_DESCRIPTION: 'grails-spring-security:${{ steps.release_version.outputs.value }}'
78+
NEXUS_PUBLISH_DESCRIPTION: '${{ steps.extract_repository_name.outputs.repository_name }}:${{ steps.release_version.outputs.value }}'
7479
SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
7580
run: >
76-
./gradlew --refresh-dependencies
81+
./gradlew
7782
publishToSonatype
7883
closeSonatypeStagingRepository
84+
aggregateChecksums
85+
aggregatePublishedArtifacts
86+
- name: "Upload checksums"
87+
uses: softprops/action-gh-release@v2
88+
with:
89+
files: build/CHECKSUMS.txt
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
- name: "Upload published artifacts"
93+
uses: softprops/action-gh-release@v2
94+
with:
95+
files: build/PUBLISHED_ARTIFACTS.txt
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7998
- name: "Generate Build Date file"
8099
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
81100
- name: "Upload Build Date file"
@@ -84,6 +103,133 @@ jobs:
84103
files: build/BUILD_DATE.txt
85104
env:
86105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
source:
107+
# to ensure we never publish any build artifacts, run the source distribution as a separate build workflow
108+
environment: source
109+
name: "Source Distribution"
110+
needs: publish
111+
permissions:
112+
contents: write
113+
runs-on: ubuntu-latest
114+
outputs:
115+
extract_repository_name: ${{ steps.extract_repository_name.outputs.repository_name }}
116+
steps:
117+
- name: "Extract repository name"
118+
id: extract_repository_name
119+
run: |
120+
echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
121+
- name: "📥 Checkout repository"
122+
uses: actions/checkout@v4
123+
with:
124+
repository: ${{ github.repository }}
125+
ref: ${{ github.ref_name }}
126+
path: project
127+
- name: "🗑️ Remove unnecessary files"
128+
run: |
129+
rm -f project/gradle/wrapper/gradle-wrapper.jar
130+
rm -f project/gradle/wrapper/gradle-wrapper.properties
131+
rm -f project/gradlew
132+
rm -f project/.asf.yaml
133+
- name: "Download CHECKSUMS.txt and rename to CHECKSUMS"
134+
env:
135+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136+
run: |
137+
cd project
138+
release_url=$(gh release view ${{ github.ref_name }} --json assets --repo ${{ github.repository }} --jq '.assets[] | select(.name == "CHECKSUMS.txt") | .url')
139+
curl -L -H "Authorization: token $GH_TOKEN" -o CHECKSUMS "$release_url"
140+
- name: "Download PUBLISHED_ARTIFACTS.txt and rename to PUBLISHED_ARTIFACTS"
141+
env:
142+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
run: |
144+
cd project
145+
release_url=$(gh release view ${{ github.ref_name }} --json assets --repo ${{ github.repository }} --jq '.assets[] | select(.name == "PUBLISHED_ARTIFACTS.txt") | .url')
146+
curl -L -H "Authorization: token $GH_TOKEN" -o PUBLISHED_ARTIFACTS "$release_url"
147+
- name: "Download BUILD_DATE.txt and rename to BUILD_DATE"
148+
env:
149+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
150+
run: |
151+
cd project
152+
release_url=$(gh release view ${{ github.ref_name }} --json assets --repo ${{ github.repository }} --jq '.assets[] | select(.name == "BUILD_DATE.txt") | .url')
153+
curl -L -H "Authorization: token $GH_TOKEN" -o BUILD_DATE "$release_url"
154+
- name: "Ensure source files use common date"
155+
run: |
156+
SOURCE_DATE_EPOCH=$(cat project/BUILD_DATE)
157+
find . -depth \( -type f -o -type d \) -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
158+
- name: "📦 Create source distribution ZIP"
159+
run: |
160+
version="${{ github.ref_name }}"
161+
version="${version#v}" # Strip 'v' prefix
162+
zip -r "apache-${{ steps.extract_repository_name.outputs.repository_name }}-${version}-incubating-src.zip" project -x 'project/.git/*' -x 'project/.github/*'
163+
- name: '🔐 Set up GPG'
164+
run: |
165+
echo "${{ secrets.GRAILS_GPG_KEY }}" | gpg --batch --import
166+
gpg --list-keys
167+
env:
168+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
169+
- name: "🔏 Sign source distribution ZIP"
170+
env:
171+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
172+
run: |
173+
version="${{ github.ref_name }}"
174+
version="${version#v}" # Strip 'v' prefix
175+
gpg --default-key "${GPG_KEY_ID}" --batch --yes --pinentry-mode loopback --armor --detach-sign apache-${{ steps.extract_repository_name.outputs.repository_name }}-${version}-incubating-src.zip
176+
- name: "📦 Create source distribution checksum"
177+
run: |
178+
version="${{ github.ref_name }}"
179+
version="${version#v}" # Strip 'v' prefix
180+
sha512sum apache-${{ steps.extract_repository_name.outputs.repository_name }}-${version}-incubating-src.zip > "apache-${{ steps.extract_repository_name.outputs.repository_name }}-${version}-incubating-src.zip.sha512"
181+
- name: "🚀 Upload ZIP and Signature to GitHub Release"
182+
uses: softprops/action-gh-release@v2
183+
with:
184+
tag_name: ${{ github.ref_name }}
185+
files: |
186+
apache-${{ steps.extract_repository_name.outputs.repository_name }}-*-incubating-src.zip
187+
apache-${{ steps.extract_repository_name.outputs.repository_name }}-*-incubating-src.zip.sha512
188+
apache-${{ steps.extract_repository_name.outputs.repository_name }}-*-incubating-src.zip.asc
189+
- name: "Remove CHECKSUMS.txt asset from release"
190+
env:
191+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192+
run: |
193+
set -e
194+
cd project
195+
gh release --repo ${{ github.repository }} delete-asset ${{ github.ref_name }} CHECKSUMS.txt --yes
196+
- name: "Remove BUILD_DATE.txt asset from release"
197+
env:
198+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
199+
run: |
200+
set -e
201+
cd project
202+
gh release --repo ${{ github.repository }} delete-asset ${{ github.ref_name }} BUILD_DATE.txt --yes
203+
- name: "Remove PUBLISHED_ARTIFACTS.txt asset from release"
204+
env:
205+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206+
run: |
207+
set -e
208+
cd project
209+
gh release --repo ${{ github.repository }} delete-asset ${{ github.ref_name }} PUBLISHED_ARTIFACTS.txt --yes
210+
release:
211+
environment: release
212+
needs: [publish, source]
213+
runs-on: ubuntu-latest
214+
permissions:
215+
contents: write
216+
issues: write
217+
steps:
218+
- name: "📥 Checkout repository"
219+
uses: actions/checkout@v4
220+
with:
221+
ref: v${{ needs.publish.outputs.release_version }}
222+
- name: "☕️ Setup JDK"
223+
uses: actions/setup-java@v4
224+
with:
225+
distribution: liberica
226+
java-version: '17.0.15' # this must be a specific version for reproducible builds
227+
- name: "🐘 Setup Gradle"
228+
uses: gradle/actions/setup-gradle@v4
229+
with:
230+
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
231+
- name: "⚙️ Run post-release"
232+
uses: apache/grails-github-actions/post-release@asf
87233
docs:
88234
environment: docs
89235
name: "Publish Documentation"
@@ -97,12 +243,10 @@ jobs:
97243
uses: actions/checkout@v4
98244
with:
99245
ref: v${{ needs.publish.outputs.release_version }}
100-
- name: 'Ensure Common Build Date' # to ensure a reproducible build
101-
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
102246
- name: "☕️ Setup JDK"
103247
uses: actions/setup-java@v4
104248
with:
105-
java-version: 17
249+
java-version: '17.0.15' # this must be a specific version for reproducible builds
106250
distribution: liberica
107251
- name: "🐘 Setup Gradle"
108252
uses: gradle/actions/setup-gradle@v4
@@ -118,29 +262,4 @@ jobs:
118262
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119263
GRADLE_PUBLISH_RELEASE: 'true'
120264
SOURCE_FOLDER: build/docs
121-
VERSION: ${{ steps.release_version.outputs.value }}
122-
release:
123-
environment: release
124-
needs: publish
125-
runs-on: ubuntu-latest
126-
permissions:
127-
contents: write
128-
issues: write
129-
steps:
130-
- name: "📥 Checkout repository"
131-
uses: actions/checkout@v4
132-
with:
133-
ref: v${{ needs.publish.outputs.release_version }}
134-
- name: 'Ensure Common Build Date' # to ensure a reproducible build
135-
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
136-
- name: "☕️ Setup JDK"
137-
uses: actions/setup-java@v4
138-
with:
139-
distribution: liberica
140-
java-version: 17
141-
- name: "🐘 Setup Gradle"
142-
uses: gradle/actions/setup-gradle@v4
143-
with:
144-
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
145-
- name: "⚙️ Run post-release"
146-
uses: apache/grails-github-actions/post-release@asf
265+
VERSION: ${{ needs.publish.outputs.release_version }}

.sdkmanrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
java=17.0.15-librca
2+
gradle=8.14

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,27 @@ limitations under the License.
1919
Grails Spring Security
2020
======================
2121

22-
See [documentation](https://apache.github.io/grails-spring-security/latest) for further information.
22+
See [documentation](https://apache.github.io/grails-spring-security/latest) for detailed information.
23+
24+
### Building
25+
26+
To build this project from source, first bootstrap gradle:
27+
28+
cd gradle-bootstrap
29+
gradle
30+
cd -
31+
32+
After bootstrap the project, you can build it with the command:
33+
34+
./gradlew build
35+
36+
To run the build only, and skip the tests, run:
37+
38+
./gradlew build -PskipTests
39+
40+
Then publish the jar files to mavenLocal for usage:
41+
42+
./gradlew publishToMavenLocal
2343

2444
### Branch structure
2545

@@ -44,19 +64,3 @@ spring:
4464
- org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration
4565
- org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration
4666
```
47-
48-
### Building
49-
50-
To build this project from source, first bootstrap gradle:
51-
52-
cd gradle-bootstrap
53-
gradle
54-
cd -
55-
56-
After bootstrap the project, you can build it with the command:
57-
58-
./gradlew build
59-
60-
To run the build only, and skip the tests, run:
61-
62-
./gradlew build -PskipTests

build.gradle

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import java.time.Instant
2-
import java.time.ZoneOffset
3-
import java.time.format.DateTimeFormatter
4-
51
/*
62
* Licensed to the Apache Software Foundation (ASF) under one
73
* or more contributor license agreements. See the NOTICE file
@@ -20,6 +16,9 @@ import java.time.format.DateTimeFormatter
2016
* specific language governing permissions and limitations
2117
* under the License.
2218
*/
19+
import java.time.Instant
20+
import java.time.ZoneOffset
21+
import java.time.format.DateTimeFormatter
2322

2423
ext {
2524
isReproducibleBuild = System.getenv("SOURCE_DATE_EPOCH") != null
@@ -45,6 +44,15 @@ allprojects {
4544
}
4645
}
4746
}
47+
48+
configurations.configureEach {
49+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
50+
if (details.requested.group == 'org.seleniumhq.selenium') {
51+
details.useVersion('4.25.0')
52+
details.because('Temporary workaround because of https://issues.chromium.org/issues/42323769')
53+
}
54+
}
55+
}
4856
}
4957

5058
subprojects {

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@
1717
# under the License.
1818
#
1919
projectVersion=7.0.0-SNAPSHOT
20-
grailsVersion=7.0.0-SNAPSHOT
20+
grailsVersion=7.0.0-M4
2121
javaVersion=17
2222

23+
unboundidLdapSdk=7.0.2
2324
apacheDsVersion=1.5.4
2425
asciidoctorGradlePluginVersion=4.0.4
2526
casClientCoreVersion=4.0.4
2627
commonsLangVersion=2.6
2728
dumbsterVersion=1.6
2829
gradleCryptoChecksumVersion=1.4.0
29-
grailsRedisVersion=5.0.0-M3
30+
grailsRedisVersion=5.0.0-SNAPSHOT
3031
mailVersion=5.0.0-SNAPSHOT
3132
micronautVersion=4.5.3
3233
pac4jVersion=6.0.6

0 commit comments

Comments
 (0)