Skip to content

[ACS-6860] spring version vulnerability #66

[ACS-6860] spring version vulnerability

[ACS-6860] spring version vulnerability #66

Workflow file for this run

name: Surf
on:
push:
branches:
- develop
- "**/APPS-**"
- "support/**"
pull_request:
branches:
- develop
- "support/**"
workflow_dispatch:
inputs:
commitMessage:
description: Enter the Commit Message
required: true
env:
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }}
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }}
BRANCH_NAME: ${{ github.ref_name }}
jobs:
Source_Clear_Scan:
if: ${{ startsWith(github.ref_name, 'support/') && github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '[no_release]') && github.event.repository.fork==false && !contains(inputs.commitMessage, '[no_release]')}}
runs-on: ubuntu-latest
needs: Build_and_test
steps:
# Typical Java workflow steps
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Set up Java"
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: "Setup maven"
shell: bash
run: |
[ -d ${HOME}/.m2/ ] || mkdir -p ${HOME}/.m2/
cp -v surf/_ci/settings.xml ${HOME}/.m2/ || cp -v surf/_ci/.travis.settings.xml ${HOME}/.m2/settings.xml
- name: "Cache the Maven packages to speed up build"
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "Starting Source Clear Script"
run: bash surf/_ci/source_clear.sh
Build_and_test:
runs-on: ubuntu-latest
steps:
# Typical Java workflow steps
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Set up Java"
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: "Cache the Maven packages to speed up build"
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "Run script"
run: |
cd surf
cp _ci/.travis.settings.xml $HOME/.m2/settings.xml
mvn clean
mvn install -DskipTests=true -B -V
mvn test
Release:
if: ${{ startsWith(github.ref_name, 'support/') && github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '[no_release]') && github.event.repository.fork==false && !contains(inputs.commitMessage, '[no_release]')}}
runs-on: ubuntu-latest
needs: Build_and_test
steps:
# Typical Java workflow steps
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Set up Java"
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: "Setup maven"
shell: bash
run: |
[ -d ${HOME}/.m2/ ] || mkdir -p ${HOME}/.m2/
cp -v surf/_ci/settings.xml ${HOME}/.m2/ || cp -v surf/_ci/.travis.settings.xml ${HOME}/.m2/settings.xml
- name: "Cache the Maven packages to speed up build"
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Get branch name
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: "Use full history for release"
run: git checkout -B "$BRANCH_NAME"
- name: "Get the latest changes on branch"
run: git pull
- name: "Add email to link commits to user"
run: git config user.email "${GIT_EMAIL}"
- name: "Add user name to link commits to user"
run: git config user.name "${GIT_USERNAME}"
- name: "Skip building of release commits"
run: |
cd surf
mvn --batch-mode -q -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests -Darguments=-Dmaven.javadoc.skip=true release:clean release:prepare release:perform