Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit a1a9419

Browse files
committed
Reorganization project, fix tests so they run, and standardize publishing
1 parent 77a9489 commit a1a9419

File tree

420 files changed

+1212
-1542
lines changed

Some content is hidden

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

420 files changed

+1212
-1542
lines changed

.github/workflows/gradle.yml

Lines changed: 57 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,72 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
java: [ '17', '21' ]
1316
env:
14-
WORKSPACE: ${{ github.workspace }}
1517
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
1618
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up JDK
19+
- name: "📥 Checkout the repository"
20+
uses: actions/checkout@v4
21+
- name: "☕️ Setup JDK"
1922
uses: actions/setup-java@v4
2023
with:
21-
distribution: 'temurin'
22-
java-version: 17
23-
- name: Run Tests
24-
if: github.event_name == 'pull_request'
25-
id: tests
26-
uses: gradle/gradle-build-action@v2
27-
with:
28-
arguments: check -Dgeb.env=chromeHeadless
29-
- name: Run Build
30-
if: github.event_name == 'push'
31-
id: build
32-
uses: gradle/gradle-build-action@v2
24+
distribution: 'liberica'
25+
java-version: ${{ matrix.java }}
26+
- name: "🐘 Setup Gradle"
27+
uses: gradle/actions/setup-gradle@v4
28+
- name: "🔨 Run Base Tests"
3329
env:
34-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
35-
with:
36-
arguments: build -Dgeb.env=chromeHeadless
37-
- name: Publish Test Report
30+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
31+
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
32+
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
33+
run: ./gradlew check --continue
34+
- name: "🚀 Publish Test Report"
3835
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
3936
uses: scacap/action-surefire-report@v1
4037
with:
4138
github_token: ${{ secrets.GITHUB_TOKEN }}
4239
report_paths: '**/build/test-results/test/TEST-*.xml'
43-
- name: Publish to repo.grails.org
44-
id: publish
45-
uses: gradle/gradle-build-action@v2
46-
if: steps.build.outcome == 'success' && github.event_name == 'push'
47-
env:
48-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
49-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
50-
with:
51-
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
52-
- name: Build Documentation
53-
id: docs
54-
uses: gradle/gradle-build-action@v2
40+
check_name: "Test Report - ${{ matrix.java }}"
41+
publish:
42+
if: github.event_name == 'push'
43+
needs: build
44+
runs-on: ubuntu-latest
45+
permissions:
46+
contents: read
47+
steps:
48+
- name: "📥 Checkout the repository"
49+
uses: actions/checkout@v4
50+
- name: "☕️ Setup JDK"
51+
uses: actions/setup-java@v4
5552
with:
56-
arguments: docs
53+
distribution: 'liberica'
54+
java-version: '17'
55+
- name: "🐘 Setup Gradle"
56+
uses: gradle/actions/setup-gradle@v4
57+
- name: "📤 Publish to Snapshot (repo.grails.org)"
58+
env:
59+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
60+
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
61+
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
62+
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
63+
working-directory: ./plugin
64+
run: ../gradlew publish
65+
- name: "📜 Generate Documentation"
66+
if: success()
67+
env:
68+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
69+
run: ../gradlew docs
70+
- name: "🚀 Publish to Github Pages"
71+
if: success()
72+
uses: micronaut-projects/github-pages-deploy-action@grails
73+
env:
74+
SKIP_SNAPSHOT: ${{ contains(needs.publish.outputs.release_version, 'M') }}
75+
TARGET_REPOSITORY: ${{ github.repository }}
76+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
77+
BRANCH: gh-pages
78+
FOLDER: plugin/build/docs
79+
DOC_FOLDER: gh-pages
80+
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
81+
COMMIT_NAME: ${{ env.GIT_USER_NAME }}

.github/workflows/release.yml

