Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing develocity auth #161

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
80175f6
Grails 7: grails-spring-security-ui
bkoehm Oct 2, 2024
da8f0c4
Grails 7: convert to liberica
bkoehm Dec 17, 2024
20f0c1f
Grails 7: use ContainerGebSpec
bkoehm Dec 17, 2024
739bc78
Grails 7: remove uneeded versions from build configuration
bkoehm Dec 17, 2024
58f479c
Grails 7: update HashCodeBuilder package
bkoehm Dec 17, 2024
6d49a59
Grails 7: update mail plugin version
bkoehm Dec 17, 2024
322e811
Grails 7: initial work on tests
bkoehm Dec 17, 2024
cf47434
Grails 7: add layoutTitle to layouts
bkoehm Dec 17, 2024
2fce237
Fix setting the non-container url on the browser
jdaugherty Dec 18, 2024
a42eb51
Grails 7: Update usercache page to display statistics for a JSR-107 C…
bkoehm Dec 20, 2024
ee9bc1a
Grails 7: upgrade to asset-pipeline 5.0.5
bkoehm Dec 20, 2024
728c732
Grails 7: upgrade gradle wrapper to 8.12
bkoehm Dec 20, 2024
108e9f7
Grails 7: ignore failing testRegisterAndForgotPassword
bkoehm Dec 20, 2024
4caec31
Grails 7: For examples/simple, fix setting the non-container url on t…
bkoehm Dec 21, 2024
b799669
Grails 7: RoleSpec needs @Integration
bkoehm Dec 21, 2024
da5edc3
Grails 7: add Stepwise to tests
bkoehm Dec 20, 2024
aec0709
Grails 7: Change plugin grailsVersion requirement to 7.0.0-SNAPSHOT > *
bkoehm Dec 21, 2024
804724a
Grails 7: remove setting geb.env in build workflow
bkoehm Dec 21, 2024
fd3b824
ci: enhance workflows with build scans and caching
matrei Dec 21, 2024
f4ad8b0
ci: try another key for build scan auth
matrei Dec 21, 2024
c6eef17
build: make develocity auth logic clearer
matrei Dec 22, 2024
e609942
ci: add develocity key explicitly
matrei Dec 22, 2024
8e4d5fc
Merge branch '5.0.x' into matrei/testing-develocity-auth
matrei Dec 22, 2024
b2c9ec2
ci: remove explicit develocity key
matrei Dec 22, 2024
d1a19ce
test: remove `@PendingFeature` from `RegisterSpec`
matrei Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 27 additions & 32 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,64 +12,59 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
java: ['17']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- name: Print Dispatch Information
- name: "📢 Print Dispatch Information"
if: github.event_name == 'workflow_dispatch'
env:
DISPATCH_INFORMATION: ${{ github.event.inputs.message }}
run: echo $DISPATCH_INFORMATION
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'liberica'
java-version: ${{ matrix.java }}
- name: Run Tests
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "🏃 Run Tests"
if: github.event_name == 'pull_request'
id: tests
uses: gradle/gradle-build-action@v2
with:
arguments: check -Pgeb.env=chromeHeadless
- name: Run Build
run: ./gradlew check
- name: "🔨 Build project"
if: github.event_name == 'push'
id: build
uses: gradle/gradle-build-action@v2
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: build -Pgeb.env=chromeHeadless
- name: Publish Test Report
run: ./gradlew build
- name: "📄 Publish Test Report"
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Publish to repo.grails.org
uses: gradle/gradle-build-action@v2
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '8'
- name: "📤 Publish Snapshot"
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '17'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: publish
- name: Generate Documentation
run: publish
- name: "✍️ Generate Documentation"
id: docs
uses: gradle/gradle-build-action@v2
if: success() && github.event_name == 'push' && matrix.java == '8'
with:
arguments: docs
- name: Publish to Github Pages
if: steps.publish.outcome == 'success' && github.event_name == 'push' && matrix.java == '8'
uses: grails/github-pages-deploy-action@grails
if: success() && github.event_name == 'push' && matrix.java == '17'
run: ./gradlew docs
- name: "📤 Publish to Github Pages"
if: steps.publish.outcome == 'success' && github.event_name == 'push' && matrix.java == '17'
uses: micronaut-projects/github-pages-deploy-action@grails
env:
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: behlp@objectcomputing.com
COMMIT_NAME: Puneet Behl
COMMIT_EMAIL: grails-build@users.noreply.github.com
COMMIT_NAME: grails-build
45 changes: 10 additions & 35 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,22 @@
name: Changelog
name: "Release Drafter"
on:
issues:
types: [closed,reopened]
push:
branches:
- '[4-9]+.[0-9]+.x'
pull_request:
types: [opened, reopened, synchronize]
pull_request_target:
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
release_notes:
update_release_draft:
permissions:
contents: read # limit to read access
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if it has release drafter config file
id: check_release_drafter
run: |
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
echo ::set-output name=has_release_drafter::${has_release_drafter}
- name: Extract branch name
id: extract_branch
run: echo ::set-output name=value::${GITHUB_REF:11}
# If it has release drafter:
- uses: release-drafter/release-drafter@v5.24.0
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
- name: "📝 Update Release Draft"
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
commitish: ${{ steps.extract_branch.outputs.value }}
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
uses: grails/github-actions/export-gradle-properties@grails
- uses: grails/github-actions/release-notes@grails
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
id: release_notes
with:
token: ${{ secrets.GH_TOKEN }}
- uses: ncipollo/release-action@v1
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
with:
allowUpdates: true
commit: ${{ steps.release_notes.outputs.current_branch }}
draft: true
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
tag: v${{ steps.release_notes.outputs.next_version }}
bodyFile: CHANGELOG.md
token: ${{ secrets.GH_TOKEN }}
66 changes: 30 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
name: Release
name: "Release"
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: behlp@objectcomputing.com
GIT_USER_NAME: 'grails-build'
GIT_USER_EMAIL: 'grails-build@users.noreply.github.com'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v3
distribution: 'liberica'
java-version: '17'
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Set the current release version
develocity-access-key: ${{ DEVELOCITY_ACCESS_KEY }}
- name: "📝 Store the current release version"
id: release_version
run: echo ::set-output name=release_version::${GITHUB_REF:11}
- name: Run pre-release
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: "⚙ Run pre-release"
uses: grails/github-actions/pre-release@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate secring file
- name: "🔐 Generate key file for artifact signing"
env:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
- name: Publish to Sonatype OSSRH
- name: "📤 Publish release artifacts to Sonatype"
id: publish
uses: gradle/gradle-build-action@v2
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand All @@ -44,17 +39,18 @@ jobs:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
with:
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
- name: Publish Documentation
run: >
./gradlew
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
publishToSonatype
closeAndReleaseSonatypeStagingRepository
- name: "✍️ Generate Documentation"
id: docs
if: steps.publish.outcome == 'success'
uses: gradle/gradle-build-action@v2
with:
arguments: docs
- name: Export Gradle Properties
run: ./gradlew docs
- name: "Export Gradle Properties"
uses: grails/github-actions/export-gradle-properties@main
- name: Publish to Github Pages
- name: "📤 Publish to Github Pages"
if: steps.docs.outcome == 'success'
uses: grails/github-pages-deploy-action@grails
env:
Expand All @@ -64,13 +60,11 @@ jobs:
BRANCH: gh-pages
FOLDER: docs/build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: behlp@objectcomputing.com
COMMIT_NAME: Puneet Behl
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
VERSION: ${{ steps.release_version.outputs.release_version }}
- name: Run post-release
- name: "⚙️ Run post-release"
if: steps.publish.outcome == 'success' && steps.docs.outcome == 'success' && success()
uses: grails/github-actions/post-release@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
SNAPSHOT_SUFFIX: -SNAPSHOT
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ if (isReleaseVersion) {
}
}
}
}
}
6 changes: 3 additions & 3 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ buildscript {
maven { url 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.1'
classpath 'org.asciidoctor:asciidoctorj-pdf:2.3.9'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.1'
classpath 'org.asciidoctor:asciidoctorj-epub3:2.1.3'
classpath 'org.asciidoctor:asciidoctorj-pdf:2.3.18'
}
}

