Skip to content

Commit

Permalink
Merge branch 'master' into feature/AAE-26244-ecr-image-url-as-output-…
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
wojciech-piotrowiak authored Nov 8, 2024
2 parents 22b2478 + d02b5ce commit ca5da65
Show file tree
Hide file tree
Showing 47 changed files with 385 additions and 185 deletions.
4 changes: 2 additions & 2 deletions .github/actions/calculate-next-internal-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ outputs:
runs:
using: "composite"
steps:
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-pysemver@v7.1.0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-pysemver@v8.3.0
- id: next-prerelease-resolver
run: ${{ github.action_path }}/next-prerelease.sh
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/dbp-charts/publish-chart/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Get branch name
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0
- name: Publish
run: ${{ github.action_path }}/publish_chart.sh
shell: bash
Expand Down
14 changes: 10 additions & 4 deletions .github/actions/dbp-charts/verify-compose/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ inputs:
description: "run docker-compose pull before tests"
required: false
default: "true"
postman_path:
description: "path to postman collection"
required: false
default: "test/postman/docker-compose"
postman_json:
description: "postman collection json file"
required: false
default: "acs-test-docker-compose-collection.json"
docker_username:
description: "username for Docker Hub"
required: false
Expand All @@ -25,10 +33,6 @@ inputs:
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- if: ${{ inputs.quay_username != '' && inputs.quay_password != '' }}
name: Login to Quay.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand All @@ -48,3 +52,5 @@ runs:
env:
COMPOSE_FILE_PATH: ${{ inputs.compose_file_path }}
COMPOSE_PULL: ${{ inputs.compose_pull }}
POSTMAN_PATH: ${{ inputs.postman_path }}
POSTMAN_JSON: ${{ inputs.postman_json }}
79 changes: 5 additions & 74 deletions .github/actions/dbp-charts/verify-compose/docker_compose.sh
Original file line number Diff line number Diff line change
@@ -1,84 +1,15 @@
#!/bin/bash -e

COMPOSE_FILE=$(basename $COMPOSE_FILE_PATH)
COMPOSE_PATH=$(dirname $COMPOSE_FILE_PATH)
COMPOSE_BIN="docker compose"
alf_port=8080

cd "$COMPOSE_PATH" || {
echo "Error: docker compose dir not found"
exit 1
}
docker info
$COMPOSE_BIN version
$COMPOSE_BIN -f "${COMPOSE_FILE}" config
echo "Starting Alfresco in docker compose"
$COMPOSE_BIN ps
$COMPOSE_BIN -f "${COMPOSE_FILE_PATH}" ps
if [ "$COMPOSE_PULL" = "true" ]; then
$COMPOSE_BIN -f "${COMPOSE_FILE}" pull --quiet
$COMPOSE_BIN -f "${COMPOSE_FILE_PATH}" pull --quiet
fi
export COMPOSE_HTTP_TIMEOUT=120
$COMPOSE_BIN -f "${COMPOSE_FILE}" up -d --quiet-pull
$COMPOSE_BIN -f "${COMPOSE_FILE_PATH}" up -d --quiet-pull --wait

WAIT_INTERVAL=1
COUNTER=0
TIMEOUT=300
t0=$(date +%s)
echo "Waiting for alfresco to start"
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/ || true)
until [[ "200" -eq "${response}" ]] || [[ "${COUNTER}" -eq "${TIMEOUT}" ]]; do
printf '.'
sleep "${WAIT_INTERVAL}"
COUNTER=$((COUNTER + WAIT_INTERVAL))
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/ || true)
done
if (("${COUNTER}" < "${TIMEOUT}")); then
t1=$(date +%s)
delta=$(((t1 - t0) / 60))
echo "Alfresco Started in ${delta} minutes"
else
echo "Waited ${COUNTER} seconds"
echo "Alfresco could not start in time."
echo "The last response code from /alfresco/ was ${response}"
exit 1
fi

COUNTER=0
echo "Waiting for share to start"
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:8080/share/page || true)
until [[ "200" -eq "${response}" ]] || [[ "${COUNTER}" -eq "${TIMEOUT}" ]]; do
printf '.'
sleep "${WAIT_INTERVAL}"
COUNTER=$((COUNTER + WAIT_INTERVAL))
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:8080/share/page || true)
done
if (("${COUNTER}" < "${TIMEOUT}")); then
t1=$(date +%s)
delta=$(((t1 - t0) / 60))
echo "Share Started in ${delta} minutes"
else
echo "Waited ${COUNTER} seconds"
echo "Share could not start in time."
echo "The last response code from /share/ was ${response}"
exit 1
fi
echo "All services are up and running... starting postman tests"

