Update github workflows for 5.2.x branch
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
name: Artifactory Milestone Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
releaseVersion:
|
||||
description: "Milestone release version"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Release milestone to Artifactory
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Capture release version
|
||||
run: echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
|
||||
|
||||
- name: Update release version
|
||||
run: mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSION
|
||||
|
||||
- name: Enforce release rules
|
||||
run: mvn org.apache.maven.plugins:maven-enforcer-plugin:enforce -Drules=requireReleaseDeps
|
||||
|
||||
- name: Build with Maven and deploy to Artifactory's milestone repository
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: mvn -P artifactory-milestone -s settings.xml --batch-mode -Dmaven.test.skip=true deploy
|
||||
4
.github/workflows/artifactory-staging.yml
vendored
4
.github/workflows/artifactory-staging.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
releaseVersion:
|
||||
description: "Release version"
|
||||
description: "Release version (5.2.x)"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
@@ -14,6 +14,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: '5.2.x'
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
name: CI/CD build
|
||||
name: CI/CD build for 5.2.x
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
on:
|
||||
push:
|
||||
branches: [ "5.2.x" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build branch
|
||||
name: Build 5.2.x branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: '5.2.x'
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
@@ -18,11 +22,11 @@ jobs:
|
||||
cache: 'maven'
|
||||
|
||||
- name: Build with Maven
|
||||
if: ${{ github.repository != 'spring-projects/spring-batch' || github.ref_name != 'main' }}
|
||||
if: ${{ github.repository != 'spring-projects/spring-batch' || github.ref_name != '5.2.x' }}
|
||||
run: mvn -s settings.xml --batch-mode --update-snapshots verify
|
||||
|
||||
- name: Build with Maven and deploy to Artifactory
|
||||
if: ${{ github.repository == 'spring-projects/spring-batch' && github.ref_name == 'main' }}
|
||||
if: ${{ github.repository == 'spring-projects/spring-batch' && github.ref_name == '5.2.x' }}
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
@@ -39,7 +43,7 @@ jobs:
|
||||
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
|
||||
|
||||
- name: Setup SSH key
|
||||
if: ${{ github.repository == 'spring-projects/spring-batch' && github.ref_name == 'main' }}
|
||||
if: ${{ github.repository == 'spring-projects/spring-batch' && github.ref_name == '5.2.x' }}
|
||||
env:
|
||||
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
|
||||
DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }}
|
||||
@@ -50,7 +54,7 @@ jobs:
|
||||
echo "$DOCS_SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
|
||||
|
||||
- name: Deploy Java docs
|
||||
if: ${{ github.repository == 'spring-projects/spring-batch' && github.ref_name == 'main' }}
|
||||
if: ${{ github.repository == 'spring-projects/spring-batch' && github.ref_name == '5.2.x' }}
|
||||
env:
|
||||
DOCS_HOST: ${{ secrets.DOCS_HOST }}
|
||||
DOCS_PATH: ${{ secrets.DOCS_PATH }}
|
||||
30
.github/workflows/deploy-docs.yml
vendored
30
.github/workflows/deploy-docs.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: Deploy Docs
|
||||
on:
|
||||
push:
|
||||
branches-ignore: [ gh-pages ]
|
||||
tags: '**'
|
||||
repository_dispatch:
|
||||
types: request-build-reference # legacy
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
actions: write
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'spring-projects'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: docs-build
|
||||
fetch-depth: 1
|
||||
- name: Dispatch (partial build)
|
||||
if: github.ref_type == 'branch'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
|
||||
- name: Dispatch (full build)
|
||||
if: github.ref_type == 'tag'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)
|
||||
4
.github/workflows/documentation-upload.yml
vendored
4
.github/workflows/documentation-upload.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
releaseVersion:
|
||||
description: "Release version"
|
||||
description: "Release version (5.2.x)"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
@@ -17,6 +17,8 @@ jobs:
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: '5.2.x'
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
|
||||
36
.github/workflows/extension-build.yml
vendored
36
.github/workflows/extension-build.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Spring Batch Extension Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
extension:
|
||||
description: "Extension name"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- spring-batch-bigquery
|
||||
- spring-batch-excel
|
||||
- spring-batch-elasticsearch
|
||||
- spring-batch-geode
|
||||
- spring-batch-neo4j
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build an extension
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: 'spring-projects/spring-batch-extensions'
|
||||
ref: 'main'
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Build extension with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
working-directory: ${{ github.event.inputs.extension }}
|
||||
83
.github/workflows/maven-central-release.yml
vendored
83
.github/workflows/maven-central-release.yml
vendored
@@ -1,83 +0,0 @@
|
||||
name: Maven Central Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
releaseVersion:
|
||||
description: "Release version"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Capture release version
|
||||
run: echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
|
||||
|
||||
- name: Prepare directory structure
|
||||
run: |
|
||||
mkdir -p nexus/org/springframework/batch/spring-batch-bom/$RELEASE_VERSION
|
||||
mkdir -p nexus/org/springframework/batch/spring-batch-infrastructure/$RELEASE_VERSION
|
||||
mkdir -p nexus/org/springframework/batch/spring-batch-core/$RELEASE_VERSION
|
||||
mkdir -p nexus/org/springframework/batch/spring-batch-test/$RELEASE_VERSION
|
||||
mkdir -p nexus/org/springframework/batch/spring-batch-integration/$RELEASE_VERSION
|
||||
|
||||
- name: Download release files from Artifactory
|
||||
env:
|
||||
ARTIFACTORY_URL: "https://repo.spring.io/libs-staging-local/org/springframework/batch"
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: |
|
||||
echo "Downloading BOM artifacts"
|
||||
cd nexus/org/springframework/batch/spring-batch-bom/$RELEASE_VERSION
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-bom/$RELEASE_VERSION/spring-batch-bom-$RELEASE_VERSION.pom
|
||||
|
||||
echo "Downloading infrastructure artifacts"
|
||||
cd ../../../../../..
|
||||
cd nexus/org/springframework/batch/spring-batch-infrastructure/$RELEASE_VERSION
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-infrastructure/$RELEASE_VERSION/spring-batch-infrastructure-$RELEASE_VERSION.pom
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-infrastructure/$RELEASE_VERSION/spring-batch-infrastructure-$RELEASE_VERSION.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-infrastructure/$RELEASE_VERSION/spring-batch-infrastructure-$RELEASE_VERSION-javadoc.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-infrastructure/$RELEASE_VERSION/spring-batch-infrastructure-$RELEASE_VERSION-sources.jar
|
||||
|
||||
echo "Downloading core artifacts"
|
||||
cd ../../../../../..
|
||||
cd nexus/org/springframework/batch/spring-batch-core/$RELEASE_VERSION
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-core/$RELEASE_VERSION/spring-batch-core-$RELEASE_VERSION.pom
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-core/$RELEASE_VERSION/spring-batch-core-$RELEASE_VERSION.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-core/$RELEASE_VERSION/spring-batch-core-$RELEASE_VERSION-javadoc.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-core/$RELEASE_VERSION/spring-batch-core-$RELEASE_VERSION-sources.jar
|
||||
|
||||
echo "Downloading test artifacts"
|
||||
cd ../../../../../..
|
||||
cd nexus/org/springframework/batch/spring-batch-test/$RELEASE_VERSION
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-test/$RELEASE_VERSION/spring-batch-test-$RELEASE_VERSION.pom
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-test/$RELEASE_VERSION/spring-batch-test-$RELEASE_VERSION.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-test/$RELEASE_VERSION/spring-batch-test-$RELEASE_VERSION-javadoc.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-test/$RELEASE_VERSION/spring-batch-test-$RELEASE_VERSION-sources.jar
|
||||
|
||||
echo "Downloading integration artifacts"
|
||||
cd ../../../../../..
|
||||
cd nexus/org/springframework/batch/spring-batch-integration/$RELEASE_VERSION
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-integration/$RELEASE_VERSION/spring-batch-integration-$RELEASE_VERSION.pom
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-integration/$RELEASE_VERSION/spring-batch-integration-$RELEASE_VERSION.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-integration/$RELEASE_VERSION/spring-batch-integration-$RELEASE_VERSION-javadoc.jar
|
||||
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-batch-integration/$RELEASE_VERSION/spring-batch-integration-$RELEASE_VERSION-sources.jar
|
||||
|
||||
- name: Sign artifacts and release them to Maven Central
|
||||
uses: jvalkeal/nexus-sync@v0
|
||||
id: nexus
|
||||
with:
|
||||
url: ${{ secrets.OSSRH_URL }}
|
||||
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
|
||||
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
|
||||
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
|
||||
create: true
|
||||
upload: true
|
||||
close: true
|
||||
release: true
|
||||
generate-checksums: true
|
||||
pgp-sign: true
|
||||
pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
54
.github/workflows/release-notes-generation.yml
vendored
54
.github/workflows/release-notes-generation.yml
vendored
@@ -1,54 +0,0 @@
|
||||
name: Generate Release notes
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
milestoneNumber:
|
||||
description: "Milestone title"
|
||||
required: true
|
||||
generatorVersion:
|
||||
description: "Changelog Generator version"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Generate release notes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Capture milestone number and generator version
|
||||
run: |
|
||||
echo MILESTONE_NUMBER=${{ github.event.inputs.milestoneNumber }} >> $GITHUB_ENV
|
||||
echo GENERATOR_VERSION=${{ github.event.inputs.generatorVersion }} >> $GITHUB_ENV
|
||||
|
||||
- name: Download changelog generator
|
||||
run: wget https://github.com/spring-io/github-changelog-generator/releases/download/v$GENERATOR_VERSION/github-changelog-generator.jar
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Prepare configuration file
|
||||
run: |
|
||||
cat << EOF > application.yml
|
||||
changelog:
|
||||
repository: spring-projects/spring-batch
|
||||
sections:
|
||||
- title: ":star: New features"
|
||||
labels: [ "type: feature" ]
|
||||
- title: ":rocket: Enhancements"
|
||||
labels: [ "type: enhancement" ]
|
||||
- title: ":lady_beetle: Bug fixes"
|
||||
labels: [ "type: bug" ]
|
||||
- title: ":notebook_with_decorative_cover: Documentation"
|
||||
labels: [ "in: documentation" ]
|
||||
- title: ":hammer: Tasks"
|
||||
labels: [ "type: task" ]
|
||||
EOF
|
||||
|
||||
- name: Generate release notes
|
||||
run: java -jar github-changelog-generator.jar $MILESTONE_NUMBER release-notes.md
|
||||
|
||||
- name: Print release notes
|
||||
run: cat release-notes.md
|
||||
Reference in New Issue
Block a user