2020-11-10 10:25:16 -05:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-03-16 12:20:16 -04:00
|
|
|
branches:
|
|
|
|
- '**'
|
2020-11-10 10:25:16 -05:00
|
|
|
schedule:
|
|
|
|
- cron: '0 10 * * *' # Once per day at 10am UTC
|
2021-01-21 08:02:54 -05:00
|
|
|
workflow_dispatch: # Manual trigger
|
2020-11-10 10:25:16 -05:00
|
|
|
|
|
|
|
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 }}
|
|
|
|
COMMIT_OWNER: ${{ github.event.pusher.name }}
|
|
|
|
COMMIT_SHA: ${{ github.sha }}
|
2021-10-26 17:10:28 -04:00
|
|
|
STRUCTURE101_LICENSEID: ${{ secrets.STRUCTURE101_LICENSEID }}
|
2020-11-16 14:02:11 -05:00
|
|
|
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
|
|
|
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
2021-05-03 16:12:12 -04:00
|
|
|
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
|
2020-11-10 10:25:16 -05:00
|
|
|
|
|
|
|
jobs:
|
2021-05-03 16:12:12 -04:00
|
|
|
prerequisites:
|
|
|
|
name: Pre-requisites for building
|
2020-11-10 10:25:16 -05:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-03 16:12:12 -04:00
|
|
|
outputs:
|
|
|
|
runjobs: ${{ steps.continue.outputs.runjobs }}
|
2022-03-09 11:02:18 -05:00
|
|
|
project_version: ${{ steps.continue.outputs.project_version }}
|
2020-11-10 10:25:16 -05:00
|
|
|
steps:
|
2022-03-09 11:02:18 -05:00
|
|
|
- uses: actions/checkout@v2
|
2021-05-03 16:12:12 -04:00
|
|
|
- id: continue
|
|
|
|
name: Determine if should continue
|
2021-05-11 18:20:46 -04:00
|
|
|
if: env.RUN_JOBS == 'true'
|
2022-03-02 17:16:59 -05:00
|
|
|
run: |
|
|
|
|
# Run jobs if in upstream repository
|
|
|
|
echo "::set-output name=runjobs::true"
|
|
|
|
# Extract version from gradle.properties
|
|
|
|
version=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}')
|
|
|
|
echo "::set-output name=project_version::$version"
|
2021-10-07 14:20:10 -04:00
|
|
|
build_jdk_17:
|
|
|
|
name: Build JDK 17
|
2021-05-03 16:12:12 -04:00
|
|
|
needs: [prerequisites]
|
2021-05-24 11:19:39 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2021-05-07 07:47:47 -04:00
|
|
|
if: needs.prerequisites.outputs.runjobs
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-07 14:20:10 -04:00
|
|
|
- name: Set up JDK 17
|
2021-05-07 07:47:47 -04:00
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-10-07 14:20:10 -04:00
|
|
|
java-version: '17'
|
2021-05-17 05:07:35 -04:00
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
2021-09-28 16:07:44 -04:00
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2021-05-14 13:13:18 -04:00
|
|
|
- name: Build with Gradle
|
2021-05-20 08:54:55 -04:00
|
|
|
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"
|
2020-11-10 10:25:16 -05:00
|
|
|
snapshot_tests:
|
|
|
|
name: Test against snapshots
|
2021-05-03 16:12:12 -04:00
|
|
|
needs: [prerequisites]
|
2020-11-10 10:25:16 -05:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-11 18:20:46 -04:00
|
|
|
if: needs.prerequisites.outputs.runjobs
|
2020-11-10 10:25:16 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-10-07 14:20:10 -04:00
|
|
|
java-version: '17'
|
2021-05-17 05:07:35 -04:00
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
2021-09-28 16:07:44 -04:00
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2020-11-10 10:25:16 -05:00
|
|
|
- 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"
|
2020-11-16 14:11:07 -05:00
|
|
|
./gradlew test --refresh-dependencies -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PforceMavenRepositories=snapshot -PspringVersion='5.+' -PreactorVersion='20+' -PspringDataVersion='Neumann-BUILD-SNAPSHOT' -PrsocketVersion=1.1.0-SNAPSHOT -PspringBootVersion=2.4.0-SNAPSHOT -PlocksDisabled --stacktrace
|
2022-02-14 07:03:41 -05:00
|
|
|
check_samples:
|
|
|
|
name: Check Samples project
|
|
|
|
needs: [prerequisites]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: needs.prerequisites.outputs.runjobs
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: '17'
|
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2022-02-14 07:03:41 -05:00
|
|
|
- name: Check samples project
|
2022-01-21 07:46:19 -05:00
|
|
|
env:
|
|
|
|
LOCAL_REPOSITORY_PATH: ${{ github.workspace }}/build/publications/repos
|
|
|
|
SAMPLES_INIT_SCRIPT: ${{ github.workspace }}/build/includeRepo/spring-security-ci.gradle
|
2022-02-14 07:03:41 -05:00
|
|
|
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"
|
2022-01-21 07:46:19 -05:00
|
|
|
./gradlew publishMavenJavaPublicationToLocalRepository
|
|
|
|
./gradlew checkSamples -PsamplesInitScript="$SAMPLES_INIT_SCRIPT" -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" --stacktrace
|
2021-09-27 17:01:46 -04:00
|
|
|
check_tangles:
|
|
|
|
name: Check for Package Tangles
|
|
|
|
needs: [ prerequisites ]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: needs.prerequisites.outputs.runjobs
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-10-07 14:20:10 -04:00
|
|
|
java-version: '17'
|
2021-09-27 17:01:46 -04:00
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
2021-10-26 13:25:36 -04:00
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2021-09-27 17:01:46 -04:00
|
|
|
- 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"
|
2021-10-26 17:10:28 -04:00
|
|
|
./gradlew check s101 -Ps101.licenseId="$STRUCTURE101_LICENSEID" --stacktrace
|
2020-11-10 10:25:16 -05:00
|
|
|
deploy_artifacts:
|
|
|
|
name: Deploy Artifacts
|
2022-02-14 07:03:41 -05:00
|
|
|
needs: [build_jdk_17, snapshot_tests, check_samples, check_tangles]
|
2020-11-10 10:25:16 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-10-07 14:20:10 -04:00
|
|
|
java-version: '17'
|
2021-05-17 05:07:35 -04:00
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
2021-09-28 16:07:44 -04:00
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2020-11-10 10:25:16 -05:00
|
|
|
- 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"
|
2021-05-18 00:40:43 -04:00
|
|
|
./gradlew publishArtifacts finalizeDeployArtifacts -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
|
2020-11-10 10:25:16 -05:00
|
|
|
env:
|
2021-05-18 17:43:35 -04:00
|
|
|
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
|
2021-05-18 00:40:43 -04:00
|
|
|
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
|
|
|
|
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
|
2020-11-10 10:25:16 -05:00
|
|
|
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
|
|
|
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
|
|
|
deploy_docs:
|
|
|
|
name: Deploy Docs
|
2022-02-14 07:03:41 -05:00
|
|
|
needs: [build_jdk_17, snapshot_tests, check_samples, check_tangles]
|
2020-11-10 10:25:16 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-10-07 14:20:10 -04:00
|
|
|
java-version: '17'
|
2021-05-17 05:07:35 -04:00
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
2021-09-28 16:07:44 -04:00
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2020-11-10 10:25:16 -05:00
|
|
|
- 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
|
|
|
|
env:
|
|
|
|
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
|
|
|
|
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
|
|
|
|
DOCS_HOST: ${{ secrets.DOCS_HOST }}
|
|
|
|
deploy_schema:
|
|
|
|
name: Deploy Schema
|
2022-02-14 07:03:41 -05:00
|
|
|
needs: [build_jdk_17, snapshot_tests, check_samples, check_tangles]
|
2020-11-10 10:25:16 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-10-07 14:20:10 -04:00
|
|
|
java-version: '17'
|
2021-05-17 05:07:35 -04:00
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
2021-09-28 16:07:44 -04:00
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2020-11-10 10:25:16 -05:00
|
|
|
- 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
|
|
|
|
env:
|
|
|
|
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
|
|
|
|
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
|
|
|
|
DOCS_HOST: ${{ secrets.DOCS_HOST }}
|
Add workflow step for scheduling the next milestone
This step introduces the concept of a release train to determine the appropriate release dates and schedules milestones as needed. It uses the following rules:
- If the current SNAPSHOT version is a minor release (patchVersion == 0), checks to see if a GA release exists. If not, a release train is scheduled as follows:
- Finds the next available release train starting month (including this month), either January or July.
- Schedules a release train with M1, M2, M3, RC1 and GA versions on either January/February/March/April/May or July/August/September/October/November
- If the current SNAPSHOT version is a patch release (patchVersion != 0), checks to see if a GA release exists. If not, an individual milestone is scheduled on the next even month whose release day is in the future (can include this month).
- In either case, the release day used to schedule the release is based on the configured weekOfMonth (1-4) and dayOfWeek (1-5), e.g. 3rd Monday of the month (3, 1).
If a milestone already exists, nothing is created. Once created, milestone due dates can be updated manually as desired.
Closes gh-10458
2022-05-05 15:28:49 -04:00
|
|
|
perform_release:
|
|
|
|
name: Perform release
|
2022-03-02 17:16:59 -05:00
|
|
|
needs: [prerequisites, deploy_artifacts, deploy_docs, deploy_schema]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 90
|
|
|
|
if: ${{ !endsWith(needs.prerequisites.outputs.project_version, '-SNAPSHOT') }}
|
|
|
|
env:
|
|
|
|
REPO: ${{ github.repository }}
|
|
|
|
BRANCH: ${{ github.ref_name }}
|
|
|
|
TOKEN: ${{ github.token }}
|
|
|
|
VERSION: ${{ needs.prerequisites.outputs.project_version }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
Add workflow step for scheduling the next milestone
This step introduces the concept of a release train to determine the appropriate release dates and schedules milestones as needed. It uses the following rules:
- If the current SNAPSHOT version is a minor release (patchVersion == 0), checks to see if a GA release exists. If not, a release train is scheduled as follows:
- Finds the next available release train starting month (including this month), either January or July.
- Schedules a release train with M1, M2, M3, RC1 and GA versions on either January/February/March/April/May or July/August/September/October/November
- If the current SNAPSHOT version is a patch release (patchVersion != 0), checks to see if a GA release exists. If not, an individual milestone is scheduled on the next even month whose release day is in the future (can include this month).
- In either case, the release day used to schedule the release is based on the configured weekOfMonth (1-4) and dayOfWeek (1-5), e.g. 3rd Monday of the month (3, 1).
If a milestone already exists, nothing is created. Once created, milestone due dates can be updated manually as desired.
Closes gh-10458
2022-05-05 15:28:49 -04:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
2022-03-02 17:16:59 -05:00
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: '17'
|
|
|
|
- name: Setup gradle user name
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
|
|
|
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
2022-03-02 17:16:59 -05:00
|
|
|
- name: Wait for Artifactory Artifacts
|
|
|
|
if: ${{ contains(needs.prerequisites.outputs.project_version, '-RC') || contains(needs.prerequisites.outputs.project_version, '-M') }}
|
|
|
|
run: |
|
|
|
|
echo "Wait for artifacts of $REPO@$VERSION to appear on Artifactory."
|
|
|
|
until curl -f -s https://repo.spring.io/artifactory/milestone/org/springframework/security/spring-security-core/$VERSION/ > /dev/null
|
|
|
|
do
|
|
|
|
sleep 30
|
|
|
|
echo "."
|
|
|
|
done
|
|
|
|
echo "Artifacts for $REPO@$VERSION have been released to Artifactory."
|
|
|
|
- name: Wait for Maven Central Artifacts
|
|
|
|
if: ${{ !contains(needs.prerequisites.outputs.project_version, '-RC') && !contains(needs.prerequisites.outputs.project_version, '-M') }}
|
|
|
|
run: |
|
|
|
|
echo "Wait for artifacts of $REPO@$VERSION to appear on Maven Central."
|
|
|
|
until curl -f -s https://repo1.maven.org/maven2/org/springframework/security/spring-security-core/$VERSION/ > /dev/null
|
|
|
|
do
|
|
|
|
sleep 30
|
|
|
|
echo "."
|
|
|
|
done
|
|
|
|
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
|
2022-03-18 12:04:17 -04:00
|
|
|
- name: Setup git config
|
|
|
|
run: |
|
|
|
|
git config user.name 'github-actions[bot]'
|
|
|
|
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."
|
2022-03-29 06:25:55 -04:00
|
|
|
./gradlew :updateToSnapshotVersion
|
|
|
|
./gradlew :spring-security-docs:antoraUpdateVersion
|
|
|
|
git commit -am "Next development version"
|
2022-03-18 12:04:17 -04:00
|
|
|
git push
|
Add workflow step for scheduling the next milestone
This step introduces the concept of a release train to determine the appropriate release dates and schedules milestones as needed. It uses the following rules:
- If the current SNAPSHOT version is a minor release (patchVersion == 0), checks to see if a GA release exists. If not, a release train is scheduled as follows:
- Finds the next available release train starting month (including this month), either January or July.
- Schedules a release train with M1, M2, M3, RC1 and GA versions on either January/February/March/April/May or July/August/September/October/November
- If the current SNAPSHOT version is a patch release (patchVersion != 0), checks to see if a GA release exists. If not, an individual milestone is scheduled on the next even month whose release day is in the future (can include this month).
- In either case, the release day used to schedule the release is based on the configured weekOfMonth (1-4) and dayOfWeek (1-5), e.g. 3rd Monday of the month (3, 1).
If a milestone already exists, nothing is created. Once created, milestone due dates can be updated manually as desired.
Closes gh-10458
2022-05-05 15:28:49 -04:00
|
|
|
perform_post_release:
|
|
|
|
name: Perform post-release
|
|
|
|
needs: [prerequisites, deploy_artifacts, deploy_docs, deploy_schema]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 90
|
|
|
|
if: ${{ endsWith(needs.prerequisites.outputs.project_version, '-SNAPSHOT') }}
|
|
|
|
env:
|
|
|
|
TOKEN: ${{ github.token }}
|
|
|
|
VERSION: ${{ needs.prerequisites.outputs.project_version }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: spring-io/spring-gradle-build-action@v1
|
|
|
|
- name: Schedule next release (if not already scheduled)
|
|
|
|
run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN
|
2020-11-10 10:25:16 -05:00
|
|
|
notify_result:
|
|
|
|
name: Check for failures
|
2022-06-03 16:23:48 -04:00
|
|
|
needs: [build_jdk_17, snapshot_tests, check_samples, check_tangles, deploy_artifacts, deploy_docs, deploy_schema, perform_release, perform_post_release]
|
2021-05-24 16:59:00 -04:00
|
|
|
if: failure()
|
2020-11-10 10:25:16 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Send Slack message
|
2021-05-24 16:59:00 -04:00
|
|
|
uses: Gamesight/slack-workflow-status@v1.0.1
|
2020-11-10 10:25:16 -05:00
|
|
|
with:
|
2021-05-24 16:59:00 -04:00
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
channel: '#spring-security-ci'
|
|
|
|
name: 'CI Notifier'
|