From 393c8a099da7c481bbe32f4a984cd34e750fc3fb Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 14:12:43 +0100 Subject: [PATCH 01/37] OPSEXP-2849 Allow building and testing multiple versions of ACS --- .../workflows/reusuable_build_and_test.yml | 325 ++++++++++++++++++ 1 file changed, 325 insertions(+) create mode 100644 .github/workflows/reusuable_build_and_test.yml diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml new file mode 100644 index 00000000..0265880c --- /dev/null +++ b/.github/workflows/reusuable_build_and_test.yml @@ -0,0 +1,325 @@ +name: CI + +on: + workflow_call: + inputs: + registry: + description: 'Container registry' + required: true + type: string + registry_namespace: + description: 'Registry namespace' + required: true + type: string + tag: + description: 'Tag for the Docker images' + required: true + type: string + acs_version: + description: 'Version of ACS to build' + required: true + type: string + acs_deployment_version: + description: 'ACS deployment version' + required: true + type: string + secrets: + QUAY_USERNAME: + description: 'Quay.io username' + required: true + QUAY_PASSWORD: + description: 'Quay.io password' + required: true + GITHUB_TOKEN: + description: 'GitHub token' + required: true + NEXUS_USERNAME: + description: 'Nexus username' + required: true + NEXUS_PASSWORD: + description: 'Nexus password' + required: true + +jobs: + pre-commit: + runs-on: ubuntu-latest + if: '! github.event.pull_request.head.repo.fork' + permissions: + contents: write + steps: + - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v7.1.1 + with: + auto-commit: "true" + + build: + needs: pre-commit + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.1 + + - name: Setup nexus authentication + run: | + echo "machine nexus.alfresco.com" >> ~/.netrc + echo "login ${{ secrets.NEXUS_USERNAME }}" >> ~/.netrc + echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc + + - name: Restore packages artifacts + uses: actions/cache/restore@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0 + id: artifacts-cache + with: + key: ${{ runner.os }}-packages-v2-${{ hashFiles('**/artifacts.json') }} + path: artifacts_cache/** + + - name: Fetch artifacts from nexus + run: ./scripts/fetch-artifacts.sh ${{ inputs.acs_version }} + + - name: Save packages artifacts + if: steps.artifacts-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0 + with: + key: ${{ steps.artifacts-cache.outputs.cache-primary-key }} + path: artifacts_cache/** + + - name: Set up QEMU + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 + + - name: Login to Quay.io + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + if: github.actor != 'dependabot[bot]' + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Log in to the Container registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + if: github.actor != 'dependabot[bot]' + with: + registry: ${{ inputs.registry }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Collect Workflow Telemetry + uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 + with: + comment_on_pr: false + + - name: Enumerate bake targets + id: bake-targets + uses: docker/bake-action/subaction/list-targets@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 + with: + target: default + + - name: Enumerate registry cache targets + id: cache-targets + env: + CACHE_TARGET: ${{ inputs.registry }}/${{ inputs.registry_namespace }}/bakery-cache + run: | + echo 'cache-set<> $GITHUB_OUTPUT + echo '${{ steps.bake-targets.outputs.targets }}' | jq -r '.[] | '\ + '"\(.).cache-from=type=registry,ref=${{ env.CACHE_TARGET }}:${{ inputs.tag }}-\(.)\n'\ + '\(.).cache-from=type=registry,ref=${{ env.CACHE_TARGET }}:${{ github.event.repository.default_branch }}-\(.)\n'\ + '\(.).cache-to=type=registry,ref=${{ env.CACHE_TARGET }}:${{ inputs.tag }}-\(.)"' >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + + - name: Bake Docker images + env: + TARGETARCH: linux/amd64,linux/arm64 + DOCKER_PUSH: ${{ github.actor != 'dependabot[bot]'}} + uses: docker/bake-action@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 + with: + set: | + *.output=type=registry,push=${{ env.DOCKER_PUSH }} + ${{ steps.cache-targets.outputs.cache-set }} + + compose-test: + needs: build + runs-on: ${{ matrix.edition == 'enterprise' && 'alfrescoPub-ubuntu2204-16G-4CPU' || 'ubuntu-latest' }} + if: github.actor != 'dependabot[bot]' + strategy: + fail-fast: false + matrix: + edition: [enterprise, community] + env: + UPSTREAM_COMPOSE_PATH: test/${{ matrix.edition }}.yaml + OVERRIDE_COMPOSE_PATH: test/${{ matrix.edition }}-override.yaml + MERGED_COMPOSE_PATH: test/merged-compose.yaml + steps: + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - name: Log in to the Container registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: ${{ inputs.registry }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 + + - name: Fetch compose from acs-deployment + run: ./scripts/fetch-compose.sh ${{ matrix.edition }} ${{ env.UPSTREAM_COMPOSE_PATH }} ${{ inputs.acs_deployment_version }} + + - name: Merge Docker Compose files + run: docker compose -f ${{ env.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} + + - name: Verify docker-compose (${{ matrix.edition }}) + id: verify_compose + uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v8.1.0 + timeout-minutes: 10 + with: + postman_path: test/postman/docker-compose + postman_json: acs-test-docker-compose-collection.json + compose_file_path: ${{ env.MERGED_COMPOSE_PATH }} + quay_username: ${{ secrets.QUAY_USERNAME }} + quay_password: ${{ secrets.QUAY_PASSWORD }} + + - name: Save containers logs (${{ matrix.edition }}) + if: always() && steps.verify_compose.outcome != 'skipped' + uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v8.1.0 + with: + output-archive-name: ${{ matrix.edition }}-logs-${{ inputs.acs_version }} + + helm-test: + needs: build + runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} + if: github.actor != 'dependabot[bot]' + strategy: + fail-fast: false + matrix: + arch: [arm64, amd64] + edition: [enterprise, community] + steps: + - name: Setup cluster + uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v7.1.1 + with: + ingress-nginx-ref: controller-v1.8.2 + metrics: "true" + + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 + with: + version: "3.15.2" + + - name: Login to Quay.io + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Log in to the Container registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: ${{ inputs.registry }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create registries auth secret + run: >- + kubectl create secret generic regcred + --from-file=.dockerconfigjson=$HOME/.docker/config.json + --type=kubernetes.io/dockerconfigjson + + - name: Create configmaps for adf apps + run: | + kubectl create configmap acc-config --from-file=app.config.json=test/configs/acc.json + kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json + + - name: Checkout acs-deployment sources + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + repository: Alfresco/acs-deployment + ref: ${{ inputs.acs_deployment_version }} + path: acs-deployment + + - name: Setup helm repository + working-directory: acs-deployment/helm/alfresco-content-services + run: | + helm repo add self https://alfresco.github.io/alfresco-helm-charts/ + helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts + helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ + helm repo add elastic https://helm.elastic.co + helm dependency build + + - name: Preprocess test-overrides.yaml + env: + OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml + run: | + sed -i "s|localhost/alfresco/|${REGISTRY}/${REGISTRY_NAMESPACE}/|g" ${{ env.OVERRIDES_VALUES_FILE }} + sed -i "s|tag: latest|tag: ${TAG}|g" ${{ env.OVERRIDES_VALUES_FILE }} + + if [ "${{ matrix.edition }}" = "community" ]; then + sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }} + sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }} + fi + + cat ${{ env.OVERRIDES_VALUES_FILE }} + + - name: Helm install + id: helm_install + run: | + helm install acs ./acs-deployment/helm/alfresco-content-services \ + --set global.search.sharedSecret="$(openssl rand -hex 24)" \ + --set global.known_urls=http://localhost \ + --set global.alfrescoRegistryPullSecrets=regcred \ + --values ./acs-deployment/helm/alfresco-content-services/${{ matrix.edition == 'community' && 'community_' || '' }}values.yaml \ + --values ./acs-deployment/test/${{ matrix.edition }}-integration-test-values.yaml \ + --values test/helm/test-overrides.yaml \ + --values test/helm/test-overrides-${{ matrix.edition }}.yaml + + - name: Watch Helm deployment + env: + HELM_INSTALL_TIMEOUT: 10m + run: | + kubectl get pods --watch & + KWPID=$! + kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Ready pods + kill $KWPID + + if [ "${{ matrix.edition }}" = "enterprise" ]; then + echo "Waiting for Enterprise Search Reindexing job to complete... " + kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing + fi + + - name: Debug cluster status after install + if: always() && steps.helm_install.outcome != 'skipped' + run: | + helm ls --all-namespaces --all + kubectl get all --all-namespaces + kubectl describe pod + + - name: Run helm test + id: helm_test + run: helm test acs + + - name: Debug cluster status after helm test + if: always() && steps.helm_test.outcome != 'skipped' + run: | + kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 + kubectl get all --all-namespaces + kubectl describe pod + + - name: Collect logs from all containers + if: always() && steps.helm_install.outcome != 'skipped' + run: | + mkdir -p logs + for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do + kubectl logs $pod -n default > logs/${pod}.log + done + + - name: Upload logs as artifact + if: always() && steps.helm_install.outcome != 'skipped' + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 + with: + name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }}-${{ inputs.acs_version}} + path: logs From ec428aacc1e48b1d34bcc33b761107bde1bac65f Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 14:15:34 +0100 Subject: [PATCH 02/37] test --- .github/workflows/reusuable_build_and_test.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 0265880c..a8480bc1 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -23,22 +23,6 @@ on: description: 'ACS deployment version' required: true type: string - secrets: - QUAY_USERNAME: - description: 'Quay.io username' - required: true - QUAY_PASSWORD: - description: 'Quay.io password' - required: true - GITHUB_TOKEN: - description: 'GitHub token' - required: true - NEXUS_USERNAME: - description: 'Nexus username' - required: true - NEXUS_PASSWORD: - description: 'Nexus password' - required: true jobs: pre-commit: From 712b9498ce2f6d0c1c59096d570567f41161403f Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 14:18:11 +0100 Subject: [PATCH 03/37] move permissions --- .github/workflows/build_and_test.yml | 9 --------- .github/workflows/reusuable_build_and_test.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index be74e890..0319e3a4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -22,15 +22,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} cancel-in-progress: true -permissions: - contents: read - # telemetry - actions: read - # ghcr push - packages: write - attestations: write - id-token: write - jobs: pre-commit: runs-on: ubuntu-latest diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index a8480bc1..46b8584d 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -24,6 +24,15 @@ on: required: true type: string +permissions: + contents: read + # telemetry + actions: read + # ghcr push + packages: write + attestations: write + id-token: write + jobs: pre-commit: runs-on: ubuntu-latest From 4b44545f69b36f1ad1fd64bc8ff623a0117ca17a Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 14:25:18 +0100 Subject: [PATCH 04/37] move precommit to parent --- .github/workflows/build_and_test.yml | 9 +++++++++ .../workflows/reusuable_build_and_test.yml | 20 ------------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0319e3a4..be74e890 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -22,6 +22,15 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} cancel-in-progress: true +permissions: + contents: read + # telemetry + actions: read + # ghcr push + packages: write + attestations: write + id-token: write + jobs: pre-commit: runs-on: ubuntu-latest diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 46b8584d..06306fe8 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -24,28 +24,8 @@ on: required: true type: string -permissions: - contents: read - # telemetry - actions: read - # ghcr push - packages: write - attestations: write - id-token: write - jobs: - pre-commit: - runs-on: ubuntu-latest - if: '! github.event.pull_request.head.repo.fork' - permissions: - contents: write - steps: - - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v7.1.1 - with: - auto-commit: "true" - build: - needs: pre-commit runs-on: ubuntu-latest steps: - name: Checkout From b5ee8d1a14161b6d9b82e000403d34accfb1018e Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 14:43:08 +0100 Subject: [PATCH 05/37] fetching script path to dir as a 2nd argument --- scripts/fetch-artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch-artifacts.sh b/scripts/fetch-artifacts.sh index 1380060f..70b69960 100755 --- a/scripts/fetch-artifacts.sh +++ b/scripts/fetch-artifacts.sh @@ -41,7 +41,7 @@ do_fetch_mvn() { done } -TARGETS=$(find "${REPO_ROOT}" -regex "${REPO_ROOT}/${1:+$1/}.*" -name artifacts.json -mindepth 2 -print) +TARGETS=$(find "${REPO_ROOT}" -regex "${REPO_ROOT}/${2:+$2/}.*" -name artifacts.json -mindepth 2 -print) for i in $TARGETS ; do do_fetch_mvn $i From 059261794a41a4b77deae711ccee96cd03ca1640 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 15:06:21 +0100 Subject: [PATCH 06/37] add few fixes --- .github/workflows/reusuable_build_and_test.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 06306fe8..fc239c50 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -24,6 +24,11 @@ on: required: true type: string +env: + REGISTRY: ${{ inputs.registry }} + REGISTRY_NAMESPACE: ${{ inputs.registry_namespace }} + TAG: ${{ inputs.tag }} + jobs: build: runs-on: ubuntu-latest @@ -74,7 +79,7 @@ jobs: uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 if: github.actor != 'dependabot[bot]' with: - registry: ${{ inputs.registry }} + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -92,7 +97,7 @@ jobs: - name: Enumerate registry cache targets id: cache-targets env: - CACHE_TARGET: ${{ inputs.registry }}/${{ inputs.registry_namespace }}/bakery-cache + CACHE_TARGET: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/bakery-cache run: | echo 'cache-set<> $GITHUB_OUTPUT echo '${{ steps.bake-targets.outputs.targets }}' | jq -r '.[] | '\ @@ -130,7 +135,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: - registry: ${{ inputs.registry }} + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -193,7 +198,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: - registry: ${{ inputs.registry }} + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} From da7cbf6e602da0b41f5f6b27b49f4a6e14f33572 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 4 Nov 2024 15:11:33 +0100 Subject: [PATCH 07/37] fix artifacts cache and fix artifacts for adw --- .github/workflows/reusuable_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index fc239c50..9945f35c 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -48,7 +48,7 @@ jobs: uses: actions/cache/restore@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0 id: artifacts-cache with: - key: ${{ runner.os }}-packages-v2-${{ hashFiles('**/artifacts.json') }} + key: ${{ runner.os }}-packages-v2-${{ hashFiles('**/artifacts.json') }}-${{ inputs.acs_version }} path: artifacts_cache/** - name: Fetch artifacts from nexus From a799b67c4028a49563ab3797c401939b7d139fbb Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 10:21:42 +0100 Subject: [PATCH 08/37] compose multiversion testing wip --- .../workflows/reusuable_build_and_test.yml | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 9945f35c..1011849b 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -116,8 +116,26 @@ jobs: *.output=type=registry,push=${{ env.DOCKER_PUSH }} ${{ steps.cache-targets.outputs.cache-set }} - compose-test: + build-matrix: needs: build + runs-on: ubuntu-latest + if: github.actor != 'dependabot[bot]' + steps: + - name: Calculate values for compose + id: compose-values + run: | + echo "matrix_json=$( + if [[ '${{ inputs.acs_version }}' == '23' ]]; then + jq -n '{"edition": ["enterprise", "community"]}' + elif [[ '${{ inputs.acs_version }}' == '74' ]]; then + jq -n '{"edition": ["74"]}' + else + jq -n '{"edition": []}' + fi + )" >> $GITHUB_OUTPUT + + compose-test: + needs: build-matrix runs-on: ${{ matrix.edition == 'enterprise' && 'alfrescoPub-ubuntu2204-16G-4CPU' || 'ubuntu-latest' }} if: github.actor != 'dependabot[bot]' strategy: @@ -166,7 +184,7 @@ jobs: output-archive-name: ${{ matrix.edition }}-logs-${{ inputs.acs_version }} helm-test: - needs: build + needs: build-matrix runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} if: github.actor != 'dependabot[bot]' strategy: From c051f788c1c04123deb7c3791448e67d582108e7 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 11:02:45 +0100 Subject: [PATCH 09/37] try only compose testing --- .../workflows/reusuable_build_and_test.yml | 297 +++++++++--------- scripts/fetch-compose.sh | 2 +- 2 files changed, 155 insertions(+), 144 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 1011849b..5a410c6b 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -108,7 +108,7 @@ jobs: - name: Bake Docker images env: - TARGETARCH: linux/amd64,linux/arm64 + TARGETARCH: ${{ inputs.acs_version == '23' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} DOCKER_PUSH: ${{ github.actor != 'dependabot[bot]'}} uses: docker/bake-action@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 with: @@ -120,6 +120,8 @@ jobs: needs: build runs-on: ubuntu-latest if: github.actor != 'dependabot[bot]' + outputs: + matrix_json: ${{ steps.compose-values.outputs.matrix_json }} steps: - name: Calculate values for compose id: compose-values @@ -140,11 +142,8 @@ jobs: if: github.actor != 'dependabot[bot]' strategy: fail-fast: false - matrix: - edition: [enterprise, community] + matrix: ${{ fromJson(needs.build-matrix.outputs.matrix_json) }} env: - UPSTREAM_COMPOSE_PATH: test/${{ matrix.edition }}.yaml - OVERRIDE_COMPOSE_PATH: test/${{ matrix.edition }}-override.yaml MERGED_COMPOSE_PATH: test/merged-compose.yaml steps: - name: Checkout @@ -161,10 +160,22 @@ jobs: uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Fetch compose from acs-deployment - run: ./scripts/fetch-compose.sh ${{ matrix.edition }} ${{ env.UPSTREAM_COMPOSE_PATH }} ${{ inputs.acs_deployment_version }} + run: ./scripts/fetch-compose.sh ${{ inputs.acs_deployment_version }} + + - name: Set path to compose files + id: set-compose-path + run: | + if [[ "${{ matrix.edition }}" == "74" ]]; then + echo "UPSTREAM_COMPOSE_PATH=test/7.4.N-compose.yaml" >> $GITHUB_ENV + elif [[ "${{ matrix.edition }}" == "community" ]]; then + echo "UPSTREAM_COMPOSE_PATH=test/community-compose.yaml" >> $GITHUB_ENV + else + echo "UPSTREAM_COMPOSE_PATH=test/compose.yaml" >> $GITHUB_ENV - name: Merge Docker Compose files - run: docker compose -f ${{ env.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} + env: + OVERRIDE_COMPOSE_PATH: test/${{ matrix.edition }}-override.yaml + run: docker compose -f ${{ steps.set-compose-path.outputs.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} - name: Verify docker-compose (${{ matrix.edition }}) id: verify_compose @@ -183,139 +194,139 @@ jobs: with: output-archive-name: ${{ matrix.edition }}-logs-${{ inputs.acs_version }} - helm-test: - needs: build-matrix - runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} - if: github.actor != 'dependabot[bot]' - strategy: - fail-fast: false - matrix: - arch: [arm64, amd64] - edition: [enterprise, community] - steps: - - name: Setup cluster - uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v7.1.1 - with: - ingress-nginx-ref: controller-v1.8.2 - metrics: "true" - - - name: Checkout - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - - - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 - with: - version: "3.15.2" - - - name: Login to Quay.io - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Log in to the Container registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Create registries auth secret - run: >- - kubectl create secret generic regcred - --from-file=.dockerconfigjson=$HOME/.docker/config.json - --type=kubernetes.io/dockerconfigjson - - - name: Create configmaps for adf apps - run: | - kubectl create configmap acc-config --from-file=app.config.json=test/configs/acc.json - kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json - - - name: Checkout acs-deployment sources - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - with: - repository: Alfresco/acs-deployment - ref: ${{ inputs.acs_deployment_version }} - path: acs-deployment - - - name: Setup helm repository - working-directory: acs-deployment/helm/alfresco-content-services - run: | - helm repo add self https://alfresco.github.io/alfresco-helm-charts/ - helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts - helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - helm repo add elastic https://helm.elastic.co - helm dependency build - - - name: Preprocess test-overrides.yaml - env: - OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml - run: | - sed -i "s|localhost/alfresco/|${REGISTRY}/${REGISTRY_NAMESPACE}/|g" ${{ env.OVERRIDES_VALUES_FILE }} - sed -i "s|tag: latest|tag: ${TAG}|g" ${{ env.OVERRIDES_VALUES_FILE }} - - if [ "${{ matrix.edition }}" = "community" ]; then - sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }} - sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }} - fi - - cat ${{ env.OVERRIDES_VALUES_FILE }} - - - name: Helm install - id: helm_install - run: | - helm install acs ./acs-deployment/helm/alfresco-content-services \ - --set global.search.sharedSecret="$(openssl rand -hex 24)" \ - --set global.known_urls=http://localhost \ - --set global.alfrescoRegistryPullSecrets=regcred \ - --values ./acs-deployment/helm/alfresco-content-services/${{ matrix.edition == 'community' && 'community_' || '' }}values.yaml \ - --values ./acs-deployment/test/${{ matrix.edition }}-integration-test-values.yaml \ - --values test/helm/test-overrides.yaml \ - --values test/helm/test-overrides-${{ matrix.edition }}.yaml - - - name: Watch Helm deployment - env: - HELM_INSTALL_TIMEOUT: 10m - run: | - kubectl get pods --watch & - KWPID=$! - kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Ready pods - kill $KWPID - - if [ "${{ matrix.edition }}" = "enterprise" ]; then - echo "Waiting for Enterprise Search Reindexing job to complete... " - kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing - fi - - - name: Debug cluster status after install - if: always() && steps.helm_install.outcome != 'skipped' - run: | - helm ls --all-namespaces --all - kubectl get all --all-namespaces - kubectl describe pod - - - name: Run helm test - id: helm_test - run: helm test acs - - - name: Debug cluster status after helm test - if: always() && steps.helm_test.outcome != 'skipped' - run: | - kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 - kubectl get all --all-namespaces - kubectl describe pod - - - name: Collect logs from all containers - if: always() && steps.helm_install.outcome != 'skipped' - run: | - mkdir -p logs - for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do - kubectl logs $pod -n default > logs/${pod}.log - done - - - name: Upload logs as artifact - if: always() && steps.helm_install.outcome != 'skipped' - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 - with: - name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }}-${{ inputs.acs_version}} - path: logs +# helm-test: +# needs: build-matrix +# runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} +# if: github.actor != 'dependabot[bot]' +# strategy: +# fail-fast: false +# matrix: +# arch: [arm64, amd64] +# edition: [enterprise, community] +# steps: +# - name: Setup cluster +# uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v7.1.1 +# with: +# ingress-nginx-ref: controller-v1.8.2 +# metrics: "true" + +# - name: Checkout +# uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + +# - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 +# with: +# version: "3.15.2" + +# - name: Login to Quay.io +# uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 +# with: +# registry: quay.io +# username: ${{ secrets.QUAY_USERNAME }} +# password: ${{ secrets.QUAY_PASSWORD }} + +# - name: Log in to the Container registry +# uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 +# with: +# registry: ${{ env.REGISTRY }} +# username: ${{ github.actor }} +# password: ${{ secrets.GITHUB_TOKEN }} + +# - name: Create registries auth secret +# run: >- +# kubectl create secret generic regcred +# --from-file=.dockerconfigjson=$HOME/.docker/config.json +# --type=kubernetes.io/dockerconfigjson + +# - name: Create configmaps for adf apps +# run: | +# kubectl create configmap acc-config --from-file=app.config.json=test/configs/acc.json +# kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json + +# - name: Checkout acs-deployment sources +# uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 +# with: +# repository: Alfresco/acs-deployment +# ref: ${{ inputs.acs_deployment_version }} +# path: acs-deployment + +# - name: Setup helm repository +# working-directory: acs-deployment/helm/alfresco-content-services +# run: | +# helm repo add self https://alfresco.github.io/alfresco-helm-charts/ +# helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts +# helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ +# helm repo add elastic https://helm.elastic.co +# helm dependency build + +# - name: Preprocess test-overrides.yaml +# env: +# OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml +# run: | +# sed -i "s|localhost/alfresco/|${REGISTRY}/${REGISTRY_NAMESPACE}/|g" ${{ env.OVERRIDES_VALUES_FILE }} +# sed -i "s|tag: latest|tag: ${TAG}|g" ${{ env.OVERRIDES_VALUES_FILE }} + +# if [ "${{ matrix.edition }}" = "community" ]; then +# sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }} +# sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }} +# fi + +# cat ${{ env.OVERRIDES_VALUES_FILE }} + +# - name: Helm install +# id: helm_install +# run: | +# helm install acs ./acs-deployment/helm/alfresco-content-services \ +# --set global.search.sharedSecret="$(openssl rand -hex 24)" \ +# --set global.known_urls=http://localhost \ +# --set global.alfrescoRegistryPullSecrets=regcred \ +# --values ./acs-deployment/helm/alfresco-content-services/${{ matrix.edition == 'community' && 'community_' || '' }}values.yaml \ +# --values ./acs-deployment/test/${{ matrix.edition }}-integration-test-values.yaml \ +# --values test/helm/test-overrides.yaml \ +# --values test/helm/test-overrides-${{ matrix.edition }}.yaml + +# - name: Watch Helm deployment +# env: +# HELM_INSTALL_TIMEOUT: 10m +# run: | +# kubectl get pods --watch & +# KWPID=$! +# kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Ready pods +# kill $KWPID + +# if [ "${{ matrix.edition }}" = "enterprise" ]; then +# echo "Waiting for Enterprise Search Reindexing job to complete... " +# kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing +# fi + +# - name: Debug cluster status after install +# if: always() && steps.helm_install.outcome != 'skipped' +# run: | +# helm ls --all-namespaces --all +# kubectl get all --all-namespaces +# kubectl describe pod + +# - name: Run helm test +# id: helm_test +# run: helm test acs + +# - name: Debug cluster status after helm test +# if: always() && steps.helm_test.outcome != 'skipped' +# run: | +# kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 +# kubectl get all --all-namespaces +# kubectl describe pod + +# - name: Collect logs from all containers +# if: always() && steps.helm_install.outcome != 'skipped' +# run: | +# mkdir -p logs +# for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do +# kubectl logs $pod -n default > logs/${pod}.log +# done + +# - name: Upload logs as artifact +# if: always() && steps.helm_install.outcome != 'skipped' +# uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 +# with: +# name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }}-${{ inputs.acs_version}} +# path: logs diff --git a/scripts/fetch-compose.sh b/scripts/fetch-compose.sh index 4812d13e..f146ce0a 100755 --- a/scripts/fetch-compose.sh +++ b/scripts/fetch-compose.sh @@ -10,7 +10,7 @@ if [ "$#" -ne 1 ]; then fi ACS_DEPLOYMENT_VERSION="$1" -COMPOSE_FILES=(compose.yaml community-compose.yaml 7.4.N-compose.yaml) +COMPOSE_FILES=(compose.yaml community-compose.yaml 7.4.N-compose.yaml 7.3.N-compose.yaml) DESTINATION_DIR="$(dirname "$0")/../test" for COMPOSE_FILE in "${COMPOSE_FILES[@]}"; do From 737809d6105717b9f73fd4e88e17484e894b70a6 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 11:11:45 +0100 Subject: [PATCH 10/37] try to fix build matrix --- .github/workflows/reusuable_build_and_test.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 5a410c6b..258d8693 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -121,20 +121,21 @@ jobs: runs-on: ubuntu-latest if: github.actor != 'dependabot[bot]' outputs: - matrix_json: ${{ steps.compose-values.outputs.matrix_json }} + matrix_json: ${{ steps.compose-values.outputs.matrix_json }} steps: - name: Calculate values for compose id: compose-values run: | - echo "matrix_json=$( - if [[ '${{ inputs.acs_version }}' == '23' ]]; then + matrix_json=$( + if [[ '${{ inputs.acs_version }}' == '23' ]]; then jq -n '{"edition": ["enterprise", "community"]}' - elif [[ '${{ inputs.acs_version }}' == '74' ]]; then + elif [[ '${{ inputs.acs_version }}' == '74' ]]; then jq -n '{"edition": ["74"]}' - else + else jq -n '{"edition": []}' - fi - )" >> $GITHUB_OUTPUT + fi + ) + echo "matrix_json=$matrix_json" >> $GITHUB_OUTPUT compose-test: needs: build-matrix From 611620050ccbb3e2de4db2846e93292f1040957d Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 11:20:45 +0100 Subject: [PATCH 11/37] use simpler way --- .github/workflows/reusuable_build_and_test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 258d8693..2e3955fe 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -126,15 +126,13 @@ jobs: - name: Calculate values for compose id: compose-values run: | - matrix_json=$( if [[ '${{ inputs.acs_version }}' == '23' ]]; then - jq -n '{"edition": ["enterprise", "community"]}' + matrix_json='{"edition": ["enterprise", "community"]}' elif [[ '${{ inputs.acs_version }}' == '74' ]]; then - jq -n '{"edition": ["74"]}' + matrix_json='{"edition": ["74"]}' else - jq -n '{"edition": []}' + matrix_json='{"edition": []}' fi - ) echo "matrix_json=$matrix_json" >> $GITHUB_OUTPUT compose-test: From 63fdfcdad2f17b792b5d1d756ac2b84be1fa9f09 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 11:29:42 +0100 Subject: [PATCH 12/37] missing fi --- .github/workflows/reusuable_build_and_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 2e3955fe..44aa8919 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -170,6 +170,7 @@ jobs: echo "UPSTREAM_COMPOSE_PATH=test/community-compose.yaml" >> $GITHUB_ENV else echo "UPSTREAM_COMPOSE_PATH=test/compose.yaml" >> $GITHUB_ENV + fi - name: Merge Docker Compose files env: From 6913dd10deb445ad27168779860c8d94dcbe8dc2 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 11:35:08 +0100 Subject: [PATCH 13/37] fix env --- .github/workflows/reusuable_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 44aa8919..7cde4489 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -175,7 +175,7 @@ jobs: - name: Merge Docker Compose files env: OVERRIDE_COMPOSE_PATH: test/${{ matrix.edition }}-override.yaml - run: docker compose -f ${{ steps.set-compose-path.outputs.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} + run: docker compose -f ${{ env.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} - name: Verify docker-compose (${{ matrix.edition }}) id: verify_compose From 9ad1d20629d36bd1a12599be2e7bdd5ed58e7534 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 14:28:20 +0100 Subject: [PATCH 14/37] set tomcat to 9 when version is different than 23 --- .github/workflows/reusuable_build_and_test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 7cde4489..68b624fd 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -106,6 +106,14 @@ jobs: '\(.).cache-to=type=registry,ref=${{ env.CACHE_TARGET }}:${{ inputs.tag }}-\(.)"' >> $GITHUB_OUTPUT echo 'EOF' >> $GITHUB_OUTPUT + - name: Set Tomcat environment variables + run: | + if [[ '${{ inputs.acs_version }}' != '23' ]]; then + echo "TOMCAT_MAJOR=9" >> $GITHUB_ENV + echo "TOMCAT_VERSION=9.0.96" >> $GITHUB_ENV + echo "TOMCAT_SHA512=ef3ac81debbc3a519c43d1fdb1c88ab26a8052af424d81bceccfbd6e663050a06d7aad7960fd5d11c17849829daebbebf33d92ac1158902283d0e534514aab93" >> $GITHUB_ENV + fi + - name: Bake Docker images env: TARGETARCH: ${{ inputs.acs_version == '23' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} From 7e2f2ffa18bc5333d0ca760ada66053ce3c4a861 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 14:32:53 +0100 Subject: [PATCH 15/37] prepare rebase --- .../workflows/reusuable_build_and_test.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 68b624fd..0d1b3e93 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -34,9 +34,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.1 + - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0 - name: Setup nexus authentication run: | @@ -45,7 +45,7 @@ jobs: echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc - name: Restore packages artifacts - uses: actions/cache/restore@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0 + uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 id: artifacts-cache with: key: ${{ runner.os }}-packages-v2-${{ hashFiles('**/artifacts.json') }}-${{ inputs.acs_version }} @@ -56,7 +56,7 @@ jobs: - name: Save packages artifacts if: steps.artifacts-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0 + uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: key: ${{ steps.artifacts-cache.outputs.cache-primary-key }} path: artifacts_cache/** @@ -154,7 +154,7 @@ jobs: MERGED_COMPOSE_PATH: test/merged-compose.yaml steps: - name: Checkout - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Log in to the Container registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 @@ -187,7 +187,7 @@ jobs: - name: Verify docker-compose (${{ matrix.edition }}) id: verify_compose - uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v8.1.0 + uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v8.2.0 timeout-minutes: 10 with: postman_path: test/postman/docker-compose @@ -198,7 +198,7 @@ jobs: - name: Save containers logs (${{ matrix.edition }}) if: always() && steps.verify_compose.outcome != 'skipped' - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v8.1.0 + uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v8.2.0 with: output-archive-name: ${{ matrix.edition }}-logs-${{ inputs.acs_version }} @@ -213,13 +213,13 @@ jobs: # edition: [enterprise, community] # steps: # - name: Setup cluster -# uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v7.1.1 +# uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.2.0 # with: # ingress-nginx-ref: controller-v1.8.2 # metrics: "true" # - name: Checkout -# uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 # with: @@ -251,7 +251,7 @@ jobs: # kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json # - name: Checkout acs-deployment sources -# uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # with: # repository: Alfresco/acs-deployment # ref: ${{ inputs.acs_deployment_version }} @@ -334,7 +334,7 @@ jobs: # - name: Upload logs as artifact # if: always() && steps.helm_install.outcome != 'skipped' -# uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 +# uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3 # with: # name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }}-${{ inputs.acs_version}} # path: logs From 4c1ac11e832c7a4a15b1ac45641a89efd15e802c Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 15:05:43 +0100 Subject: [PATCH 16/37] enable helm --- .../workflows/reusuable_build_and_test.yml | 293 +++++++++--------- 1 file changed, 151 insertions(+), 142 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 0d1b3e93..d943c436 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -129,19 +129,30 @@ jobs: runs-on: ubuntu-latest if: github.actor != 'dependabot[bot]' outputs: - matrix_json: ${{ steps.compose-values.outputs.matrix_json }} + compose_matrix_json: ${{ steps.compose-values.outputs.compose_matrix_json }} + helm_matrix_json: ${{ steps.helm-values.outputs.helm_matrix_json }} steps: - name: Calculate values for compose id: compose-values run: | if [[ '${{ inputs.acs_version }}' == '23' ]]; then - matrix_json='{"edition": ["enterprise", "community"]}' + compose_matrix_json='{"edition": ["enterprise", "community"]}' elif [[ '${{ inputs.acs_version }}' == '74' ]]; then - matrix_json='{"edition": ["74"]}' + compose_matrix_json='{"edition": ["74"]}' else - matrix_json='{"edition": []}' + compose_matrix_json='{"edition": []}' fi - echo "matrix_json=$matrix_json" >> $GITHUB_OUTPUT + echo "compose_matrix_json=$compose_matrix_json" >> $GITHUB_OUTPUT + + - name: Calculate values for helm + id: helm-values + run: | + if [[ '${{ inputs.acs_version }}' == '23' ]]; then + helm_matrix_json='{"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}' + elif [[ '${{ inputs.acs_version }}' == '74' ]]; then + helm_matrix_json='{"arch": ["amd64"], "edition": ["enterprise"]}' + fi + echo "helm_matrix_json=$helm_matrix_json" >> $GITHUB_OUTPUT compose-test: needs: build-matrix @@ -149,7 +160,7 @@ jobs: if: github.actor != 'dependabot[bot]' strategy: fail-fast: false - matrix: ${{ fromJson(needs.build-matrix.outputs.matrix_json) }} + matrix: ${{ fromJson(needs.build-matrix.outputs.compose_matrix_json) }} env: MERGED_COMPOSE_PATH: test/merged-compose.yaml steps: @@ -202,139 +213,137 @@ jobs: with: output-archive-name: ${{ matrix.edition }}-logs-${{ inputs.acs_version }} -# helm-test: -# needs: build-matrix -# runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} -# if: github.actor != 'dependabot[bot]' -# strategy: -# fail-fast: false -# matrix: -# arch: [arm64, amd64] -# edition: [enterprise, community] -# steps: -# - name: Setup cluster -# uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.2.0 -# with: -# ingress-nginx-ref: controller-v1.8.2 -# metrics: "true" - -# - name: Checkout -# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - -# - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 -# with: -# version: "3.15.2" - -# - name: Login to Quay.io -# uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 -# with: -# registry: quay.io -# username: ${{ secrets.QUAY_USERNAME }} -# password: ${{ secrets.QUAY_PASSWORD }} - -# - name: Log in to the Container registry -# uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 -# with: -# registry: ${{ env.REGISTRY }} -# username: ${{ github.actor }} -# password: ${{ secrets.GITHUB_TOKEN }} - -# - name: Create registries auth secret -# run: >- -# kubectl create secret generic regcred -# --from-file=.dockerconfigjson=$HOME/.docker/config.json -# --type=kubernetes.io/dockerconfigjson - -# - name: Create configmaps for adf apps -# run: | -# kubectl create configmap acc-config --from-file=app.config.json=test/configs/acc.json -# kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json - -# - name: Checkout acs-deployment sources -# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 -# with: -# repository: Alfresco/acs-deployment -# ref: ${{ inputs.acs_deployment_version }} -# path: acs-deployment - -# - name: Setup helm repository -# working-directory: acs-deployment/helm/alfresco-content-services -# run: | -# helm repo add self https://alfresco.github.io/alfresco-helm-charts/ -# helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts -# helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ -# helm repo add elastic https://helm.elastic.co -# helm dependency build - -# - name: Preprocess test-overrides.yaml -# env: -# OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml -# run: | -# sed -i "s|localhost/alfresco/|${REGISTRY}/${REGISTRY_NAMESPACE}/|g" ${{ env.OVERRIDES_VALUES_FILE }} -# sed -i "s|tag: latest|tag: ${TAG}|g" ${{ env.OVERRIDES_VALUES_FILE }} - -# if [ "${{ matrix.edition }}" = "community" ]; then -# sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }} -# sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }} -# fi - -# cat ${{ env.OVERRIDES_VALUES_FILE }} - -# - name: Helm install -# id: helm_install -# run: | -# helm install acs ./acs-deployment/helm/alfresco-content-services \ -# --set global.search.sharedSecret="$(openssl rand -hex 24)" \ -# --set global.known_urls=http://localhost \ -# --set global.alfrescoRegistryPullSecrets=regcred \ -# --values ./acs-deployment/helm/alfresco-content-services/${{ matrix.edition == 'community' && 'community_' || '' }}values.yaml \ -# --values ./acs-deployment/test/${{ matrix.edition }}-integration-test-values.yaml \ -# --values test/helm/test-overrides.yaml \ -# --values test/helm/test-overrides-${{ matrix.edition }}.yaml - -# - name: Watch Helm deployment -# env: -# HELM_INSTALL_TIMEOUT: 10m -# run: | -# kubectl get pods --watch & -# KWPID=$! -# kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Ready pods -# kill $KWPID - -# if [ "${{ matrix.edition }}" = "enterprise" ]; then -# echo "Waiting for Enterprise Search Reindexing job to complete... " -# kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing -# fi - -# - name: Debug cluster status after install -# if: always() && steps.helm_install.outcome != 'skipped' -# run: | -# helm ls --all-namespaces --all -# kubectl get all --all-namespaces -# kubectl describe pod - -# - name: Run helm test -# id: helm_test -# run: helm test acs - -# - name: Debug cluster status after helm test -# if: always() && steps.helm_test.outcome != 'skipped' -# run: | -# kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 -# kubectl get all --all-namespaces -# kubectl describe pod - -# - name: Collect logs from all containers -# if: always() && steps.helm_install.outcome != 'skipped' -# run: | -# mkdir -p logs -# for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do -# kubectl logs $pod -n default > logs/${pod}.log -# done - -# - name: Upload logs as artifact -# if: always() && steps.helm_install.outcome != 'skipped' -# uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3 -# with: -# name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }}-${{ inputs.acs_version}} -# path: logs + helm-test: + needs: build-matrix + runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} + if: github.actor != 'dependabot[bot]' + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.build-matrix.outputs.helm_matrix_json) }} + steps: + - name: Setup cluster + uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.2.0 + with: + ingress-nginx-ref: controller-v1.8.2 + metrics: "true" + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 + with: + version: "3.15.2" + + - name: Login to Quay.io + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Log in to the Container registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create registries auth secret + run: >- + kubectl create secret generic regcred + --from-file=.dockerconfigjson=$HOME/.docker/config.json + --type=kubernetes.io/dockerconfigjson + + - name: Create configmaps for adf apps + run: | + kubectl create configmap acc-config --from-file=app.config.json=test/configs/acc.json + kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json + + - name: Checkout acs-deployment sources + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: Alfresco/acs-deployment + ref: ${{ inputs.acs_deployment_version }} + path: acs-deployment + + - name: Setup helm repository + working-directory: acs-deployment/helm/alfresco-content-services + run: | + helm repo add self https://alfresco.github.io/alfresco-helm-charts/ + helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts + helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ + helm repo add elastic https://helm.elastic.co + helm dependency build + + - name: Preprocess test-overrides.yaml + env: + OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml + run: | + sed -i "s|localhost/alfresco/|${REGISTRY}/${REGISTRY_NAMESPACE}/|g" ${{ env.OVERRIDES_VALUES_FILE }} + sed -i "s|tag: latest|tag: ${TAG}|g" ${{ env.OVERRIDES_VALUES_FILE }} + + if [ "${{ matrix.edition }}" = "community" ]; then + sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }} + sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }} + fi + + cat ${{ env.OVERRIDES_VALUES_FILE }} + + - name: Helm install + id: helm_install + run: | + helm install acs ./acs-deployment/helm/alfresco-content-services \ + --set global.search.sharedSecret="$(openssl rand -hex 24)" \ + --set global.known_urls=http://localhost \ + --set global.alfrescoRegistryPullSecrets=regcred \ + --values ./acs-deployment/helm/alfresco-content-services/${{ matrix.edition == 'community' && 'community_' || '' }}values.yaml \ + --values ./acs-deployment/test/${{ matrix.edition == 'community' && 'community' || 'enterprise' }}-integration-test-values.yaml \ + --values test/helm/test-overrides.yaml \ + --values test/helm/test-overrides-${{ matrix.edition }}.yaml + + - name: Watch Helm deployment + env: + HELM_INSTALL_TIMEOUT: 10m + run: | + kubectl get pods --watch & + KWPID=$! + kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Ready pods + kill $KWPID + + if [ "${{ matrix.edition }}" = "enterprise" ]; then + echo "Waiting for Enterprise Search Reindexing job to complete... " + kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing + fi + + - name: Debug cluster status after install + if: always() && steps.helm_install.outcome != 'skipped' + run: | + helm ls --all-namespaces --all + kubectl get all --all-namespaces + kubectl describe pod + + - name: Run helm test + id: helm_test + run: helm test acs + + - name: Debug cluster status after helm test + if: always() && steps.helm_test.outcome != 'skipped' + run: | + kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 + kubectl get all --all-namespaces + kubectl describe pod + + - name: Collect logs from all containers + if: always() && steps.helm_install.outcome != 'skipped' + run: | + mkdir -p logs + for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do + kubectl logs $pod -n default > logs/${pod}.log + done + + - name: Upload logs as artifact + if: always() && steps.helm_install.outcome != 'skipped' + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3 + with: + name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }} + path: logs From f52121cf921f316bc0ff7f4d042cee199ab7fa51 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 15:26:21 +0100 Subject: [PATCH 17/37] change base helm values --- .github/workflows/reusuable_build_and_test.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index d943c436..93ab9152 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -150,7 +150,7 @@ jobs: if [[ '${{ inputs.acs_version }}' == '23' ]]; then helm_matrix_json='{"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}' elif [[ '${{ inputs.acs_version }}' == '74' ]]; then - helm_matrix_json='{"arch": ["amd64"], "edition": ["enterprise"]}' + helm_matrix_json='{"arch": ["amd64"], "edition": ["74"]}' fi echo "helm_matrix_json=$helm_matrix_json" >> $GITHUB_OUTPUT @@ -289,6 +289,17 @@ jobs: cat ${{ env.OVERRIDES_VALUES_FILE }} + - name: Set path to compose files + id: set-helm-values + run: | + if [[ "${{ matrix.edition }}" == "74" ]]; then + echo "UPSTREAM_HELM_VALUES=7.4.N_values.yaml" >> $GITHUB_ENV + elif [[ "${{ matrix.edition }}" == "community" ]]; then + echo "UPSTREAM_HELM_VALUES=community_values.yaml" >> $GITHUB_ENV + else + echo "UPSTREAM_HELM_VALUES=values.yaml" >> $GITHUB_ENV + fi + - name: Helm install id: helm_install run: | @@ -296,7 +307,7 @@ jobs: --set global.search.sharedSecret="$(openssl rand -hex 24)" \ --set global.known_urls=http://localhost \ --set global.alfrescoRegistryPullSecrets=regcred \ - --values ./acs-deployment/helm/alfresco-content-services/${{ matrix.edition == 'community' && 'community_' || '' }}values.yaml \ + --values ./acs-deployment/helm/alfresco-content-services/${{ env.UPSTREAM_HELM_VALUES }} \ --values ./acs-deployment/test/${{ matrix.edition == 'community' && 'community' || 'enterprise' }}-integration-test-values.yaml \ --values test/helm/test-overrides.yaml \ --values test/helm/test-overrides-${{ matrix.edition }}.yaml From f5995e19fd7099f93604146adf4359cd88f121e2 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 16:29:59 +0100 Subject: [PATCH 18/37] try without completly changing functionality of fetch-artifacts script --- .github/workflows/reusuable_build_and_test.yml | 4 +++- scripts/fetch-artifacts.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index 93ab9152..bcece991 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -52,7 +52,9 @@ jobs: path: artifacts_cache/** - name: Fetch artifacts from nexus - run: ./scripts/fetch-artifacts.sh ${{ inputs.acs_version }} + env: + ACS_VERSION: ${{ inputs.acs_version }} + run: ./scripts/fetch-artifacts.sh - name: Save packages artifacts if: steps.artifacts-cache.outputs.cache-hit != 'true' diff --git a/scripts/fetch-artifacts.sh b/scripts/fetch-artifacts.sh index 70b69960..1380060f 100755 --- a/scripts/fetch-artifacts.sh +++ b/scripts/fetch-artifacts.sh @@ -41,7 +41,7 @@ do_fetch_mvn() { done } -TARGETS=$(find "${REPO_ROOT}" -regex "${REPO_ROOT}/${2:+$2/}.*" -name artifacts.json -mindepth 2 -print) +TARGETS=$(find "${REPO_ROOT}" -regex "${REPO_ROOT}/${1:+$1/}.*" -name artifacts.json -mindepth 2 -print) for i in $TARGETS ; do do_fetch_mvn $i From 1bd2c9948c6dfa4c3bca79df7e44c8ccd12a7a55 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 17:00:33 +0100 Subject: [PATCH 19/37] fine tune build matrix job --- .../workflows/reusuable_build_and_test.yml | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml index bcece991..f3f321d9 100644 --- a/.github/workflows/reusuable_build_and_test.yml +++ b/.github/workflows/reusuable_build_and_test.yml @@ -131,30 +131,19 @@ jobs: runs-on: ubuntu-latest if: github.actor != 'dependabot[bot]' outputs: - compose_matrix_json: ${{ steps.compose-values.outputs.compose_matrix_json }} - helm_matrix_json: ${{ steps.helm-values.outputs.helm_matrix_json }} + compose_matrix_json: ${{ steps.set-matrix.outputs.compose_matrix_json }} + helm_matrix_json: ${{ steps.set-matrix.outputs.helm_matrix_json }} steps: - - name: Calculate values for compose - id: compose-values + - name: Set matrix values for Compose and Helm + id: set-matrix run: | - if [[ '${{ inputs.acs_version }}' == '23' ]]; then - compose_matrix_json='{"edition": ["enterprise", "community"]}' - elif [[ '${{ inputs.acs_version }}' == '74' ]]; then - compose_matrix_json='{"edition": ["74"]}' - else - compose_matrix_json='{"edition": []}' - fi - echo "compose_matrix_json=$compose_matrix_json" >> $GITHUB_OUTPUT - - - name: Calculate values for helm - id: helm-values - run: | - if [[ '${{ inputs.acs_version }}' == '23' ]]; then - helm_matrix_json='{"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}' - elif [[ '${{ inputs.acs_version }}' == '74' ]]; then - helm_matrix_json='{"arch": ["amd64"], "edition": ["74"]}' + if [[ "${{ inputs.acs_version }}" == "23" ]]; then + echo 'compose_matrix_json={"edition": ["enterprise", "community"]}' >> $GITHUB_OUTPUT + echo 'helm_matrix_json={"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}' >> $GITHUB_OUTPUT + elif [[ "${{ inputs.acs_version }}" == "74" ]]; then + echo 'compose_matrix_json={"edition": ["74"]}' >> $GITHUB_OUTPUT + echo 'helm_matrix_json={"arch": ["amd64"], "edition": ["74"]}' >> $GITHUB_OUTPUT fi - echo "helm_matrix_json=$helm_matrix_json" >> $GITHUB_OUTPUT compose-test: needs: build-matrix From 39f380a44c44f54c1e6a44e8bcbb7d478bcb5a15 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 5 Nov 2024 17:29:31 +0100 Subject: [PATCH 20/37] dont fetch 73 for now --- scripts/fetch-compose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch-compose.sh b/scripts/fetch-compose.sh index f146ce0a..4812d13e 100755 --- a/scripts/fetch-compose.sh +++ b/scripts/fetch-compose.sh @@ -10,7 +10,7 @@ if [ "$#" -ne 1 ]; then fi ACS_DEPLOYMENT_VERSION="$1" -COMPOSE_FILES=(compose.yaml community-compose.yaml 7.4.N-compose.yaml 7.3.N-compose.yaml) +COMPOSE_FILES=(compose.yaml community-compose.yaml 7.4.N-compose.yaml) DESTINATION_DIR="$(dirname "$0")/../test" for COMPOSE_FILE in "${COMPOSE_FILES[@]}"; do From 91742c3af9a4d4dfff2f1026486e7438bd73ccb4 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 6 Nov 2024 16:11:45 +0100 Subject: [PATCH 21/37] addres the review --- .../workflows/reusuable_build_and_test.yml | 351 ------------------ 1 file changed, 351 deletions(-) delete mode 100644 .github/workflows/reusuable_build_and_test.yml diff --git a/.github/workflows/reusuable_build_and_test.yml b/.github/workflows/reusuable_build_and_test.yml deleted file mode 100644 index f3f321d9..00000000 --- a/.github/workflows/reusuable_build_and_test.yml +++ /dev/null @@ -1,351 +0,0 @@ -name: CI - -on: - workflow_call: - inputs: - registry: - description: 'Container registry' - required: true - type: string - registry_namespace: - description: 'Registry namespace' - required: true - type: string - tag: - description: 'Tag for the Docker images' - required: true - type: string - acs_version: - description: 'Version of ACS to build' - required: true - type: string - acs_deployment_version: - description: 'ACS deployment version' - required: true - type: string - -env: - REGISTRY: ${{ inputs.registry }} - REGISTRY_NAMESPACE: ${{ inputs.registry_namespace }} - TAG: ${{ inputs.tag }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0 - - - name: Setup nexus authentication - run: | - echo "machine nexus.alfresco.com" >> ~/.netrc - echo "login ${{ secrets.NEXUS_USERNAME }}" >> ~/.netrc - echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc - - - name: Restore packages artifacts - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: artifacts-cache - with: - key: ${{ runner.os }}-packages-v2-${{ hashFiles('**/artifacts.json') }}-${{ inputs.acs_version }} - path: artifacts_cache/** - - - name: Fetch artifacts from nexus - env: - ACS_VERSION: ${{ inputs.acs_version }} - run: ./scripts/fetch-artifacts.sh - - - name: Save packages artifacts - if: steps.artifacts-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - with: - key: ${{ steps.artifacts-cache.outputs.cache-primary-key }} - path: artifacts_cache/** - - - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - - - name: Login to Quay.io - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - if: github.actor != 'dependabot[bot]' - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Log in to the Container registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - if: github.actor != 'dependabot[bot]' - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Collect Workflow Telemetry - uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 - with: - comment_on_pr: false - - - name: Enumerate bake targets - id: bake-targets - uses: docker/bake-action/subaction/list-targets@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 - with: - target: default - - - name: Enumerate registry cache targets - id: cache-targets - env: - CACHE_TARGET: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/bakery-cache - run: | - echo 'cache-set<> $GITHUB_OUTPUT - echo '${{ steps.bake-targets.outputs.targets }}' | jq -r '.[] | '\ - '"\(.).cache-from=type=registry,ref=${{ env.CACHE_TARGET }}:${{ inputs.tag }}-\(.)\n'\ - '\(.).cache-from=type=registry,ref=${{ env.CACHE_TARGET }}:${{ github.event.repository.default_branch }}-\(.)\n'\ - '\(.).cache-to=type=registry,ref=${{ env.CACHE_TARGET }}:${{ inputs.tag }}-\(.)"' >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT - - - name: Set Tomcat environment variables - run: | - if [[ '${{ inputs.acs_version }}' != '23' ]]; then - echo "TOMCAT_MAJOR=9" >> $GITHUB_ENV - echo "TOMCAT_VERSION=9.0.96" >> $GITHUB_ENV - echo "TOMCAT_SHA512=ef3ac81debbc3a519c43d1fdb1c88ab26a8052af424d81bceccfbd6e663050a06d7aad7960fd5d11c17849829daebbebf33d92ac1158902283d0e534514aab93" >> $GITHUB_ENV - fi - - - name: Bake Docker images - env: - TARGETARCH: ${{ inputs.acs_version == '23' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - DOCKER_PUSH: ${{ github.actor != 'dependabot[bot]'}} - uses: docker/bake-action@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 - with: - set: | - *.output=type=registry,push=${{ env.DOCKER_PUSH }} - ${{ steps.cache-targets.outputs.cache-set }} - - build-matrix: - needs: build - runs-on: ubuntu-latest - if: github.actor != 'dependabot[bot]' - outputs: - compose_matrix_json: ${{ steps.set-matrix.outputs.compose_matrix_json }} - helm_matrix_json: ${{ steps.set-matrix.outputs.helm_matrix_json }} - steps: - - name: Set matrix values for Compose and Helm - id: set-matrix - run: | - if [[ "${{ inputs.acs_version }}" == "23" ]]; then - echo 'compose_matrix_json={"edition": ["enterprise", "community"]}' >> $GITHUB_OUTPUT - echo 'helm_matrix_json={"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}' >> $GITHUB_OUTPUT - elif [[ "${{ inputs.acs_version }}" == "74" ]]; then - echo 'compose_matrix_json={"edition": ["74"]}' >> $GITHUB_OUTPUT - echo 'helm_matrix_json={"arch": ["amd64"], "edition": ["74"]}' >> $GITHUB_OUTPUT - fi - - compose-test: - needs: build-matrix - runs-on: ${{ matrix.edition == 'enterprise' && 'alfrescoPub-ubuntu2204-16G-4CPU' || 'ubuntu-latest' }} - if: github.actor != 'dependabot[bot]' - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.build-matrix.outputs.compose_matrix_json) }} - env: - MERGED_COMPOSE_PATH: test/merged-compose.yaml - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Log in to the Container registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - - - name: Fetch compose from acs-deployment - run: ./scripts/fetch-compose.sh ${{ inputs.acs_deployment_version }} - - - name: Set path to compose files - id: set-compose-path - run: | - if [[ "${{ matrix.edition }}" == "74" ]]; then - echo "UPSTREAM_COMPOSE_PATH=test/7.4.N-compose.yaml" >> $GITHUB_ENV - elif [[ "${{ matrix.edition }}" == "community" ]]; then - echo "UPSTREAM_COMPOSE_PATH=test/community-compose.yaml" >> $GITHUB_ENV - else - echo "UPSTREAM_COMPOSE_PATH=test/compose.yaml" >> $GITHUB_ENV - fi - - - name: Merge Docker Compose files - env: - OVERRIDE_COMPOSE_PATH: test/${{ matrix.edition }}-override.yaml - run: docker compose -f ${{ env.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} - - - name: Verify docker-compose (${{ matrix.edition }}) - id: verify_compose - uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v8.2.0 - timeout-minutes: 10 - with: - postman_path: test/postman/docker-compose - postman_json: acs-test-docker-compose-collection.json - compose_file_path: ${{ env.MERGED_COMPOSE_PATH }} - quay_username: ${{ secrets.QUAY_USERNAME }} - quay_password: ${{ secrets.QUAY_PASSWORD }} - - - name: Save containers logs (${{ matrix.edition }}) - if: always() && steps.verify_compose.outcome != 'skipped' - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v8.2.0 - with: - output-archive-name: ${{ matrix.edition }}-logs-${{ inputs.acs_version }} - - helm-test: - needs: build-matrix - runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} - if: github.actor != 'dependabot[bot]' - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.build-matrix.outputs.helm_matrix_json) }} - steps: - - name: Setup cluster - uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.2.0 - with: - ingress-nginx-ref: controller-v1.8.2 - metrics: "true" - - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 - with: - version: "3.15.2" - - - name: Login to Quay.io - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Log in to the Container registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Create registries auth secret - run: >- - kubectl create secret generic regcred - --from-file=.dockerconfigjson=$HOME/.docker/config.json - --type=kubernetes.io/dockerconfigjson - - - name: Create configmaps for adf apps - run: | - kubectl create configmap acc-config --from-file=app.config.json=test/configs/acc.json - kubectl create configmap adw-config --from-file=app.config.json=test/configs/adw.json - - - name: Checkout acs-deployment sources - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - repository: Alfresco/acs-deployment - ref: ${{ inputs.acs_deployment_version }} - path: acs-deployment - - - name: Setup helm repository - working-directory: acs-deployment/helm/alfresco-content-services - run: | - helm repo add self https://alfresco.github.io/alfresco-helm-charts/ - helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts - helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - helm repo add elastic https://helm.elastic.co - helm dependency build - - - name: Preprocess test-overrides.yaml - env: - OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml - run: | - sed -i "s|localhost/alfresco/|${REGISTRY}/${REGISTRY_NAMESPACE}/|g" ${{ env.OVERRIDES_VALUES_FILE }} - sed -i "s|tag: latest|tag: ${TAG}|g" ${{ env.OVERRIDES_VALUES_FILE }} - - if [ "${{ matrix.edition }}" = "community" ]; then - sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }} - sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }} - fi - - cat ${{ env.OVERRIDES_VALUES_FILE }} - - - name: Set path to compose files - id: set-helm-values - run: | - if [[ "${{ matrix.edition }}" == "74" ]]; then - echo "UPSTREAM_HELM_VALUES=7.4.N_values.yaml" >> $GITHUB_ENV - elif [[ "${{ matrix.edition }}" == "community" ]]; then - echo "UPSTREAM_HELM_VALUES=community_values.yaml" >> $GITHUB_ENV - else - echo "UPSTREAM_HELM_VALUES=values.yaml" >> $GITHUB_ENV - fi - - - name: Helm install - id: helm_install - run: | - helm install acs ./acs-deployment/helm/alfresco-content-services \ - --set global.search.sharedSecret="$(openssl rand -hex 24)" \ - --set global.known_urls=http://localhost \ - --set global.alfrescoRegistryPullSecrets=regcred \ - --values ./acs-deployment/helm/alfresco-content-services/${{ env.UPSTREAM_HELM_VALUES }} \ - --values ./acs-deployment/test/${{ matrix.edition == 'community' && 'community' || 'enterprise' }}-integration-test-values.yaml \ - --values test/helm/test-overrides.yaml \ - --values test/helm/test-overrides-${{ matrix.edition }}.yaml - - - name: Watch Helm deployment - env: - HELM_INSTALL_TIMEOUT: 10m - run: | - kubectl get pods --watch & - KWPID=$! - kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Ready pods - kill $KWPID - - if [ "${{ matrix.edition }}" = "enterprise" ]; then - echo "Waiting for Enterprise Search Reindexing job to complete... " - kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing - fi - - - name: Debug cluster status after install - if: always() && steps.helm_install.outcome != 'skipped' - run: | - helm ls --all-namespaces --all - kubectl get all --all-namespaces - kubectl describe pod - - - name: Run helm test - id: helm_test - run: helm test acs - - - name: Debug cluster status after helm test - if: always() && steps.helm_test.outcome != 'skipped' - run: | - kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 - kubectl get all --all-namespaces - kubectl describe pod - - - name: Collect logs from all containers - if: always() && steps.helm_install.outcome != 'skipped' - run: | - mkdir -p logs - for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do - kubectl logs $pod -n default > logs/${pod}.log - done - - - name: Upload logs as artifact - if: always() && steps.helm_install.outcome != 'skipped' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3 - with: - name: k8s-logs-${{ matrix.arch }}-${{ matrix.edition }} - path: logs From e4503a984319c7c6dbebce63940e79eec929dbcc Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 6 Nov 2024 17:01:02 +0100 Subject: [PATCH 22/37] use the tomcat function for now --- .github/workflows/reusable_build_and_test.yml | 1 + docker-bake.hcl | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_build_and_test.yml b/.github/workflows/reusable_build_and_test.yml index 211e8f41..c7239d80 100644 --- a/.github/workflows/reusable_build_and_test.yml +++ b/.github/workflows/reusable_build_and_test.yml @@ -112,6 +112,7 @@ jobs: - name: Bake Docker images env: + ACS_VERSION: ${{ inputs.acs_version }} TARGETARCH: ${{ inputs.acs_version == '23' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} DOCKER_PUSH: ${{ github.actor != 'dependabot[bot]'}} uses: docker/bake-action@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 diff --git a/docker-bake.hcl b/docker-bake.hcl index aba989b8..44b2f67e 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -150,16 +150,27 @@ target "java_base" { platforms = split(",", "${TARGETARCH}") } +variable "ACS_VERSION" { + default = "23" +} + +function "determine_tomcat_version" { + params = [acs_version, tomcat10, tomcat9] + result = acs_version == "23" ? tomcat10 : tomcat9 +} + variable "TOMCAT_MAJOR" { - default = "10" + default = determine_tomcat_version("${ACS_VERSION}", "10", "9") } variable "TOMCAT_VERSION" { - default = "10.1.31" + default = determine_tomcat_version("${ACS_VERSION}", "10.1.31", "9.0.96") } variable "TOMCAT_SHA512" { - default = "0e3d423a843e2d9ba4f28a9f0a2f1073d5a1389557dfda041759f8df968bace63cd6948bd76df2727b5133ddb7c33e05dab43cea1d519ca0b6d519461152cce9" + default = determine_tomcat_version("${ACS_VERSION}", + "0e3d423a843e2d9ba4f28a9f0a2f1073d5a1389557dfda041759f8df968bace63cd6948bd76df2727b5133ddb7c33e05dab43cea1d519ca0b6d519461152cce9", + "ef3ac81debbc3a519c43d1fdb1c88ab26a8052af424d81bceccfbd6e663050a06d7aad7960fd5d11c17849829daebbebf33d92ac1158902283d0e534514aab93") } variable "TCNATIVE_VERSION" { From 95b30a01f0fa85ef6da283d292bbaed656463c46 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 6 Nov 2024 18:00:23 +0100 Subject: [PATCH 23/37] try script on workflow --- .github/workflows/reusable_build_and_test.yml | 1 - docker-bake.hcl | 17 +++---------- scripts/determine-tomcat-version.sh | 24 +++++++++++++++++++ 3 files changed, 27 insertions(+), 15 deletions(-) create mode 100755 scripts/determine-tomcat-version.sh diff --git a/.github/workflows/reusable_build_and_test.yml b/.github/workflows/reusable_build_and_test.yml index c7239d80..211e8f41 100644 --- a/.github/workflows/reusable_build_and_test.yml +++ b/.github/workflows/reusable_build_and_test.yml @@ -112,7 +112,6 @@ jobs: - name: Bake Docker images env: - ACS_VERSION: ${{ inputs.acs_version }} TARGETARCH: ${{ inputs.acs_version == '23' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} DOCKER_PUSH: ${{ github.actor != 'dependabot[bot]'}} uses: docker/bake-action@2e3d19baedb14545e5d41222653874f25d5b4dfb # v5.10.0 diff --git a/docker-bake.hcl b/docker-bake.hcl index 44b2f67e..aba989b8 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -150,27 +150,16 @@ target "java_base" { platforms = split(",", "${TARGETARCH}") } -variable "ACS_VERSION" { - default = "23" -} - -function "determine_tomcat_version" { - params = [acs_version, tomcat10, tomcat9] - result = acs_version == "23" ? tomcat10 : tomcat9 -} - variable "TOMCAT_MAJOR" { - default = determine_tomcat_version("${ACS_VERSION}", "10", "9") + default = "10" } variable "TOMCAT_VERSION" { - default = determine_tomcat_version("${ACS_VERSION}", "10.1.31", "9.0.96") + default = "10.1.31" } variable "TOMCAT_SHA512" { - default = determine_tomcat_version("${ACS_VERSION}", - "0e3d423a843e2d9ba4f28a9f0a2f1073d5a1389557dfda041759f8df968bace63cd6948bd76df2727b5133ddb7c33e05dab43cea1d519ca0b6d519461152cce9", - "ef3ac81debbc3a519c43d1fdb1c88ab26a8052af424d81bceccfbd6e663050a06d7aad7960fd5d11c17849829daebbebf33d92ac1158902283d0e534514aab93") + default = "0e3d423a843e2d9ba4f28a9f0a2f1073d5a1389557dfda041759f8df968bace63cd6948bd76df2727b5133ddb7c33e05dab43cea1d519ca0b6d519461152cce9" } variable "TCNATIVE_VERSION" { diff --git a/scripts/determine-tomcat-version.sh b/scripts/determine-tomcat-version.sh new file mode 100755 index 00000000..d71e75ea --- /dev/null +++ b/scripts/determine-tomcat-version.sh @@ -0,0 +1,24 @@ +#!/bin/bash -e + +# Determine the Tomcat version to use based on the acs version +# The acs version is passed as an argument to this script +# Example: ./scripts/determine-tomcat-version.sh 23 + +# Check if the acs version is passed as an argument +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +ACS_VERSION=$1 +TOMCAT_VERSIONS_FILE="tomcat/tomcat_versions.yaml" + +if [[ $ACS_VERSION == "23" ]]; then + tomcat_field="tomcat10" +else + tomcat_field="tomcat9" +fi + +export TOMCAT_MAJOR=$(yq e ".${tomcat_field}.major" $TOMCAT_VERSIONS_FILE) +export TOMCAT_VERSION=$(yq e ".${tomcat_field}.version" $TOMCAT_VERSIONS_FILE) +export TOMCAT_SHA512=$(yq e ".${tomcat_field}.sha512" $TOMCAT_VERSIONS_FILE) From 8c7691da4fe0132a0bcdc26fd07e1bfd73f8faac Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 10:45:22 +0100 Subject: [PATCH 24/37] remove the script add make tomcat versions determine change the step tomcat versions --- artifacts_cache/.gitkeep | 0 scripts/determine-tomcat-version.sh | 24 ------------------------ 2 files changed, 24 deletions(-) delete mode 100644 artifacts_cache/.gitkeep delete mode 100755 scripts/determine-tomcat-version.sh diff --git a/artifacts_cache/.gitkeep b/artifacts_cache/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/determine-tomcat-version.sh b/scripts/determine-tomcat-version.sh deleted file mode 100755 index d71e75ea..00000000 --- a/scripts/determine-tomcat-version.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -e - -# Determine the Tomcat version to use based on the acs version -# The acs version is passed as an argument to this script -# Example: ./scripts/determine-tomcat-version.sh 23 - -# Check if the acs version is passed as an argument -if [ -z "$1" ]; then - echo "Usage: $0 " - exit 1 -fi - -ACS_VERSION=$1 -TOMCAT_VERSIONS_FILE="tomcat/tomcat_versions.yaml" - -if [[ $ACS_VERSION == "23" ]]; then - tomcat_field="tomcat10" -else - tomcat_field="tomcat9" -fi - -export TOMCAT_MAJOR=$(yq e ".${tomcat_field}.major" $TOMCAT_VERSIONS_FILE) -export TOMCAT_VERSION=$(yq e ".${tomcat_field}.version" $TOMCAT_VERSIONS_FILE) -export TOMCAT_SHA512=$(yq e ".${tomcat_field}.sha512" $TOMCAT_VERSIONS_FILE) From 1cd0aefe949e7f3bd6c0ebdc01137fde2a6b6e7a Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 10:47:16 +0100 Subject: [PATCH 25/37] missing folder From e36d83fa14788ecc1e196fa024d7acd1e1bfb64c Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 10:50:52 +0100 Subject: [PATCH 26/37] add gikeep --- artifacts_cache/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 artifacts_cache/.gitkeep diff --git a/artifacts_cache/.gitkeep b/artifacts_cache/.gitkeep new file mode 100644 index 00000000..e69de29b From 59080592f414ff699272d2042d2078c9e57926e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Maciusiak?= <158472457+pmacius@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:43:47 +0100 Subject: [PATCH 27/37] Update .github/workflows/reusable_build_and_test.yml Co-authored-by: Giovanni Toraldo <71768+gionn@users.noreply.github.com> --- .github/workflows/reusable_build_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable_build_and_test.yml b/.github/workflows/reusable_build_and_test.yml index 211e8f41..9fda6264 100644 --- a/.github/workflows/reusable_build_and_test.yml +++ b/.github/workflows/reusable_build_and_test.yml @@ -1,4 +1,5 @@ -name: CI +name: Build and Test +run-name: Build v${{ inputs.acs_version }} on: workflow_call: From 47710e227f84638b304321048949f2fea917aecd Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 12:57:50 +0100 Subject: [PATCH 28/37] Revert "Update .github/workflows/reusable_build_and_test.yml" This reverts commit 7a064910f348d579738ea53ccf14d1678a14da7d. --- .github/workflows/reusable_build_and_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/reusable_build_and_test.yml b/.github/workflows/reusable_build_and_test.yml index 9fda6264..211e8f41 100644 --- a/.github/workflows/reusable_build_and_test.yml +++ b/.github/workflows/reusable_build_and_test.yml @@ -1,5 +1,4 @@ -name: Build and Test -run-name: Build v${{ inputs.acs_version }} +name: CI on: workflow_call: From 4783660cdc78544efa7ecc75ede6f715a329b67a Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 15:11:02 +0100 Subject: [PATCH 29/37] fix cleanup --- .github/workflows/cleanup_images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cleanup_images.yml b/.github/workflows/cleanup_images.yml index 27a7522a..1dfd5eee 100644 --- a/.github/workflows/cleanup_images.yml +++ b/.github/workflows/cleanup_images.yml @@ -61,6 +61,7 @@ jobs: packages: ${{ env.PACKAGE_NAMES }} delete-tags: ${{ env.PR_TAGS }} dry-run: false + use-regex: true - name: Remove images when requested uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066 # v1.0.13 From c01d34271f76d7ced4ea15af656c0ce245d0e322 Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 17:30:17 +0100 Subject: [PATCH 30/37] OPSEXP-2921 Add ACS version 7.3 --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/reusable_build_and_test.yml | 7 +++ adf-apps/acc/artifacts.json | 10 ++++ adf-apps/adw/artifacts.json | 10 ++++ ats/sfs/artifacts.json | 10 ++++ ats/trouter/artifacts.json | 10 ++++ connector/ms365/artifacts.json | 10 ++++ connector/msteams/artifacts.json | 10 ++++ repository/artifacts.json | 58 +++++++++++++++++++ search/enterprise/all-in-one/artifacts.json | 10 ++++ search/enterprise/common/artifacts.json | 42 ++++++++++++++ search/enterprise/reindexing/artifacts.json | 10 ++++ search/service/artifacts.json | 10 ++++ share/artifacts.json | 26 +++++++++ sync/artifacts.json | 18 ++++++ tengine/aio/artifacts.json | 10 ++++ tengine/imagemagick/artifacts.json | 42 ++++++++++++++ tengine/libreoffice/artifacts.json | 18 ++++++ tengine/misc/artifacts.json | 10 ++++ tengine/pdfrenderer/artifacts.json | 26 +++++++++ tengine/tika/artifacts.json | 10 ++++ 21 files changed, 358 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index be74e890..8bd8bcac 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -48,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - version: [23, 74] + version: [23, 74, 73] with: tag: ${{ github.event_name == 'pull_request' && format('pr-{0}-v{1}', github.event.pull_request.number, matrix.version) || format('{0}-v{1}', github.ref_name, matrix.version) }} acs_version: ${{ matrix.version }} diff --git a/.github/workflows/reusable_build_and_test.yml b/.github/workflows/reusable_build_and_test.yml index 211e8f41..f53bb2ed 100644 --- a/.github/workflows/reusable_build_and_test.yml +++ b/.github/workflows/reusable_build_and_test.yml @@ -137,6 +137,9 @@ jobs: elif [[ "${{ inputs.acs_version }}" == "74" ]]; then echo 'compose_matrix_json={"edition": ["74"]}' >> $GITHUB_OUTPUT echo 'helm_matrix_json={"arch": ["amd64"], "edition": ["74"]}' >> $GITHUB_OUTPUT + elif [[ "${{ inputs.acs_version }}" == "73" ]]; then + echo 'compose_matrix_json={"edition": ["73"]}' >> $GITHUB_OUTPUT + echo 'helm_matrix_json={"arch": ["amd64"], "edition": ["73"]}' >> $GITHUB_OUTPUT fi compose-test: @@ -170,6 +173,8 @@ jobs: run: | if [[ "${{ matrix.edition }}" == "74" ]]; then echo "UPSTREAM_COMPOSE_PATH=test/7.4.N-compose.yaml" >> $GITHUB_ENV + elif [[ "${{ matrix.edition }}" == "73" ]]; then + echo "UPSTREAM_COMPOSE_PATH=test/7.3.N-compose.yaml" >> $GITHUB_ENV elif [[ "${{ matrix.edition }}" == "community" ]]; then echo "UPSTREAM_COMPOSE_PATH=test/community-compose.yaml" >> $GITHUB_ENV else @@ -279,6 +284,8 @@ jobs: run: | if [[ "${{ matrix.edition }}" == "74" ]]; then echo "UPSTREAM_HELM_VALUES=7.4.N_values.yaml" >> $GITHUB_ENV + elif [[ "${{ matrix.edition }}" == "73" ]]; then + echo "UPSTREAM_HELM_VALUES=7.3.N_values.yaml" >> $GITHUB_ENV elif [[ "${{ matrix.edition }}" == "community" ]]; then echo "UPSTREAM_HELM_VALUES=community_values.yaml" >> $GITHUB_ENV else diff --git a/adf-apps/acc/artifacts.json b/adf-apps/acc/artifacts.json index 960f10c8..492f4a66 100644 --- a/adf-apps/acc/artifacts.json +++ b/adf-apps/acc/artifacts.json @@ -19,6 +19,16 @@ "group": "org.alfresco", "repository": "releases" } + ], + "acs73": [ + { + "name": "alfresco-control-center", + "version": "7.9.0", + "path": "adf-apps/acc", + "classifier": ".zip", + "group": "org.alfresco", + "repository": "releases" + } ] } } diff --git a/adf-apps/adw/artifacts.json b/adf-apps/adw/artifacts.json index 2102b26c..d067833d 100644 --- a/adf-apps/adw/artifacts.json +++ b/adf-apps/adw/artifacts.json @@ -19,6 +19,16 @@ "group": "org.alfresco", "repository": "enterprise-releases" } + ], + "acs73": [ + { + "name": "alfresco-digital-workspace", + "version": "4.4.1", + "path": "adf-apps/adw", + "classifier": ".zip", + "group": "org.alfresco", + "repository": "enterprise-releases" + } ] } } diff --git a/ats/sfs/artifacts.json b/ats/sfs/artifacts.json index 6a834f59..124db83a 100644 --- a/ats/sfs/artifacts.json +++ b/ats/sfs/artifacts.json @@ -19,6 +19,16 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-shared-file-store-controller", + "version": "2.1.2", + "path": "ats/sfs", + "classifier": ".jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/ats/trouter/artifacts.json b/ats/trouter/artifacts.json index c753b9b2..be971cd6 100644 --- a/ats/trouter/artifacts.json +++ b/ats/trouter/artifacts.json @@ -19,6 +19,16 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-transform-router", + "version": "2.1.2", + "path": "ats/trouter", + "classifier": ".jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/connector/ms365/artifacts.json b/connector/ms365/artifacts.json index 65e69b53..eb9b1555 100644 --- a/connector/ms365/artifacts.json +++ b/connector/ms365/artifacts.json @@ -19,6 +19,16 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "onedrive-springboot", + "version": "1.1.3.2", + "path": "connector/ms365", + "classifier": ".jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/connector/msteams/artifacts.json b/connector/msteams/artifacts.json index 2bcefd85..a0ee4833 100644 --- a/connector/msteams/artifacts.json +++ b/connector/msteams/artifacts.json @@ -19,6 +19,16 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-ms-teams-springboot", + "version": "1.1.0", + "path": "connector/msteams", + "classifier": ".jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/repository/artifacts.json b/repository/artifacts.json index e982cbc9..e31cef19 100644 --- a/repository/artifacts.json +++ b/repository/artifacts.json @@ -115,6 +115,64 @@ "group": "org.alfresco", "repository": "public" } + ], + "acs73": [ + { + "name": "postgresql", + "version": "42.6.1", + "classifier": ".jar", + "group": "org.postgresql", + "repository": "public", + "path": "repository/libs" + }, + { + "name": "alfresco-share-services", + "version": "19.15", + "path": "repository/amps", + "classifier": ".amp", + "group": "org.alfresco", + "repository": "releases" + }, + { + "name": "alfresco-aos-module", + "version": "1.5.0", + "path": "repository/amps", + "classifier": ".amp", + "group": "org.alfresco.aos-module", + "repository": "releases" + }, + { + "name": "alfresco-device-sync-repo", + "version": "3.11.3", + "path": "repository/amps_enterprise", + "classifier": ".amp", + "group": "org.alfresco.services.sync", + "repository": "enterprise-releases" + }, + { + "name": "alfresco-googledrive-repo-enterprise", + "version": "3.3.1", + "path": "repository/amps_enterprise", + "classifier": ".amp", + "group": "org.alfresco.integrations", + "repository": "enterprise-releases" + }, + { + "name": "alfresco-content-services-distribution", + "version": "7.3.2.1", + "path": "repository/distribution", + "classifier": ".zip", + "group": "org.alfresco", + "repository": "enterprise-releases" + }, + { + "name": "alfresco-content-services-community-distribution", + "version": "7.3.2", + "path": "repository/distribution", + "classifier": ".zip", + "group": "org.alfresco", + "repository": "public" + } ] } } diff --git a/search/enterprise/all-in-one/artifacts.json b/search/enterprise/all-in-one/artifacts.json index f1590ff4..25099a5a 100644 --- a/search/enterprise/all-in-one/artifacts.json +++ b/search/enterprise/all-in-one/artifacts.json @@ -19,6 +19,16 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-elasticsearch-live-indexing", + "version": "3.2.1", + "path": "search/enterprise/all-in-one", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/search/enterprise/common/artifacts.json b/search/enterprise/common/artifacts.json index dd4794e6..c54c9094 100644 --- a/search/enterprise/common/artifacts.json +++ b/search/enterprise/common/artifacts.json @@ -83,6 +83,48 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-elasticsearch-live-indexing-mediation", + "version": "3.2.1", + "path": "search/enterprise/common", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + }, + { + "name": "alfresco-elasticsearch-live-indexing-metadata", + "version": "3.2.1", + "path": "search/enterprise/common", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + }, + { + "name": "alfresco-elasticsearch-live-indexing-path", + "version": "3.2.1", + "path": "search/enterprise/common", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + }, + { + "name": "alfresco-elasticsearch-live-indexing-content", + "version": "3.2.1", + "path": "search/enterprise/common", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + }, + { + "name": "alfresco-elasticsearch-live-indexing", + "version": "3.2.1", + "path": "search/enterprise/common", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/search/enterprise/reindexing/artifacts.json b/search/enterprise/reindexing/artifacts.json index eb7c1832..616354f1 100644 --- a/search/enterprise/reindexing/artifacts.json +++ b/search/enterprise/reindexing/artifacts.json @@ -19,6 +19,16 @@ "repository": "enterprise-releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-elasticsearch-reindexing", + "version": "3.2.1", + "path": "search/enterprise/reindexing", + "classifier": "-app.jar", + "repository": "enterprise-releases", + "group": "org.alfresco" + } ] } } diff --git a/search/service/artifacts.json b/search/service/artifacts.json index ab299895..1aa39895 100644 --- a/search/service/artifacts.json +++ b/search/service/artifacts.json @@ -19,6 +19,16 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-search-services", + "version": "2.0.12", + "path": "search/service/distribution", + "classifier": ".zip", + "repository": "releases", + "group": "org.alfresco" + } ] } } diff --git a/share/artifacts.json b/share/artifacts.json index 5ec2f7ea..75c55a3f 100644 --- a/share/artifacts.json +++ b/share/artifacts.json @@ -51,6 +51,32 @@ "group": "org.alfresco.integrations", "repository": "releases" } + ], + "acs73": [ + { + "name": "alfresco-content-services-share-distribution", + "version": "7.3.2.1", + "path": "share/distribution", + "classifier": ".zip", + "group": "org.alfresco", + "repository": "enterprise-releases" + }, + { + "name": "alfresco-content-services-community-distribution", + "version": "7.4.2", + "path": "share/distribution", + "classifier": ".zip", + "group": "org.alfresco", + "repository": "public" + }, + { + "name": "alfresco-googledrive-share", + "version": "3.3.1", + "path": "share/amps", + "classifier": ".amp", + "group": "org.alfresco.integrations", + "repository": "releases" + } ] } } diff --git a/sync/artifacts.json b/sync/artifacts.json index 17d41464..1fe13d91 100644 --- a/sync/artifacts.json +++ b/sync/artifacts.json @@ -35,6 +35,24 @@ "repository": "public", "path": "sync/configs/connectors" } + ], + "acs73": [ + { + "name": "sync-dist-6.x", + "version": "3.11.3", + "path": "sync/distribution", + "classifier": ".zip", + "group": "org.alfresco.services.sync", + "repository": "enterprise-releases" + }, + { + "name": "postgresql", + "version": "42.6.1", + "classifier": ".jar", + "group": "org.postgresql", + "repository": "public", + "path": "sync/configs/connectors" + } ] } } diff --git a/tengine/aio/artifacts.json b/tengine/aio/artifacts.json index 9fd32092..87215194 100644 --- a/tengine/aio/artifacts.json +++ b/tengine/aio/artifacts.json @@ -19,6 +19,16 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-transform-core-aio", + "version": "3.1.2", + "path": "tengine/aio", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } ] } } diff --git a/tengine/imagemagick/artifacts.json b/tengine/imagemagick/artifacts.json index e4b34ead..9de99675 100644 --- a/tengine/imagemagick/artifacts.json +++ b/tengine/imagemagick/artifacts.json @@ -83,6 +83,48 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "imagemagick-distribution", + "version": "7.1.0-16-ci-10", + "path": "tengine/imagemagick/libs", + "classifier": "-libs-el9.rpm", + "repository": "thirdparty", + "group": "org.imagemagick" + }, + { + "name": "imagemagick-distribution", + "version": "7.1.0-16-ci-10", + "path": "tengine/imagemagick", + "classifier": "-el9.rpm", + "repository": "thirdparty", + "group": "org.imagemagick" + }, + { + "name": "imagemagick-distribution", + "version": "7.1.0-16-ci-10", + "path": "tengine/imagemagick/libs", + "classifier": "-libs-el9-aarch64.rpm", + "repository": "thirdparty", + "group": "org.imagemagick" + }, + { + "name": "imagemagick-distribution", + "version": "7.1.0-16-ci-10", + "path": "tengine/imagemagick", + "classifier": "-el9-aarch64.rpm", + "repository": "thirdparty", + "group": "org.imagemagick" + }, + { + "name": "alfresco-transform-imagemagick", + "version": "3.1.2", + "path": "tengine/imagemagick", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } ] } } diff --git a/tengine/libreoffice/artifacts.json b/tengine/libreoffice/artifacts.json index c720b08f..2c904f22 100644 --- a/tengine/libreoffice/artifacts.json +++ b/tengine/libreoffice/artifacts.json @@ -35,6 +35,24 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "libreoffice-dist", + "version": "7.2.5", + "path": "tengine/libreoffice", + "classifier": "-linux.gz", + "repository": "thirdparty", + "group": "org.libreoffice" + }, + { + "name": "alfresco-transform-libreoffice", + "version": "3.1.2", + "path": "tengine/libreoffice", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } ] } } diff --git a/tengine/misc/artifacts.json b/tengine/misc/artifacts.json index 42d2c9ec..eeb80d32 100644 --- a/tengine/misc/artifacts.json +++ b/tengine/misc/artifacts.json @@ -19,6 +19,16 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-transform-misc", + "version": "3.1.2", + "path": "tengine/misc", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } ] } } diff --git a/tengine/pdfrenderer/artifacts.json b/tengine/pdfrenderer/artifacts.json index a8481c2b..1171e8e8 100644 --- a/tengine/pdfrenderer/artifacts.json +++ b/tengine/pdfrenderer/artifacts.json @@ -51,6 +51,32 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-pdf-renderer", + "version": "1.1", + "path": "tengine/pdfrenderer", + "classifier": "-linux.tgz", + "repository": "releases", + "group": "org.alfresco" + }, + { + "name": "alfresco-pdf-renderer", + "version": "1.1", + "path": "tengine/pdfrenderer", + "classifier": "-linux-arm.tgz", + "repository": "releases", + "group": "org.alfresco" + }, + { + "name": "alfresco-transform-pdf-renderer", + "version": "3.1.2", + "path": "tengine/pdfrenderer", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } ] } } diff --git a/tengine/tika/artifacts.json b/tengine/tika/artifacts.json index d5ca131d..870cc05a 100644 --- a/tengine/tika/artifacts.json +++ b/tengine/tika/artifacts.json @@ -19,6 +19,16 @@ "repository": "releases", "group": "org.alfresco" } + ], + "acs73": [ + { + "name": "alfresco-transform-tika", + "version": "3.1.2", + "path": "tengine/tika", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } ] } } From 9cd388cafb29e57fd828aa4b77508a4f8774c324 Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 18:09:36 +0100 Subject: [PATCH 31/37] fix repo path --- adf-apps/acc/artifacts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adf-apps/acc/artifacts.json b/adf-apps/acc/artifacts.json index 492f4a66..32275785 100644 --- a/adf-apps/acc/artifacts.json +++ b/adf-apps/acc/artifacts.json @@ -27,7 +27,7 @@ "path": "adf-apps/acc", "classifier": ".zip", "group": "org.alfresco", - "repository": "releases" + "repository": "internal-releases" } ] } From fd7763488c6178829c47bf59e3b5bf1995fe0187 Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 7 Nov 2024 18:12:50 +0100 Subject: [PATCH 32/37] remove pdr renderer 1.1 arm64 --- tengine/pdfrenderer/artifacts.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tengine/pdfrenderer/artifacts.json b/tengine/pdfrenderer/artifacts.json index 1171e8e8..6121bbbf 100644 --- a/tengine/pdfrenderer/artifacts.json +++ b/tengine/pdfrenderer/artifacts.json @@ -61,14 +61,6 @@ "repository": "releases", "group": "org.alfresco" }, - { - "name": "alfresco-pdf-renderer", - "version": "1.1", - "path": "tengine/pdfrenderer", - "classifier": "-linux-arm.tgz", - "repository": "releases", - "group": "org.alfresco" - }, { "name": "alfresco-transform-pdf-renderer", "version": "3.1.2", From 69bc2ac3598527ce388e2e68b67441b72ddfcc64 Mon Sep 17 00:00:00 2001 From: pmacius Date: Fri, 8 Nov 2024 11:29:24 +0100 Subject: [PATCH 33/37] 73 version has a name log4j.properties instead of log4j2.properties --- repository/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Dockerfile b/repository/Dockerfile index a881b76a..22b7c960 100644 --- a/repository/Dockerfile +++ b/repository/Dockerfile @@ -29,7 +29,7 @@ RUN sed -i 's|../modules/platform|modules/platform|' ${CATALINA_HOME}/conf/Catal RUN sed -i \ -re "s|(appender.rolling.fileName\=)(alfresco.log)|\1${CATALINA_HOME}/logs\/\2|" \ -re "s|(appender.rolling.filePattern=)(alfresco.log.%d\{yyyy-MM-dd\})|\1${CATALINA_HOME}/logs\/\2|" \ - ${CATALINA_HOME}/webapps/alfresco/WEB-INF/classes/log4j2.properties + ${CATALINA_HOME}/webapps/alfresco/WEB-INF/classes/log4j*.properties COPY amps /tmp/amps COPY amps_${ALFRESCO_REPO_EDITION} /tmp/amps From 9c8c606f8284ef0cdc10aca0ddfc7f78f2e51fae Mon Sep 17 00:00:00 2001 From: pmacius Date: Fri, 8 Nov 2024 11:47:05 +0100 Subject: [PATCH 34/37] add testing files --- test/73-override.yaml | 39 ++++++++++++++++++++++++++++++++ test/helm/test-overrides-73.yaml | 24 ++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 test/73-override.yaml create mode 100644 test/helm/test-overrides-73.yaml diff --git a/test/73-override.yaml b/test/73-override.yaml new file mode 100644 index 00000000..8e571047 --- /dev/null +++ b/test/73-override.yaml @@ -0,0 +1,39 @@ +services: + alfresco: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-content-repository:${TAG} + transform-router: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-transform-router:${TAG} + transform-core-aio: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-transform-core-aio:${TAG} + shared-file-store: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-shared-file-store:${TAG} + share: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-share:${TAG} + solr6: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-search-service:${TAG} + environment: + # variables specific to image produced by bakery + ALFRESCO_HOST: alfresco + ALFRESCO_PORT: 8080 + SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" + ALFRESCO_SECURECOMMS: secret + ALFRESCO_SECURECOMMS_SECRET: secret + digital-workspace: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-digital-workspace:${TAG} + environment: + BASE_PATH: / + volumes: + - ./configs/adw.json:/usr/share/nginx/html/app.config.json + control-center: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-control-center:${TAG} + environment: + BASE_PATH: / + volumes: + - ./configs/acc.json:/usr/share/nginx/html/app.config.json + sync-service: + image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-sync-service:${TAG} +volumes: + shared-file-store-volume: + driver_opts: + type: tmpfs + device: tmpfs diff --git a/test/helm/test-overrides-73.yaml b/test/helm/test-overrides-73.yaml new file mode 100644 index 00000000..e9d2d83c --- /dev/null +++ b/test/helm/test-overrides-73.yaml @@ -0,0 +1,24 @@ +alfresco-search: + enabled: true +alfresco-search-enterprise: + enabled: false +elasticsearch: + enabled: false +elasticsearch-audit: + enabled: false +kibana-audit: + enabled: false +alfresco-audit-storage: + enabled: false +dtas: + config: + assertions: + acs: + version: 7.3.2 + modules: + - id: org.alfresco.integrations.google.docs + version: 3.3.1 + installed: true + - id: alfresco-aos-module + version: 1.5.0 + installed: true From 8ec9bdf43594ffb98b6f2458695520381b9086cd Mon Sep 17 00:00:00 2001 From: pmacius Date: Fri, 8 Nov 2024 15:43:43 +0100 Subject: [PATCH 35/37] fetch compose for 7.3 --- scripts/fetch-compose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch-compose.sh b/scripts/fetch-compose.sh index 4812d13e..f146ce0a 100755 --- a/scripts/fetch-compose.sh +++ b/scripts/fetch-compose.sh @@ -10,7 +10,7 @@ if [ "$#" -ne 1 ]; then fi ACS_DEPLOYMENT_VERSION="$1" -COMPOSE_FILES=(compose.yaml community-compose.yaml 7.4.N-compose.yaml) +COMPOSE_FILES=(compose.yaml community-compose.yaml 7.4.N-compose.yaml 7.3.N-compose.yaml) DESTINATION_DIR="$(dirname "$0")/../test" for COMPOSE_FILE in "${COMPOSE_FILES[@]}"; do From 232b2ae319c008e02d8b6ab37ceabfa1aa96605d Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 12 Nov 2024 09:49:36 +0100 Subject: [PATCH 36/37] remove leftover --- .github/workflows/cleanup_images.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cleanup_images.yml b/.github/workflows/cleanup_images.yml index 1dfd5eee..27a7522a 100644 --- a/.github/workflows/cleanup_images.yml +++ b/.github/workflows/cleanup_images.yml @@ -61,7 +61,6 @@ jobs: packages: ${{ env.PACKAGE_NAMES }} delete-tags: ${{ env.PR_TAGS }} dry-run: false - use-regex: true - name: Remove images when requested uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066 # v1.0.13 From aa0ac6eee175cb6c24e87152cb2bbf69bb4340d5 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 12 Nov 2024 11:03:34 +0100 Subject: [PATCH 37/37] use common override for version 73 and 74 --- .github/workflows/reusable_build_and_test.yml | 6 ++- test/74-override.yaml | 39 ------------------- ...verride.yaml => solr-search-override.yaml} | 0 3 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 test/74-override.yaml rename test/{73-override.yaml => solr-search-override.yaml} (100%) diff --git a/.github/workflows/reusable_build_and_test.yml b/.github/workflows/reusable_build_and_test.yml index f53bb2ed..876fb160 100644 --- a/.github/workflows/reusable_build_and_test.yml +++ b/.github/workflows/reusable_build_and_test.yml @@ -173,17 +173,19 @@ jobs: run: | if [[ "${{ matrix.edition }}" == "74" ]]; then echo "UPSTREAM_COMPOSE_PATH=test/7.4.N-compose.yaml" >> $GITHUB_ENV + echo "OVERRIDE_COMPOSE_PATH=test/solr-search-override.yaml" >> $GITHUB_ENV elif [[ "${{ matrix.edition }}" == "73" ]]; then echo "UPSTREAM_COMPOSE_PATH=test/7.3.N-compose.yaml" >> $GITHUB_ENV + echo "OVERRIDE_COMPOSE_PATH=test/solr-search-override.yaml" >> $GITHUB_ENV elif [[ "${{ matrix.edition }}" == "community" ]]; then echo "UPSTREAM_COMPOSE_PATH=test/community-compose.yaml" >> $GITHUB_ENV + echo "OVERRIDE_COMPOSE_PATH=test/community-override.yaml" >> $GITHUB_ENV else echo "UPSTREAM_COMPOSE_PATH=test/compose.yaml" >> $GITHUB_ENV + echo "OVERRIDE_COMPOSE_PATH=test/enterprise-override.yaml" >> $GITHUB_ENV fi - name: Merge Docker Compose files - env: - OVERRIDE_COMPOSE_PATH: test/${{ matrix.edition }}-override.yaml run: docker compose -f ${{ env.UPSTREAM_COMPOSE_PATH }} -f ${{ env.OVERRIDE_COMPOSE_PATH }} config > ${{ env.MERGED_COMPOSE_PATH }} - name: Verify docker-compose (${{ matrix.edition }}) diff --git a/test/74-override.yaml b/test/74-override.yaml deleted file mode 100644 index 8e571047..00000000 --- a/test/74-override.yaml +++ /dev/null @@ -1,39 +0,0 @@ -services: - alfresco: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-content-repository:${TAG} - transform-router: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-transform-router:${TAG} - transform-core-aio: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-transform-core-aio:${TAG} - shared-file-store: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-shared-file-store:${TAG} - share: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-share:${TAG} - solr6: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-search-service:${TAG} - environment: - # variables specific to image produced by bakery - ALFRESCO_HOST: alfresco - ALFRESCO_PORT: 8080 - SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" - ALFRESCO_SECURECOMMS: secret - ALFRESCO_SECURECOMMS_SECRET: secret - digital-workspace: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-digital-workspace:${TAG} - environment: - BASE_PATH: / - volumes: - - ./configs/adw.json:/usr/share/nginx/html/app.config.json - control-center: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-control-center:${TAG} - environment: - BASE_PATH: / - volumes: - - ./configs/acc.json:/usr/share/nginx/html/app.config.json - sync-service: - image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-sync-service:${TAG} -volumes: - shared-file-store-volume: - driver_opts: - type: tmpfs - device: tmpfs diff --git a/test/73-override.yaml b/test/solr-search-override.yaml similarity index 100% rename from test/73-override.yaml rename to test/solr-search-override.yaml