Skip to content

Commit

Permalink
feat: checked run pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
PWS-TE committed Jan 20, 2025
1 parent a2d9539 commit d7453df
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ on:
- fix/**
- master
- release/**
- CIN-1300-Implement-nightly-job-to-run-Veracode-scan
push:
branches:
- feature/**
- fix/**
- master
- release/**
- CIN-1300-Implement-nightly-job-to-run-Veracode-scan
schedule:
- cron: "10/5 * * * *" # Runs every night at midnight
- cron: "0/5 * * * *" # Runs every night at midnight
branches:
- master
- CIN-1300-Implement-nightly-job-to-run-Veracode-scan

env:
# Both variables are required to be set before the release process starts .
Expand All @@ -33,8 +38,7 @@ env:
jobs:
pre_commit:
runs-on: ubuntu-latest
if: >
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' || github.event.schedule)
if: github.event_name != 'schedule'
outputs:
java_version: ${{ env.JAVA_VERSION }}
java_version_supported_by_repo: ${{ env.JAVA_VERSION_SUPPORTED_BY_REPO }}
Expand All @@ -55,7 +59,7 @@ jobs:
needs:
- pre_commit
if: >
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event.schedule) &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
!contains(github.event.head_commit.message, '[skip build]')
steps:
- uses: actions/checkout@v4
Expand All @@ -72,7 +76,7 @@ jobs:
needs:
- pre_commit
if: >
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event.schedule) &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
github.actor != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip build]')
steps:
Expand Down Expand Up @@ -109,7 +113,7 @@ jobs:
if: >
github.event_name == 'pull_request' &&
!contains(github.event.head_commit.message, '[skip pmd]') &&
!contains(github.event.head_commit.message, '[skip tests]') && github.event_name != 'schedule'
!contains(github.event.head_commit.message, '[skip tests]')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
Expand All @@ -124,7 +128,7 @@ jobs:
if: >
(github.event_name == 'push' || github.actor == 'dependabot[bot]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[skip build]') != github.event.schedule
!contains(github.event.head_commit.message, '[skip build]')
strategy:
fail-fast: false
matrix:
Expand All @@ -151,7 +155,7 @@ jobs:
if: >
(github.event_name == 'push' || github.actor == 'dependabot[bot]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[skip build]') != github.event.schedule
!contains(github.event.head_commit.message, '[skip build]')
strategy:
fail-fast: false
matrix:
Expand All @@ -178,7 +182,7 @@ jobs:
(github.event_name == 'push' || github.actor == 'dependabot[bot]') &&
!contains(github.event.head_commit.message, '[skip build]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[skip e2es]') != github.event.schedule
!contains(github.event.head_commit.message, '[skip e2es]')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -211,7 +215,7 @@ jobs:
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
!contains(github.event.head_commit.message, '[skip build]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[skip e2es]') != github.event.schedule
!contains(github.event.head_commit.message, '[skip e2es]')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -264,7 +268,7 @@ jobs:
github.event_name == 'push' &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
!(failure() || cancelled()) &&
!contains(github.event.head_commit.message, '[skip build]') != github.event.schedule
!contains(github.event.head_commit.message, '[skip build]')
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -296,7 +300,8 @@ jobs:
if: >
!(failure() || cancelled()) &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
github.event_name != 'pull_request' != github.event.schedule &&
github.event_name != 'pull_request' &&
github.event_name != 'schedule' &&
!contains(github.event.head_commit.message, '[skip build]')
steps:
- uses: actions/checkout@v4
Expand All @@ -320,7 +325,7 @@ jobs:
!(failure() || cancelled()) &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
github.event_name != 'pull_request' &&
contains(github.event.head_commit.message, '[release]') != github.event.schedule
contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -366,7 +371,7 @@ jobs:
!(failure() || cancelled()) &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
github.event_name != 'pull_request' &&
contains(github.event.head_commit.message, '[release]') != github.event.schedule
contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -400,7 +405,7 @@ jobs:
!(failure() || cancelled()) &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
github.event_name != 'pull_request' &&
contains(github.event.head_commit.message, '[release]') != github.event.schedule
contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v4
- name: "Configure AWS credentials"
Expand All @@ -414,4 +419,4 @@ jobs:
run: |
if [[ ${{ env.RELEASE_VERSION }} =~ ^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then
aws s3 cp --recursive --acl private --copy-props none "s3://alfresco-artefacts-staging/community/hxinsight-connector/${{ env.RELEASE_VERSION }}/" "s3://eu.dl.alfresco.com/release/community/hxinsight-connector/${{ env.RELEASE_VERSION }}/"
fi
fi

0 comments on commit d7453df

Please sign in to comment.