Skip to content

Commit

Permalink
Merge branch 'master' into improvement/AAE-25854-docker-build-with-pu…
Browse files Browse the repository at this point in the history
…ll-push-tokens
  • Loading branch information
wojciech-piotrowiak authored Nov 11, 2024
2 parents e1ed4a8 + a0837df commit c42da83
Show file tree
Hide file tree
Showing 25 changed files with 91 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/actions/calculate-next-internal-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/dbp-charts/publish-chart/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/dbp-charts/verify-helm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions .github/actions/docker-build-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/actions/enforce-pr-conventions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-build-info/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/github-check-upcoming-runs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/github-deployment-create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/helm-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/helm-publish-chart/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/helm-release-and-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ 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 }}
repository-directory: ${{ inputs.chart-repository-dir }}

- 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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/helm-update-chart-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 23 additions & 4 deletions .github/actions/maven-build-and-tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -245,18 +263,19 @@ 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
path: |
**/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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/maven-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/reportportal-prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/send-slack-notification/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-helm-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-jx-release-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-terraform-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/update-pom-to-next-pre-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
Loading

0 comments on commit c42da83

Please sign in to comment.