Skip to content

Bump jackson-databind to 2.21.5 #1801

Bump jackson-databind to 2.21.5

Bump jackson-databind to 2.21.5 #1801

Workflow file for this run

#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: Pull Request Build Orchestrator
on:
pull_request:
branches: [main]
jobs:
set-build-properties:
# Use the version.properties file to source the galasa-version output variable.
# This variable can be referenced by other jobs in this flow using
# ${{ needs.set-build-properties.outputs.galasa-version }}
runs-on: ubuntu-latest
outputs:
galasa-version: ${{ steps.set-build-properties.outputs.GALASA_VERSION }}
steps:
- id: checkout-code
uses: actions/checkout@v4
with:
sparse-checkout: |
build.properties
sparse-checkout-cone-mode: false
- id: set-build-properties
run: |
cat build.properties | grep "=" >> $GITHUB_OUTPUT
detect-secrets:
name: Detect secrets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Turn script into an executable
working-directory: ./tools
run: chmod +x detect-secrets.sh
- name: Run the detect secrets script
working-directory: ./tools
run: ./detect-secrets.sh
# Get modules that were changed as part of this Pull Request,
# set that as an output of this job to be passed to the next job.
get-changed-modules:
name: Get the modules changed in this Pull Request
runs-on: ubuntu-latest
outputs:
platform_changed: ${{ steps.get-changed-modules.outputs.PLATFORM_CHANGED }}
buildutils_changed: ${{ steps.get-changed-modules.outputs.BUILDUTILS_CHANGED }}
wrapping_changed: ${{ steps.get-changed-modules.outputs.WRAPPING_CHANGED }}
gradle_changed: ${{ steps.get-changed-modules.outputs.GRADLE_CHANGED }}
maven_changed: ${{ steps.get-changed-modules.outputs.MAVEN_CHANGED }}
framework_changed: ${{ steps.get-changed-modules.outputs.FRAMEWORK_CHANGED }}
extensions_changed: ${{ steps.get-changed-modules.outputs.EXTENSIONS_CHANGED }}
managers_changed: ${{ steps.get-changed-modules.outputs.MANAGERS_CHANGED }}
obr_changed: ${{ steps.get-changed-modules.outputs.OBR_CHANGED }}
ivts_changed: ${{ steps.get-changed-modules.outputs.IVTS_CHANGED }}
cli_changed: ${{ steps.get-changed-modules.outputs.CLI_CHANGED }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/scripts
- name: Get the modules changed in this Pull Request
id: get-changed-modules
env:
GH_TOKEN: ${{ github.token }}
run: |
./.github/scripts/get-changed-modules-pull-request.sh --github-repo ${{ github.event.pull_request.base.repo.full_name }} --pr-number ${{ github.event.number }}
find-artifacts:
name: Get Workflow Run ID to download artifacts from
runs-on: ubuntu-latest
outputs:
workflow_for_artifact_download_id: ${{ steps.find-artifacts.outputs.workflow_for_artifact_download_id }}
steps:
- name: Get last successful workflow run of the "Main Build Orchestrator" for PR's base ref
id: find-artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "workflow_for_artifact_download_id=$(gh run list \
--repo ${{ github.repository }} \
--workflow 'Main Build Orchestrator' \
--branch ${{ github.base_ref }} \
--status success \
--limit 1 \
--json databaseId | jq '.[0].databaseId')" >> $GITHUB_OUTPUT
pr-build-platform:
name: Build the 'platform' module
needs: [get-changed-modules, find-artifacts]
uses: ./.github/workflows/pr-platform.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.platform_changed }}
pr-build-buildutils:
name: Build the 'buildutils' module
needs: [get-changed-modules, find-artifacts]
uses: ./.github/workflows/pr-buildutils.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.buildutils_changed }}
pr-build-wrapping:
name: Build the 'wrapping' module
needs: [get-changed-modules, find-artifacts, pr-build-platform]
uses: ./.github/workflows/pr-wrapping.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.wrapping_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-gradle:
name: Build the 'gradle' module
needs: [get-changed-modules, find-artifacts, pr-build-platform]
uses: ./.github/workflows/pr-gradle.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.gradle_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-maven:
name: Build the 'maven' module
needs: [get-changed-modules, find-artifacts, pr-build-gradle]
uses: ./.github/workflows/pr-maven.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.maven_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-framework:
name: Build the 'framework' module
needs: [get-changed-modules, find-artifacts, pr-build-buildutils, pr-build-wrapping, pr-build-maven]
uses: ./.github/workflows/pr-framework.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.framework_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-extensions:
name: Build the 'extensions' module
needs: [get-changed-modules, find-artifacts, pr-build-framework]
uses: ./.github/workflows/pr-extensions.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.extensions_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-managers:
name: Build the 'managers' module
needs: [get-changed-modules, find-artifacts, pr-build-framework]
uses: ./.github/workflows/pr-managers.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.managers_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-obr:
name: Build the 'obr' module
needs: [set-build-properties, get-changed-modules, find-artifacts, pr-build-extensions, pr-build-managers]
uses: ./.github/workflows/pr-obr.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.obr_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
galasa-version: "${{ needs.set-build-properties.outputs.galasa-version }}"
# The IVTs are built after the OBR as they require the galasa-bom to get dependencies.
pr-build-ivts:
name: Build the 'ivts' module
needs: [get-changed-modules, find-artifacts, pr-build-obr]
uses: ./.github/workflows/pr-ivts.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.ivts_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
download-artifacts-for-codeql:
name: Download artifacts for Advanced CodeQL Java scan
runs-on: ubuntu-latest
needs: [get-changed-modules, find-artifacts, pr-build-ivts]
steps:
- name: Download Platform from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.platform_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: platform
path: /home/runner/.m2/repository
- name: Download Platform from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.platform_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: platform
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download Wrapping from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.wrapping_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: wrapping
path: /home/runner/.m2/repository
- name: Download Wrapping from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.wrapping_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: wrapping
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download Gradle from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.gradle_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: gradle
path: /home/runner/.m2/repository
- name: Download Gradle from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.gradle_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: gradle
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download Maven from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.maven_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: maven
path: /home/runner/.m2/repository
- name: Download Maven from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.maven_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: maven
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download Framework from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.framework_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: framework
path: /home/runner/.m2/repository
- name: Download Framework from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.framework_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: framework
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download Extensions from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.extensions_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: extensions
path: /home/runner/.m2/repository
- name: Download Extensions from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.extensions_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: extensions
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download Managers from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.managers_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: managers
path: /home/runner/.m2/repository
- name: Download Managers from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.managers_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: managers
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download OBR from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.obr_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: obr
path: /home/runner/.m2/repository
- name: Download OBR from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.obr_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: obr
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Download IVTs from this Workflow Run
continue-on-error: true
if: ${{ needs.get-changed-modules.outputs.ivts_changed == 'true' }}
uses: actions/download-artifact@v4
with:
name: ivts
path: /home/runner/.m2/repository
- name: Download IVTs from last Main Workflow Run
if: ${{ needs.get-changed-modules.outputs.ivts_changed == 'false' }}
uses: actions/download-artifact@v4
with:
name: ivts
path: /home/runner/.m2/repository
github-token: ${{ github.token }}
run-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
- name: Upload All Artifacts
uses: actions/upload-artifact@v4
with:
name: all-artifacts
path: /home/runner/.m2/repository/dev/galasa
codeql-java:
name: CodeQL scans the Java code
if: ${{
needs.get-changed-modules.outputs.platform_changed == 'true' ||
needs.get-changed-modules.outputs.wrapping_changed == 'true' ||
needs.get-changed-modules.outputs.gradle_changed == 'true' ||
needs.get-changed-modules.outputs.maven_changed == 'true' ||
needs.get-changed-modules.outputs.framework_changed == 'true' ||
needs.get-changed-modules.outputs.extensions_changed == 'true' ||
needs.get-changed-modules.outputs.managers_changed == 'true' ||
needs.get-changed-modules.outputs.obr_changed == 'true' ||
needs.get-changed-modules.outputs.ivts_changed == 'true'
}}
needs: [get-changed-modules, download-artifacts-for-codeql]
uses: ./.github/workflows/codeql-java.yml
secrets: inherit
permissions:
security-events: write
packages: read
actions: read
contents: read
codeql-go:
name: CodeQL scans the Golang code
if: ${{
needs.get-changed-modules.outputs.buildutils_changed == 'true' ||
needs.get-changed-modules.outputs.cli_changed == 'true'
}}
needs: [get-changed-modules, download-artifacts-for-codeql]
uses: ./.github/workflows/codeql-go.yml
secrets: inherit
permissions:
security-events: write
packages: read
actions: read
contents: read
pr-build-cli:
name: Build the 'cli' module
needs: [get-changed-modules, find-artifacts, pr-build-obr]
uses: ./.github/workflows/pr-cli.yaml
secrets: inherit
with:
changed: ${{ needs.get-changed-modules.outputs.cli_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-test-creds-store:
name: Test credentials store implementations
needs: [find-artifacts, download-artifacts-for-codeql, pr-build-cli]
uses: ./.github/workflows/test-creds-store.yaml
secrets: inherit
with:
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
pr-build-docs:
name: Build the 'docs' module
needs: [get-changed-modules, find-artifacts, pr-build-cli, pr-test-creds-store]
uses: ./.github/workflows/pr-docs.yaml
secrets: inherit
with:
docs-changed: ${{ needs.get-changed-modules.outputs.docs_changed }}
artifact-id: ${{ needs.find-artifacts.outputs.workflow_for_artifact_download_id }}
# This is required as all previous jobs are optional based on if a module has changed.
# This job is set in the branch protection rules as required to merge a Pull Request.
end-pull-request-build:
name: Pull Request build was successful
needs: [pr-build-ivts, pr-test-creds-store, pr-build-docs, detect-secrets]
runs-on: ubuntu-latest
steps:
- name: End of Pull Request build
run: |
echo "Pull Request build was successful"
# This job is set in the branch protection rules as required to merge a Pull Request.
end-codeql-scanning:
name: CodeQL scanning was successful
needs: [codeql-java, codeql-go]
runs-on: ubuntu-latest
steps:
- name: End of CodeQL scanning
run: |
echo "CodeQL scanning was successful"