Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,33 @@ env:
COMMIT_SHA: ${{ github.sha }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}

jobs:
initiate_error_tracking:
name: Initiate job-level error tracking
prerequisites:
name: Pre-requisites for building
runs-on: ubuntu-latest
outputs:
runjobs: ${{ steps.continue.outputs.runjobs }}
steps:
- uses: actions/checkout@v2
- name: Initiate error tracking
uses: spring-projects/track-build-errors-action@v1
with:
job-name: "initiate-error-tracking"
job-name: "prerequisites"
- name: Export errors file
uses: actions/upload-artifact@v2
with:
name: errors
path: job-initiate-error-tracking.txt
path: job-prerequisites.txt
- id: continue
name: Determine if should continue
run: echo "::set-output name=runjobs::${RUN_JOBS}"
build_jdk_11:
name: Build JDK 11
needs: [prerequisites]
runs-on: ubuntu-latest
if: needs.prequisites.outputs.runjobs == 'true'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
Expand Down Expand Up @@ -66,7 +74,9 @@ jobs:
path: job-${{ github.job }}.txt
snapshot_tests:
name: Test against snapshots
needs: [prerequisites]
runs-on: ubuntu-latest
if: needs.prequisites.outputs.runjobs == 'true'
steps:
- uses: actions/checkout@v2
- name: Set up JDK
Expand All @@ -92,7 +102,9 @@ jobs:
path: job-${{ github.job }}.txt
sonar_analysis:
name: Static Code Analysis
needs: [prerequisites]
runs-on: ubuntu-latest
if: needs.prequisites.outputs.runjobs == 'true'
env:
SONAR_URL: ${{ secrets.SONAR_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pr-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@ name: PR Build

on: pull_request

env:
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}

jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.repository == 'spring-projects/spring-security'
steps:
- uses: actions/checkout@v2
- if: env.RUN_JOBS == 'true'
uses: actions/checkout@v2
- name: Set up JDK
if: env.RUN_JOBS == 'true'
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Cache Gradle packages
if: env.RUN_JOBS == 'true'
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Build with Gradle
if: env.RUN_JOBS == 'true'
run: ./gradlew clean build --continue --scan