OPSEXP-2403 Bump ATS and Sync tags in 7.3/7.2/7.1 to fix activemq CVE-2023-46604 #1092
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Helm (Enterprise) | |
on: | |
pull_request: | |
branches: | |
- master | |
- release/** | |
- next/** | |
paths: | |
- helm/** | |
- test/postman/helm/** | |
- .github/workflows/helm* | |
push: | |
branches: | |
- master | |
- release/** | |
concurrency: | |
group: helm-ent-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build_vars: | |
runs-on: ubuntu-latest | |
if: >- | |
github.event_name == 'push' | |
|| ( | |
! github.event.repository.fork | |
&& github.actor != 'dependabot[bot]' | |
) | |
outputs: | |
app_json: ${{ steps.getcharts.outputs.app }} | |
ver_json: ${{ steps.app_versions.outputs.json }} | |
chart_names: ${{ steps.chart_names.outputs.json}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: getcharts | |
uses: ./.github/actions/charts-as-json | |
with: | |
charts-root: helm | |
- id: app_versions | |
env: | |
JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }} | |
JQ_FILTER: >- | |
[inputs | .charts[] | {name: .name, values: .values[]}] | |
| del(.[] | select(.values=="community_values.yaml")) | |
run: | | |
echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}' | |
VERS=$(echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}') | |
echo "json=$VERS" >> $GITHUB_OUTPUT | |
- id: chart_names | |
env: | |
JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }} | |
JQ_FILTER: $json | [.charts[].name] | |
run: | | |
CHARTS=$(jq -nc --argjson json '${{ env.JSON }}' '${{ env.JQ_FILTER }}') | |
echo "json=$CHARTS" >> $GITHUB_OUTPUT | |
helm_integration: | |
runs-on: alfrescoPub-ubuntu2204-16G-4CPU | |
timeout-minutes: 10 | |
needs: | |
- build_vars | |
name: Helm ${{ matrix.name }} ${{ matrix.values }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJSON(needs.build_vars.outputs.ver_json) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azure/setup-helm@v3 | |
with: | |
version: "3.12.1" | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to Quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Setup cluster | |
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
ingress-nginx-ref: controller-v1.8.2 | |
- name: Set nginx ingress config | |
run: | | |
kubectl -n ingress-nginx patch cm ingress-nginx-controller \ | |
-p '{"data": {"allow-snippet-annotations":"true"}}' | |
- name: Create registries auth secret | |
run: | | |
kubectl create secret generic regcred \ | |
--from-file=.dockerconfigjson=$HOME/.docker/config.json \ | |
--type=kubernetes.io/dockerconfigjson | |
- name: Check if cgroup v2 workaround is needed | |
id: extra-values | |
run: | | |
acs_version=$(echo ${{ matrix.values }} | cut -d'.' -f1,2) | |
is_affected=$(echo "$acs_version <= 7.2" | bc -l) | |
if [ "$is_affected" -eq 1 ]; then | |
echo "helm_install_params=--values test/cgroup-v2-workaround-values.yaml" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Helm install | |
run: | | |
helm dep up ./helm/alfresco-content-services | |
helm install acs ./helm/alfresco-content-services \ | |
--set global.search.sharedSecret="$(openssl rand -hex 24)" \ | |
--set global.known_urls=http://localhost \ | |
--set global.alfrescoRegistryPullSecrets=regcred \ | |
--wait --timeout 6m0s \ | |
--values helm/${{ matrix.name }}/${{ matrix.values }} \ | |
--values test/enterprise-integration-test-values.yaml \ | |
${{ steps.extra-values.outputs.helm_install_params }} | |
- name: Spit cluster status after install | |
if: always() | |
run: | | |
helm ls --all-namespaces | |
kubectl get all --all-namespaces | |
kubectl describe pod | |
- uses: nick-fields/retry@v2 | |
id: newman | |
with: | |
timeout_minutes: 1 | |
retry_wait_seconds: 20 | |
max_attempts: 5 | |
command: >- | |
docker run --network=host | |
-v $(pwd)/test/postman:/etc/postman | |
-t postman/newman run /etc/postman/helm/acs-test-helm-collection.json | |
--global-var protocol=http --global-var url=localhost | |
- name: Spit cluster status after tests | |
if: always() && steps.newman.outcome != 'skipped' | |
run: | | |
helm ls --all-namespaces | |
kubectl get all --all-namespaces | |
kubectl describe pod |