Skip to content
Merged
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
35 changes: 21 additions & 14 deletions .github/workflows/reusable-on-code-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ on:
type: string
default: ".github/maven.settings.xml"
module_branch:
required: true
type: string
default: ""
description: "Ref to check out and test. Defaults to the ref that triggered the caller."
update_signature_execute:
type: boolean
default: false
Expand All @@ -19,7 +20,8 @@ on:
default: "ubuntu-latest"
static_analysis_auditci_level:
type: string
default: "moderate"
default: "critical"
Comment thread
delallioui marked this conversation as resolved.
description: "Severity at which audit-ci fails. A module that gates lower than critical must keep declaring it, on every branch that runs this workflow."
static_analysis_node_version:
type: number
default: 18
Expand All @@ -32,7 +34,8 @@ on:
default: "ghcr.io/jahia/jahia-docker-mvn-cache:11-jdk-noble-mvn-loaded"
sonar_analysis_primary_release_branch:
type: string
default: "main"
default: ""
description: "Branch the analysis compares against. Defaults to the base branch of the pull request, then to the repository default branch."
sonar_analysis_instance_type:
type: string
default: "ubuntu-latest"
Expand All @@ -45,6 +48,7 @@ on:
integration_tests_standalone_execute:
type: boolean
default: false
description: "Forces the standalone run. It also runs on its own when a provisioning manifest is given and no cluster run is requested, so setting this to false does not turn the tests off — remove integration_tests_provisioning_manifest for that."
integration_tests_cluster_execute:
type: boolean
default: false
Expand All @@ -60,12 +64,15 @@ on:
integration_tests_should_use_build_artifacts:
type: boolean
default: false
description: "DEPRECATED and ignored — build artifacts are downloaded whenever they are available."
integration_tests_artifact_prefix:
type: string
default: "tests"
default: ""
description: "Prefix of the test artifacts, after the run type. Defaults to module_id."
integration_tests_jahia_image:
type: string
default: ""
default: "ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT"
description: "Jahia image the tests run against. This value is passed down, so it also overrides whatever the module's own docker-compose.yml falls back to."
integration_tests_pagerduty_incident_service:
type: string
default: ""
Expand All @@ -86,10 +93,12 @@ on:
default: ""
integration_tests_should_skip_testrail:
type: boolean
default: false
default: true
Comment thread
delallioui marked this conversation as resolved.
description: "Skips publishing to TestRail, which is what a pull-request run wants. Set to false to publish."
integration_tests_should_skip_pagerduty:
type: boolean
default: false
description: "DEPRECATED and ignored — never forwarded to the test run. Use integration_tests_pagerduty_skip_notification."
sbom_execute:
type: boolean
default: false
Expand Down Expand Up @@ -169,14 +178,14 @@ jobs:
ref: ${{ inputs.module_branch }}
- uses: jahia/jahia-modules-action/sonar-analysis@v2
with:
primary_release_branch: ${{ inputs.sonar_analysis_primary_release_branch }}
primary_release_branch: ${{ inputs.sonar_analysis_primary_release_branch || github.event.pull_request.base.ref || github.event.repository.default_branch || 'main' }}
github_pr_id: ${{github.event.number}}
sonar_url: ${{ secrets.SONAR_URL }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
mvn_settings_filepath: ${{ inputs.mvn_settings_filepath }}

integration-tests-standalone:
if: ${{ inputs.integration_tests_standalone_execute }}
if: ${{ inputs.integration_tests_standalone_execute || (inputs.integration_tests_provisioning_manifest != '' && !inputs.integration_tests_cluster_execute) }}
Comment thread
delallioui marked this conversation as resolved.
needs: build
secrets: inherit
uses: Jahia/jahia-modules-action/.github/workflows/reusable-integration-tests.yml@v2
Expand All @@ -187,9 +196,8 @@ jobs:
jahia_image: ${{ inputs.integration_tests_jahia_image }}
pagerduty_skip_notification: ${{ inputs.integration_tests_pagerduty_skip_notification }}
provisioning_manifest: ${{ inputs.integration_tests_provisioning_manifest }}
should_use_build_artifacts: ${{ inputs.integration_tests_should_use_build_artifacts }}
artifact_prefix: standalone-${{ inputs.integration_tests_artifact_prefix }}
module_branch: ${{ inputs.module_branch }}
artifact_prefix: standalone-${{ inputs.integration_tests_artifact_prefix || inputs.module_id }}
module_branch: ${{ inputs.module_branch || github.ref }}
timeout_job: ${{ inputs.integration_tests_timeout }}
timeout_step: ${{ inputs.integration_tests_timeout_step }}
tests_profile: ${{ inputs.integration_tests_profile }}
Expand All @@ -211,9 +219,8 @@ jobs:
jahia_image: ${{ inputs.integration_tests_jahia_image }}
pagerduty_skip_notification: ${{ inputs.integration_tests_pagerduty_skip_notification }}
provisioning_manifest: ${{ inputs.integration_tests_provisioning_manifest }}
should_use_build_artifacts: ${{ inputs.integration_tests_should_use_build_artifacts }}
artifact_prefix: cluster-${{ inputs.integration_tests_artifact_prefix }}
module_branch: ${{ inputs.module_branch }}
artifact_prefix: cluster-${{ inputs.integration_tests_artifact_prefix || inputs.module_id }}
module_branch: ${{ inputs.module_branch || github.ref }}
timeout_job: ${{ inputs.integration_tests_timeout }}
timeout_step: ${{ inputs.integration_tests_timeout_step }}
tests_profile: ${{ inputs.integration_tests_profile }}
Expand Down