Lines changed: 72 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,100 @@ name: Release
22
on:
33
release:
44
types: [published]
5+
env:
6+
GIT_USER_NAME: 'grails-build'
7+
GIT_USER_EMAIL: '[email protected]'
58
jobs:
69
publish:
10+
permissions:
11+
contents: write # to create release
12+
issues: write # to modify milestones
13+
runs-on: ubuntu-latest
714
outputs:
815
release_version: ${{ steps.release_version.outputs.value }}
9-
runs-on: ubuntu-latest
10-
env:
11-
GIT_USER_NAME: puneetbehl
12-
GIT_USER_EMAIL: [email protected]
16+
target_branch: ${{ steps.extract_branch.outputs.value }}
1317
steps:
14-
- name: Checkout repository
18+
- name: "📥 Checkout the repository"
1519
uses: actions/checkout@v4
1620
with:
1721
token: ${{ secrets.GH_TOKEN }}
18-
- name: Set up JDK
22+
- name: "☕️ Setup JDK"
1923
uses: actions/setup-java@v4
2024
with:
21-
distribution: 'temurin'
25+
distribution: 'liberica'
2226
java-version: '17'
23-
- name: Set the current release version
27+
- name: "🐘 Setup Gradle"
28+
uses: gradle/actions/setup-gradle@v4
29+
- name: "📝 Store the target branch"
30+
id: extract_branch
31+
run: |
32+
echo "Determining Target Branch"
33+
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
34+
echo $TARGET_BRANCH
35+
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
36+
- name: "📝Set the current release version"
2437
id: release_version
2538
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
26-
- name: Run pre-release
39+
- name: "⚙️ Run pre-release"
2740
uses: micronaut-projects/github-actions/pre-release@master
2841
with:
2942
token: ${{ secrets.GITHUB_TOKEN }}
30-
- name: Run Assemble
43+
- name: "🧩 Run Assemble"
3144
if: success()
3245
id: assemble
33-
uses: gradle/gradle-build-action@v2
34-
with:
35-
arguments: assemble
36-
env:
37-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
38-
- name: Upload Distribution
39-
if: success()
40-
uses: actions/upload-artifact@v4
41-
with:
42-
name: spring-security-cas-${{ steps.release_version.outputs.value }}.jar
43-
path: plugin/build/libs/spring-security-cas-${{ steps.release_version.outputs.value }}-plain.jar
44-
- name: Generate secring file
46+
run: ./gradlew assemble
47+
- name: "🔐 Generate secring file"
4548
env:
4649
SECRING_FILE: ${{ secrets.SECRING_FILE }}
4750
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
48-
- name: Publish to Sonatype OSSRH
51+
- name: "🚀 Publish to Sonatype OSSRH"
4952
id: publish
50-
uses: gradle/gradle-build-action@v2
5153
env:
52-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
53-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
54-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
55-
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }}
56-
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
54+
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
55+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
56+
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
57+
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
5758
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
5859
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
5960
SECRING_FILE: ${{ secrets.SECRING_FILE }}
60-
with:
61-
arguments: |
62-
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
63-
publishToSonatype
64-
closeSonatypeStagingRepository
61+
working-directory: ./plugin
62+
run: >
63+
../gradlew
64+
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
65+
publishToSonatype
66+
closeSonatypeStagingRepository
6567
release:
6668
needs: publish
6769
runs-on: ubuntu-latest
6870
permissions:
6971
contents: read
7072
steps:
71-
- uses: actions/checkout@v4
72-
- name: Set up JDK
73+
- name: "📥 Checkout repository"
74+
uses: actions/checkout@v4
75+
- name: "☕️ Setup JDK"
7376
uses: actions/setup-java@v4
7477
with:
75-
distribution: 'temurin'
76-
java-version: '17'
77-
- name: Checkout repository
78+
distribution: liberica
79+
java-version: 17
80+
- name: "📥 Checkout repository"
7881
uses: actions/checkout@v4
7982
with:
8083
token: ${{ secrets.GH_TOKEN }}
8184
ref: v${{ needs.publish.outputs.release_version }}
82-
- name: Nexus Staging Close And Release
83-
uses: gradle/gradle-build-action@v2
85+
- name: "🐘 Setup Gradle"
86+
uses: gradle/actions/setup-gradle@v4
87+
- name: "🏆Nexus Staging Close And Release"
8488
env:
85-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
86-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
87-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
88-
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
89-
with:
90-
arguments: |
91-
findSonatypeStagingRepository
92-
releaseSonatypeStagingRepository
93-
- name: Run post-release
89+
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
90+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
91+
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
92+
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
93+
working-directory: ./plugin
94+
run: >
95+
../gradlew
96+
findSonatypeStagingRepository
97+
releaseSonatypeStagingRepository
98+
- name: "⚙️Run post-release"
9499
if: success()
95100
uses: micronaut-projects/github-actions/post-release@master
96101
with:
@@ -103,31 +108,34 @@ jobs:
103108
permissions:
104109
contents: write
105110
steps:
106-
- name: Set up JDK
107-
uses: actions/setup-java@v4
108-
with:
109-
distribution: 'temurin'
110-
java-version: '17'
111-
- name: Checkout repository
111+
- name: "📥 Checkout the repository"
112112
uses: actions/checkout@v4
113113
with:
114114
token: ${{ secrets.GH_TOKEN }}
115115
ref: v${{ needs.publish.outputs.release_version }}
116-
- name: Build Documentation
117-
id: docs
118-
uses: gradle/gradle-build-action@v2
116+
- name: "☕️ Setup JDK"
117+
uses: actions/setup-java@v4
119118
with:
120-
arguments: docs
121-
- name: Publish to Github Pages
119+
distribution: 'liberica'
120+
java-version: '17'
121+
- name: "🐘 Setup Gradle"
122+
uses: gradle/actions/setup-gradle@v4
123+
- name: "📜 Generate User Guide Documentation"
124+
id: docs
125+
run: ./gradlew docs
126+
- name: "🚀 Publish to Github Pages"
127+
id: docs
122128
if: success()
123129
uses: grails/github-pages-deploy-action@v2
124130
env:
125-
SKIP_LATEST: ${{ contains(needs.publish.outputs.release_version, 'M') }}
131+
SKIP_SNAPSHOT: ${{ contains(needs.publish.outputs.release_version, 'M') }}
132+
# if multiple releases are being done, this is the last branch - 1 version
133+
#SKIP_LATEST: ${{ !startsWith(needs.publish.outputs.target_branch, '6.2') }}
126134
TARGET_REPOSITORY: ${{ github.repository }}
127135
GH_TOKEN: ${{ secrets.GH_TOKEN }}
128136
BRANCH: gh-pages
129137
FOLDER: build/docs
130138
DOC_FOLDER: gh-pages
131-
COMMIT_EMAIL: [email protected]
132-
COMMIT_NAME: Puneet Behl
139+
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
140+
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
133141
VERSION: ${{ needs.publish.outputs.release_version }}

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
*.iws
44
*.log
55
*.sublime-workspace
6-
.asscache
76
.DS_Store
7+
.asscache
8+
.classpath
89
.gradle
910
.idea
10-
build
11+
.project
12+
.settings
13+
Thumbs.db
14+
build

.sdkmanrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Enable auto-env through the sdkman_auto_env config - https://sdkman.io/usage#env
2+
java=17.0.12-librca

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ See [documentation](https://grails-plugins.github.io/grails-spring-security-ldap
1717

1818
Branches:
1919

20-
- '5.0.x' Grails 7 compatible versions.
21-
- '4.0.x' Grails 4 compatible versions.
20+
- `5.0.x` Grails 7 compatible versions.
21+
- `4.0.x` Grails 4 compatible versions.
2222
- `3.x` Grails 3 compatible versions.

0 commit comments

Comments
 (0)