COUNTER=0
TIMEOUT=20
echo "Waiting more time for SOLR"
response=$(curl --write-out '%{http_code}' --user admin:admin --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/s/api/solrstats || true)
until [[ "200" -eq "${response}" ]] || [[ "${COUNTER}" -eq "${TIMEOUT}" ]]; do
printf '.'
sleep "${WAIT_INTERVAL}"
COUNTER=$((COUNTER + WAIT_INTERVAL))
response=$(curl --write-out '%{http_code}' --user admin:admin --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/s/api/solrstats || true)
done

cd ..
docker run -a STDOUT --volume "${PWD}"/test/postman/docker-compose:/etc/newman --network host postman/newman:5.3 run "acs-test-docker-compose-collection.json" --global-var "protocol=http" --global-var "url=localhost:8080"
retVal=$?
if [ "${retVal}" -ne 0 ]; then
# show logs
$COMPOSE_BIN logs --no-color
exit 1
fi
docker run -a STDOUT --volume "$(realpath "${POSTMAN_PATH}"):/etc/newman" --network host postman/newman:5.3 run "${POSTMAN_JSON}" --global-var "protocol=http" --global-var "url=localhost:8080"
10 changes: 5 additions & 5 deletions .github/actions/dbp-charts/verify-helm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ runs:
steps:
- name: Checkout
if: inputs.skip_checkout == 'false'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand All @@ -85,14 +85,14 @@ runs:
password: ${{ inputs.docker_password }}
- name: Get branch name
uses: >-
Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v7.1.0
Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.0
- name: Get commit msg
uses: >-
Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v7.1.0
Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v8.3.0
- name: Get a namespace to deploy on
id: k8sns
uses: >-
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/kubernetes-valid-ns@v7.1.0
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/kubernetes-valid-ns@v8.3.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@v7.1.0
Alfresco/alfresco-build-tools/.github/actions/kubectl-keep-nslogs@v8.3.0
with:
namespace: ${{ steps.k8sns.outputs.namespace }}
- name: Uninstall Helm releases
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/docker-build-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ runs:
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
version: v0.11.0
# apply fix from https://github.com/moby/buildkit/issues/3969
Expand All @@ -121,7 +121,7 @@ runs:

- name: Build image ${{ env.IMAGE_NAME }} and export to docker
if: inputs.grype-scan-enabled == 'true'
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: ${{ inputs.base-directory }}/${{ inputs.image-dir }}
tags: test-${{ env.IMAGE_NAME }}
Expand All @@ -130,7 +130,7 @@ runs:

- name: Anchore Scan API Image
if: inputs.grype-scan-enabled == 'true'
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
uses: anchore/scan-action@f2ba85e044c8f5e5014c9a539328a9c78d3bfa49 # v5.2.1
id: scan
with:
fail-build: ${{ inputs.grype-fail-build }}
Expand All @@ -145,7 +145,7 @@ runs:

- name: Upload SARIF Files
if: always() && inputs.grype-scan-enabled == 'true' && github.event_name == 'push'
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
continue-on-error: true # do not fail if GHAS is not enabled
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
Expand Down Expand Up @@ -203,7 +203,7 @@ runs:
- name: Build and Push image ${{ env.IMAGE_NAME }}
id: build-and-push
if: env.PUSH_IMAGE == 'true'
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: ${{ inputs.base-directory }}/${{ inputs.image-dir }}
platforms: linux/amd64,linux/arm64/v8
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/docker-dump-containers-logs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
echo "artefactName=${{ inputs.output-archive-name }}" >> $GITHUB_ENV
fi
- name: "Upload archive containing all *.log files"
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
path: logs.tar.gz
name: ${{ env.artefactName }}
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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.3.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/github-deployment-status-update@v8.3.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/setup-rancher-cli@v8.3.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-package-chart/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ runs:
echo "package-file-path=$PACKAGE_FILE_PATH" >> $GITHUB_OUTPUT
- name: Upload Artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ${{steps.package.outputs.package-file}}
path: ${{steps.package.outputs.package-file-path}}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/helm-publish-chart/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
run: echo "CHECKOUT_PATH=$(uuidgen)" >> $GITHUB_ENV

- name: Checkout charts repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.CHECKOUT_PATH }}
repository: ${{ inputs.helm-charts-repo }}
Expand Down Expand Up @@ -110,7 +110,7 @@ runs:
fi
- name: Commit changes
uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/git-check-existing-tag@v8.3.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/helm-update-chart-version@v8.3.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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.3.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/helm-package-chart@v8.3.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/helm-publish-chart@v8.3.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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-helm-docs@v8.3.0
with:
version: ${{ inputs.helm-docs-version }}
- name: Update version
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/kubectl-keep-nslogs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
done
done
- name: upload kubernetes logs as artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: >-
${{ inputs.namespace }}_logs.${{ github.run_number }}.${{ github.run_attempt }}
Expand Down
Loading

0 comments on commit ca5da65

Please sign in to comment.