Update deprecated code that uses StepExecutionListenerSupport #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD build for 5.0.x | |
on: | |
push: | |
branches: [ "5.0.x" ] | |
jobs: | |
build: | |
name: Build 5.0.x branch | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
with: | |
ref: '5.0.x' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Build with Maven and deploy to Artifactory | |
env: | |
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
run: mvn -s settings.xml --batch-mode --update-snapshots deploy | |
- name: Generate Java docs | |
run: mvn javadoc:aggregate | |
- name: Generate Reference docs | |
working-directory: spring-batch-docs | |
run: mvn site | |
- name: Capture project version | |
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV | |
- name: Setup SSH key | |
env: | |
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }} | |
DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }} | |
run: | | |
mkdir "$HOME/.ssh" | |
echo "$DOCS_SSH_KEY" > "$HOME/.ssh/key" | |
chmod 600 "$HOME/.ssh/key" | |
echo "$DOCS_SSH_HOST_KEY" > "$HOME/.ssh/known_hosts" | |
- name: Deploy docs | |
env: | |
DOCS_HOST: ${{ secrets.DOCS_HOST }} | |
DOCS_PATH: ${{ secrets.DOCS_PATH }} | |
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }} | |
working-directory: spring-batch-docs/target | |
run: | | |
unzip spring-batch-$PROJECT_VERSION-docs.zip | |
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST cd $DOCS_PATH && mkdir -p $PROJECT_VERSION/api | |
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION/api | |
scp -i $HOME/.ssh/key -r reference $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION | |
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST cd $DOCS_PATH && ln -s $PROJECT_VERSION 5.0.x-SNAPSHOT |