|
|
|
@ -10,9 +10,7 @@ on:
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
|
|
|
|
|
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
|
|
|
|
|
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
|
|
|
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
|
|
|
|
COMMIT_OWNER: ${{ github.event.pusher.name }}
|
|
|
|
|
COMMIT_SHA: ${{ github.sha }}
|
|
|
|
|
STRUCTURE101_LICENSEID: ${{ secrets.STRUCTURE101_LICENSEID }}
|
|
|
|
@ -61,10 +59,6 @@ jobs:
|
|
|
|
|
- name: Set up gradle user name
|
|
|
|
|
run: echo 'systemProp.user.name=spring-builds+github' >> gradle.properties
|
|
|
|
|
- name: Build with Gradle
|
|
|
|
|
env:
|
|
|
|
|
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
|
|
|
|
|
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
|
|
|
|
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
|
|
|
|
run: ./gradlew clean build --continue -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
|
|
|
|
|
snapshot_tests:
|
|
|
|
|
name: Test against snapshots
|
|
|
|
@ -79,11 +73,7 @@ jobs:
|
|
|
|
|
java-version: '11'
|
|
|
|
|
distribution: 'adopt'
|
|
|
|
|
- name: Snapshot Tests
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
./gradlew test --refresh-dependencies -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PforceMavenRepositories=snapshot -PisOverrideVersionCatalog -PspringFrameworkVersion='5.+' -PreactorVersion='2020.0.+' -PspringDataVersion='2021.2.+' -PlocksDisabled --stacktrace
|
|
|
|
|
run: ./gradlew test --refresh-dependencies -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PforceMavenRepositories=snapshot -PisOverrideVersionCatalog -PspringFrameworkVersion='5.+' -PreactorVersion='2020.0.+' -PspringDataVersion='2021.2.+' -PlocksDisabled --stacktrace
|
|
|
|
|
check_samples:
|
|
|
|
|
name: Check Samples project
|
|
|
|
|
needs: [prerequisites]
|
|
|
|
@ -102,9 +92,6 @@ jobs:
|
|
|
|
|
SAMPLES_DIR: ../spring-security-samples
|
|
|
|
|
VERSION: ${{ needs.prerequisites.outputs.project_version }}
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
./gradlew publishMavenJavaPublicationToLocalRepository
|
|
|
|
|
./gradlew cloneSamples -PcloneOutputDirectory="$SAMPLES_DIR"
|
|
|
|
|
./gradlew --project-dir "$SAMPLES_DIR" --init-script spring-security-ci.gradle -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" -PspringSecurityVersion="$VERSION" :runAllTests
|
|
|
|
@ -121,11 +108,7 @@ jobs:
|
|
|
|
|
java-version: '11'
|
|
|
|
|
distribution: 'adopt'
|
|
|
|
|
- name: Check for package tangles
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
./gradlew check s101 -Ps101.licenseId="$STRUCTURE101_LICENSEID" --stacktrace
|
|
|
|
|
run: ./gradlew check s101 -Ps101.licenseId="$STRUCTURE101_LICENSEID" --stacktrace
|
|
|
|
|
deploy_artifacts:
|
|
|
|
|
name: Deploy Artifacts
|
|
|
|
|
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
|
|
|
|
@ -138,11 +121,7 @@ jobs:
|
|
|
|
|
java-version: '11'
|
|
|
|
|
distribution: 'adopt'
|
|
|
|
|
- name: Deploy artifacts
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
./gradlew publishArtifacts finalizeDeployArtifacts -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
|
|
|
|
|
run: ./gradlew publishArtifacts finalizeDeployArtifacts -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
|
|
|
|
|
env:
|
|
|
|
|
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
|
|
|
|
@ -162,11 +141,7 @@ jobs:
|
|
|
|
|
java-version: '11'
|
|
|
|
|
distribution: 'adopt'
|
|
|
|
|
- name: Deploy Docs
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
./gradlew deployDocs -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace
|
|
|
|
|
run: ./gradlew deployDocs -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace
|
|
|
|
|
env:
|
|
|
|
|
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
|
|
|
|
|
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
|
|
|
|
@ -183,11 +158,7 @@ jobs:
|
|
|
|
|
java-version: '11'
|
|
|
|
|
distribution: 'adopt'
|
|
|
|
|
- name: Deploy Schema
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
./gradlew deploySchema -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace --info
|
|
|
|
|
run: ./gradlew deploySchema -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace --info
|
|
|
|
|
env:
|
|
|
|
|
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
|
|
|
|
|
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
|
|
|
|
@ -236,9 +207,6 @@ jobs:
|
|
|
|
|
echo "Artifacts for $REPO@$VERSION have been released to Maven Central."
|
|
|
|
|
- name: Create GitHub Release
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
echo "Tagging and publishing $REPO@$VERSION release on GitHub."
|
|
|
|
|
./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
|
|
|
|
|
- name: Announce Release on Slack
|
|
|
|
@ -267,9 +235,6 @@ jobs:
|
|
|
|
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
|
|
|
- name: Update to next Snapshot Version
|
|
|
|
|
run: |
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
|
|
|
|
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
|
|
|
|
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
|
|
|
|
echo "Updating $REPO@$VERSION to next snapshot version."
|
|
|
|
|
./gradlew :updateToSnapshotVersion
|
|
|
|
|
git commit -am "Next development version"
|
|
|
|
|