Expand Down
81 changes: 30 additions & 51 deletions examples/extended/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ buildscript {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails.plugins:hibernate5:${hibernateGormVersion}"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:${assetPipelineVersion}"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.0"
}
}

Expand All @@ -17,7 +16,6 @@ apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin: "com.bertramlabs.asset-pipeline"
apply plugin:"org.grails.grails-gsp"

Expand All @@ -26,56 +24,44 @@ repositories {
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
compile "org.grails.plugins:gsp"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core-jakarta:$hibernateCoreVersion"
implementation "org.grails.plugins:gsp"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
//testCompile "org.grails:grails-test-mixins:3.3.0"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails.plugins:geb"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.14.0"
testCompile "org.seleniumhq.selenium:selenium-api:3.14.0"
testCompile "org.seleniumhq.selenium:selenium-support:3.14.0"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.14.0"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:3.14.0"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.spockframework:spock-core"
integrationTestImplementation testFixtures('org.grails.plugins:geb')

compile 'dumbster:dumbster:1.6', { transitive = false }
compile "org.grails.plugins:mail:$mailVersion"
implementation "dumbster:dumbster:$dumbsterVersion", { transitive = false }
implementation "org.grails.plugins:mail:$mailVersion"


compile("org.grails.plugins:spring-security-acl:4.0.0.M2") {
implementation("org.grails.plugins:spring-security-acl:$springSecurityAclVersion") {
exclude group: 'org.grails.plugins', module: 'spring-security-core'
}

compile project(":spring-security-ui")
}

webdriverBinaries {
chromedriver "${chromeDriverVersion}"
geckodriver "${geckoDriverVersion}"
implementation project(":spring-security-ui")
}

bootRun {
Expand All @@ -89,11 +75,4 @@ assets {
}


tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}

apply from: "${rootProject.projectDir}/gradle/integrationTestVerbose.gradle"
Loading
Loading