diff --git a/.github/actions/calculate-next-internal-version/action.yml b/.github/actions/calculate-next-internal-version/action.yml index f77ce6680..1cce08cb7 100644 --- a/.github/actions/calculate-next-internal-version/action.yml +++ b/.github/actions/calculate-next-internal-version/action.yml @@ -20,7 +20,7 @@ runs: using: "composite" steps: - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-pysemver@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-pysemver@v8.4.0 - id: next-prerelease-resolver run: ${{ github.action_path }}/next-prerelease.sh shell: bash diff --git a/.github/actions/dbp-charts/publish-chart/action.yml b/.github/actions/dbp-charts/publish-chart/action.yml index 40e867e09..df119cc0e 100644 --- a/.github/actions/dbp-charts/publish-chart/action.yml +++ b/.github/actions/dbp-charts/publish-chart/action.yml @@ -26,7 +26,7 @@ runs: with: fetch-depth: 0 - name: Get branch name - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: Publish run: ${{ github.action_path }}/publish_chart.sh shell: bash diff --git a/.github/actions/dbp-charts/verify-helm/action.yml b/.github/actions/dbp-charts/verify-helm/action.yml index 854d8489e..93185c327 100644 --- a/.github/actions/dbp-charts/verify-helm/action.yml +++ b/.github/actions/dbp-charts/verify-helm/action.yml @@ -85,14 +85,14 @@ runs: password: ${{ inputs.docker_password }} - name: Get branch name uses: >- - Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: Get commit msg uses: >- - Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v8.3.0 + Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v8.4.0 - name: Get a namespace to deploy on id: k8sns uses: >- - Alfresco/alfresco-build-tools/.github/actions/dbp-charts/kubernetes-valid-ns@v8.3.0 + Alfresco/alfresco-build-tools/.github/actions/dbp-charts/kubernetes-valid-ns@v8.4.0 with: branch_name: ${{ env.BRANCH_NAME }} release_prefix: ${{ inputs.release_prefix }} @@ -111,7 +111,7 @@ runs: - name: Upload helm deployments logs as artifacts if: always() uses: >- - Alfresco/alfresco-build-tools/.github/actions/kubectl-keep-nslogs@v8.3.0 + Alfresco/alfresco-build-tools/.github/actions/kubectl-keep-nslogs@v8.4.0 with: namespace: ${{ steps.k8sns.outputs.namespace }} - name: Uninstall Helm releases diff --git a/.github/actions/docker-build-image/action.yml b/.github/actions/docker-build-image/action.yml index 78f23202c..46310a759 100644 --- a/.github/actions/docker-build-image/action.yml +++ b/.github/actions/docker-build-image/action.yml @@ -53,6 +53,10 @@ inputs: description: The label name for creating a preview version required: false default: 'preview' +outputs: + ecr-docker-image-url: + description: The ECR docker image URL + value: ${{ steps.set-ecr-docker-image-url.outputs.ecr-docker-image-url }} runs: using: composite @@ -230,3 +234,9 @@ runs: echo "${{ steps.login-ecr.outputs.registry }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" echo "\`\`\`\`" } >> $GITHUB_STEP_SUMMARY + + - name: set ecr-docker-image-url + id: set-ecr-docker-image-url + if: env.PUSH_IMAGE == 'true' + shell: bash + run: echo "ecr-docker-image-url=${{ steps.login-ecr.outputs.registry }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}" >> $GITHUB_OUTPUT diff --git a/.github/actions/enforce-pr-conventions/action.yml b/.github/actions/enforce-pr-conventions/action.yml index e8b7ebac0..7e07af8d8 100644 --- a/.github/actions/enforce-pr-conventions/action.yml +++ b/.github/actions/enforce-pr-conventions/action.yml @@ -20,7 +20,7 @@ runs: using: composite steps: - name: Get branch name - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: Check is Dependabot PR or Propagation PR id: check diff --git a/.github/actions/get-build-info/action.yml b/.github/actions/get-build-info/action.yml index 010cee787..8aa3d02db 100644 --- a/.github/actions/get-build-info/action.yml +++ b/.github/actions/get-build-info/action.yml @@ -3,7 +3,7 @@ description: "Get build-related info from GitHub and load it as generically name runs: using: composite steps: - - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: "Get build info" run: | [[ $GITHUB_EVENT_NAME == "pull_request" ]] && IS_PULL_REQUEST="true" || IS_PULL_REQUEST="false" diff --git a/.github/actions/github-check-upcoming-runs/action.yml b/.github/actions/github-check-upcoming-runs/action.yml index 2fad77696..918dfcf7a 100644 --- a/.github/actions/github-check-upcoming-runs/action.yml +++ b/.github/actions/github-check-upcoming-runs/action.yml @@ -20,7 +20,7 @@ runs: using: "composite" steps: - name: Get branch name - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: Check upcoming runs id: check diff --git a/.github/actions/github-deployment-create/action.yml b/.github/actions/github-deployment-create/action.yml index e9b1a0069..696672578 100644 --- a/.github/actions/github-deployment-create/action.yml +++ b/.github/actions/github-deployment-create/action.yml @@ -40,7 +40,7 @@ runs: - name: Update Deployment State if: ${{ inputs.state != '' }} - uses: Alfresco/alfresco-build-tools/.github/actions/github-deployment-status-update@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/github-deployment-status-update@v8.4.0 with: github-token: ${{ inputs.github-token }} deployment-id: ${{ steps.create.outputs.id }} diff --git a/.github/actions/helm-integration-tests/action.yml b/.github/actions/helm-integration-tests/action.yml index 32131ceea..4c16dcb6b 100644 --- a/.github/actions/helm-integration-tests/action.yml +++ b/.github/actions/helm-integration-tests/action.yml @@ -37,7 +37,7 @@ runs: using: composite steps: - name: Setup rancher - uses: Alfresco/alfresco-build-tools/.github/actions/setup-rancher-cli@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/setup-rancher-cli@v8.4.0 with: url: ${{ inputs.test-rancher-url }} access-key: ${{ inputs.test-rancher-access-key }} diff --git a/.github/actions/helm-publish-chart/action.yml b/.github/actions/helm-publish-chart/action.yml index 939db6061..8b11eab7f 100644 --- a/.github/actions/helm-publish-chart/action.yml +++ b/.github/actions/helm-publish-chart/action.yml @@ -110,7 +110,7 @@ runs: fi - name: Commit changes - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.4.0 with: username: ${{ inputs.git-username }} add-options: . diff --git a/.github/actions/helm-release-and-publish/action.yml b/.github/actions/helm-release-and-publish/action.yml index 599244a45..0fe6edbb1 100644 --- a/.github/actions/helm-release-and-publish/action.yml +++ b/.github/actions/helm-release-and-publish/action.yml @@ -47,7 +47,7 @@ runs: run: | echo "VERSION=$VERSION" >> $GITHUB_ENV - - uses: Alfresco/alfresco-build-tools/.github/actions/git-check-existing-tag@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/git-check-existing-tag@v8.4.0 id: check-tag with: tag: ${{ env.VERSION }} @@ -55,14 +55,14 @@ runs: - name: Update chart version if: steps.check-tag.outputs.exists == 'false' - uses: Alfresco/alfresco-build-tools/.github/actions/helm-update-chart-version@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/helm-update-chart-version@v8.4.0 with: new-version: ${{ env.VERSION }} chart-repository-dir: ${{ inputs.chart-repository-dir }} chart-dir: ${{ inputs.chart-dir }} helm-docs-version: ${{ inputs.helm-docs-version }} - - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.4.0 if: steps.check-tag.outputs.exists == 'false' with: username: ${{ inputs.git-username }} @@ -79,7 +79,7 @@ runs: - name: Package Helm Chart if: steps.check-tag.outputs.exists == 'false' id: package-helm-chart - uses: Alfresco/alfresco-build-tools/.github/actions/helm-package-chart@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/helm-package-chart@v8.4.0 with: chart-dir: ${{ inputs.chart-dir }} chart-repository-dir: ${{ inputs.chart-repository-dir }} @@ -92,7 +92,7 @@ runs: - name: Publish Helm chart if: steps.check-tag.outputs.exists == 'false' - uses: Alfresco/alfresco-build-tools/.github/actions/helm-publish-chart@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/helm-publish-chart@v8.4.0 with: helm-charts-repo: ${{inputs.helm-repository}} helm-charts-repo-branch: ${{ inputs.helm-repository-branch }} diff --git a/.github/actions/helm-update-chart-version/action.yml b/.github/actions/helm-update-chart-version/action.yml index a6f4aeb35..c6387772b 100644 --- a/.github/actions/helm-update-chart-version/action.yml +++ b/.github/actions/helm-update-chart-version/action.yml @@ -16,7 +16,7 @@ inputs: runs: using: composite steps: - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-helm-docs@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-helm-docs@v8.4.0 with: version: ${{ inputs.helm-docs-version }} - name: Update version diff --git a/.github/actions/maven-build-and-tag/action.yml b/.github/actions/maven-build-and-tag/action.yml index 1feaeda11..e121248c0 100644 --- a/.github/actions/maven-build-and-tag/action.yml +++ b/.github/actions/maven-build-and-tag/action.yml @@ -82,11 +82,18 @@ inputs: description: Whether testcontainers should be reused required: false default: 'false' + skip-tests-label: + description: The label name for skipping tests + required: false + default: 'skip-tests' outputs: version: description: "The version of the new tag created by this workflow" value: ${{ steps.update-pom-to-next-version.outputs.next-prerelease }} + skip-tests: + description: "Whether tests were skipped during build or not" + value: ${{ steps.set-skip-tests-env-variable.outputs.skip-tests }} runs: using: composite @@ -112,13 +119,24 @@ runs: with: maven-version: ${{ inputs.maven-version }} + - name: Set skip tests env variable + id: set-skip-tests-env-variable + env: + SKIP_TESTS: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, inputs.skip-tests-label) }} + shell: bash + run: | + echo "SKIP_TESTS=$SKIP_TESTS" >> $GITHUB_ENV + echo "skip-tests=$SKIP_TESTS" >> $GITHUB_OUTPUT + - name: Compute maven options id: compute-maven-options shell: bash run: | NTP='--no-transfer-progress' ${{ inputs.verbose }} && NTP='' - echo "result=--show-version --settings settings.xml $NTP" >> $GITHUB_OUTPUT + TEST_OPTIONS='' + [[ $SKIP_TESTS == 'true' ]] && TEST_OPTIONS='-DskipTests=true -DskipITs=true' + echo "result=--show-version --settings settings.xml $NTP $TEST_OPTIONS" >> $GITHUB_OUTPUT - name: Set is_preview env variable id: set-is-preview-env-variable @@ -160,7 +178,7 @@ runs: - name: Update pom files to the new version id: update-pom-to-next-version if: github.event_name == 'push' || env.IS_PREVIEW == 'true' - uses: Alfresco/alfresco-build-tools/.github/actions/update-pom-to-next-pre-release@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/update-pom-to-next-pre-release@v8.4.0 with: property-to-update: ${{ inputs.property-to-update }} maven-cli-opts: ${{ steps.compute-maven-options.outputs.result }} @@ -245,7 +263,7 @@ runs: ${{ inputs.upload-jars-path }} - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - if: inputs.upload-coverage == 'true' + if: inputs.upload-coverage == 'true' && env.SKIP_TESTS != 'true' with: name: coverage retention-days: 1 @@ -253,10 +271,11 @@ runs: **/target/site/jacoco-aggregate/jacoco.xml - name: Echo Longest Tests run + if: env.SKIP_TESTS != 'true' shell: bash run: find . -name TEST-*.xml -exec grep -h testcase {} \; | awk -F '"' '{printf("%s#%s() - %.3fms\n", $4, $2, $6); }' | sort -n -k 3 | tail -20 - - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.4.0 if: github.event_name == 'push' with: username: ${{ inputs.git-username }} diff --git a/.github/actions/maven-release/action.yml b/.github/actions/maven-release/action.yml index 6b65462a2..6f66fbc49 100644 --- a/.github/actions/maven-release/action.yml +++ b/.github/actions/maven-release/action.yml @@ -75,7 +75,7 @@ runs: path: '${{ env.REPO_DIR }}' token: ${{ inputs.github-token }} - - uses: Alfresco/alfresco-build-tools/.github/actions/git-check-existing-tag@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/git-check-existing-tag@v8.4.0 id: check-tag with: tag: ${{ env.RELEASE_VERSION }} @@ -147,7 +147,7 @@ runs: - name: Commit changes if: steps.check-tag.outputs.exists == 'false' - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.4.0 with: username: ${{ inputs.git-username }} add-options: -u diff --git a/.github/actions/reportportal-prepare/action.yml b/.github/actions/reportportal-prepare/action.yml index 5ad30cbe4..931d8b625 100644 --- a/.github/actions/reportportal-prepare/action.yml +++ b/.github/actions/reportportal-prepare/action.yml @@ -46,7 +46,7 @@ runs: using: composite steps: - name: Get branch name - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: Compute Report Portal input info id: info diff --git a/.github/actions/send-slack-notification-slow-job/action.yml b/.github/actions/send-slack-notification-slow-job/action.yml index 20c5b4e4a..ee4cd6df4 100644 --- a/.github/actions/send-slack-notification-slow-job/action.yml +++ b/.github/actions/send-slack-notification-slow-job/action.yml @@ -25,7 +25,7 @@ runs: - name: Slack Notification if: fromJSON(steps.fetch_time.outputs.total_time) > fromJSON(inputs.max-build-time-seconds) - uses: Alfresco/alfresco-build-tools/.github/actions/send-slack-notification@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/send-slack-notification@v8.4.0 with: channel-id: ${{ inputs.slack-channel }} message: 'Max build time exceeded: took ${{ steps.fetch_time.outputs.total_time }} seconds (expected max: ${{ inputs.max-build-time-seconds }} seconds)' diff --git a/.github/actions/send-slack-notification/action.yml b/.github/actions/send-slack-notification/action.yml index 5bbb0d663..2a65412b2 100644 --- a/.github/actions/send-slack-notification/action.yml +++ b/.github/actions/send-slack-notification/action.yml @@ -109,7 +109,7 @@ runs: echo "result=$RESULT" >> $GITHUB_OUTPUT - name: Get branch name - uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.4.0 - name: Send slack notification id: slack diff --git a/.github/actions/setup-helm-docs/action.yml b/.github/actions/setup-helm-docs/action.yml index b40fe6c47..5bdc9fa11 100644 --- a/.github/actions/setup-helm-docs/action.yml +++ b/.github/actions/setup-helm-docs/action.yml @@ -11,7 +11,7 @@ outputs: runs: using: "composite" steps: - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.4.0 with: repo: norwoodj/helm-docs version: ${{ inputs.version != '' && inputs.version || env.DEFAULT_HELM_DOCS_VERSION }} diff --git a/.github/actions/setup-jx-release-version/action.yml b/.github/actions/setup-jx-release-version/action.yml index 6bc28d93c..10a0d918b 100644 --- a/.github/actions/setup-jx-release-version/action.yml +++ b/.github/actions/setup-jx-release-version/action.yml @@ -8,7 +8,7 @@ inputs: runs: using: "composite" steps: - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.4.0 with: repo: jenkins-x-plugins/jx-release-version version: ${{ inputs.version }} diff --git a/.github/actions/setup-terraform-docs/action.yml b/.github/actions/setup-terraform-docs/action.yml index 1ff3f28a7..46f9b9457 100644 --- a/.github/actions/setup-terraform-docs/action.yml +++ b/.github/actions/setup-terraform-docs/action.yml @@ -8,7 +8,7 @@ inputs: runs: using: "composite" steps: - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.4.0 with: repo: terraform-docs/terraform-docs version: ${{ inputs.version }} diff --git a/.github/actions/update-pom-to-next-pre-release/action.yml b/.github/actions/update-pom-to-next-pre-release/action.yml index 37576f865..ae22e24fa 100644 --- a/.github/actions/update-pom-to-next-pre-release/action.yml +++ b/.github/actions/update-pom-to-next-pre-release/action.yml @@ -33,7 +33,7 @@ runs: - id: next-prerelease-resolver name: Calculate next internal release if: inputs.version == '' - uses: Alfresco/alfresco-build-tools/.github/actions/calculate-next-internal-version@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/calculate-next-internal-version@v8.4.0 with: next-version: ${{ steps.parse-next-final-version.outputs.result }} prerelease-type: ${{ inputs.prerelease-type }} @@ -50,7 +50,7 @@ runs: fi - name: Update pom files to the new version - uses: Alfresco/alfresco-build-tools/.github/actions/maven-update-pom-version@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/maven-update-pom-version@v8.4.0 with: version: ${{ steps.resolve-version.outputs.version }} maven-cli-opts: ${{ inputs.maven-cli-opts }} diff --git a/.github/workflows/build-and-release-maven.yml b/.github/workflows/build-and-release-maven.yml index 6d4914ad9..1db2c3d37 100644 --- a/.github/workflows/build-and-release-maven.yml +++ b/.github/workflows/build-and-release-maven.yml @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.4.0 with: java-version: ${{ inputs.java-version }} java-distribution: ${{ inputs.java-distribution }} @@ -107,11 +107,11 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.4.0 with: java-version: ${{ inputs.java-version }} java-distribution: ${{ inputs.java-distribution }} - - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.4.0 with: username: ${{ secrets.BOT_GITHUB_USERNAME }} email: ${{ secrets.BOT_GITHUB_EMAIL }} diff --git a/.github/workflows/helm-publish-new-package-version.yml b/.github/workflows/helm-publish-new-package-version.yml index d1830ce4f..369ba877e 100644 --- a/.github/workflows/helm-publish-new-package-version.yml +++ b/.github/workflows/helm-publish-new-package-version.yml @@ -46,7 +46,7 @@ jobs: - id: next-release name: Calculate next internal release - uses: Alfresco/alfresco-build-tools/.github/actions/calculate-next-internal-version@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/calculate-next-internal-version@v8.4.0 with: next-version: ${{ inputs.next-version }} @@ -57,13 +57,13 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Update chart version - uses: Alfresco/alfresco-build-tools/.github/actions/helm-update-chart-version@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/helm-update-chart-version@v8.4.0 with: new-version: ${{env.VERSION}} chart-dir: ${{ inputs.chart-dir }} helm-docs-version: ${{ inputs.helm-docs-version }} - - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.4.0 with: username: ${{ secrets.BOT_GITHUB_USERNAME }} add-options: -u @@ -74,7 +74,7 @@ jobs: - name: Package Helm Chart id: package-helm-chart - uses: Alfresco/alfresco-build-tools/.github/actions/helm-package-chart@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/helm-package-chart@v8.4.0 with: chart-dir: ${{ inputs.chart-dir }} @@ -82,7 +82,7 @@ jobs: run: git push origin $VERSION - name: Publish Helm chart - uses: Alfresco/alfresco-build-tools/.github/actions/helm-publish-chart@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/helm-publish-chart@v8.4.0 with: helm-charts-repo: ${{ inputs.helm-charts-repo }} helm-charts-repo-branch: ${{ inputs.helm-charts-repo-branch }} diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index fc80bd8b8..73f528f9f 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -94,7 +94,7 @@ jobs: role-session-name: TerraformWorkflow - name: Load environment variables from yml - uses: Alfresco/alfresco-build-tools/.github/actions/env-load-from-yaml@v8.3.0 + uses: Alfresco/alfresco-build-tools/.github/actions/env-load-from-yaml@v8.4.0 with: yml_path: ${{ inputs.terraform_root_path }}/tfenv.yml diff --git a/docs/README.md b/docs/README.md index 58378748e..388b8a20a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1046,6 +1046,7 @@ Check out, builds a maven project and docker images, generating a new alpha vers ```yaml outputs: version: ${{ steps.build-and-tag.outputs.version }} + skip-tests: ${{ steps.build-and-tag.outputs.skip-tests }} steps: - uses: Alfresco/alfresco-build-tools/.github/actions/maven-build-and-tag@ref id: build-and-tag @@ -1065,6 +1066,26 @@ There is a possibility to publish snapshot maven artifacts and docker images fro In order to use it specify `preview-label` input (or use default `preview`). Create a PR with the `preview-label` label. The created maven artifacts and docker images will be tagged as `0.0.1-$GITHUB_PR_NUMBER-SNAPSHOT`. +#### Option to skip tests for maven-build-and-tag + +There is a possibility to skip Unit and Integration Tests during build for an open PR. +In order to use it specify `skip-tests-label` input (or use default `skip-tests`). Create a PR with the `skip-tests` label. +A PR should not be merged if tests are skpped. + +Sample usage to prevent merging when tests are skipped: + +```yaml + - name: Set status check + shell: bash + run: | + if [[ ${{ steps.build-and-tag.outputs.skip-tests }} == 'true' ]]; then + echo "This pull request cannot be merged." + exit 1 + else + echo "This pull request can be merged." + fi +``` + ### maven-deploy-file Upload one or more files to a maven server, without requiring the presence of a