OPSEXP-3321: remove 7.3 support from CI #2191
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Helm (Community) | |
on: | |
pull_request: | |
branches: | |
- master | |
- release/** | |
- next/** | |
paths: | |
- helm/** | |
- test/k6/acs-sso-example.js | |
- test/postman/helm/** | |
- .github/workflows/helm* | |
- test/community-integration-test-values.yaml | |
push: | |
branches: | |
- master | |
- release/** | |
concurrency: | |
group: helm-com-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build_vars: | |
runs-on: ubuntu-latest | |
outputs: | |
ver_json: ${{ steps.app_versions.outputs.json }} | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
fetch-depth: 0 | |
- name: Get charts | |
id: getcharts | |
uses: ./.github/actions/charts-as-json | |
with: | |
charts-root: helm | |
- name: Keep only ACS enterprise | |
id: app_versions | |
env: | |
JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }} | |
JQ_FILTER: >- | |
[inputs | .charts[] | {name: .name, values: .values[]} | |
| select(.values=="community_values.yaml" or .name=="acs-sso-example")] | |
run: | | |
echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}' | |
VERS=$(echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}') | |
echo "json=$VERS" >> $GITHUB_OUTPUT | |
community_charts: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: | |
- build_vars | |
env: | |
REGISTRY_SECRET_NAME: ${{ github.event.pull_request.head.repo.fork && '' || 'regcred' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJSON(needs.build_vars.outputs.ver_json) }} | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 | |
with: | |
version: "3.12.1" | |
- name: Login to Docker Hub | |
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0 | |
if: >- | |
! github.event.pull_request.head.repo.fork | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Setup cluster | |
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
ingress-nginx-ref: controller-v1.12.1 | |
import-docker-credentials-secret-name: ${{ env.REGISTRY_SECRET_NAME }} | |
- name: Set nginx ingress config | |
run: | | |
kubectl -n ingress-nginx patch cm ingress-nginx-controller \ | |
-p '{"data": {"annotations-risk-level":"Critical","allow-snippet-annotations":"true"}}' | |
- name: Add dependency chart repos | |
run: | | |
helm repo add self https://alfresco.github.io/alfresco-helm-charts/ | |
helm repo add codecentric https://codecentric.github.io/helm-charts/ | |
helm repo add elastic https://helm.elastic.co/ | |
- name: Helm install | |
run: | | |
helm dep build . | |
helm install ${{ matrix.name }} . \ | |
--set global.search.sharedSecret="$(openssl rand -hex 24)" \ | |
--set global.known_urls=http://localhost \ | |
--set global.alfrescoRegistryPullSecrets=${{ env.REGISTRY_SECRET_NAME }} \ | |
--set global.imagePullSecrets[0]=${{ env.REGISTRY_SECRET_NAME }} \ | |
--wait --timeout 6m0s \ | |
--values ${{ matrix.values }} \ | |
--values ../../test/community-integration-test-values.yaml | |
working-directory: helm/${{ matrix.name }} | |
- name: Spit cluster status | |
if: always() | |
run: | | |
helm ls --all-namespaces | |
kubectl get all --all-namespaces | |
kubectl describe pod | |
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v.3.0.2 | |
if: matrix.name == 'alfresco-content-services' | |
with: | |
timeout_minutes: 1 | |
retry_wait_seconds: 30 | |
max_attempts: 5 | |
command: >- | |
docker run --network=host | |
-v $(pwd)/test/postman:/etc/postman | |
-t postman/newman run /etc/postman/helm/acs-test-helm-collection.json | |
--global-var protocol=http --global-var url=localhost | |
- name: Setup k6 | |
if: matrix.name == 'acs-sso-example' | |
uses: grafana/setup-k6-action@ffe7d7290dfa715e48c2ccc924d068444c94bde2 # v1.1.0 | |
- name: Run SSO example chart tests | |
if: matrix.name == 'acs-sso-example' | |
env: | |
K6_BROWSER_ARGS: no-sandbox | |
uses: grafana/run-k6-action@a15e2072ede004e8d46141e33d7f7dad8ad08d9d # v1.3.1 | |
with: | |
path: test/k6/acs-sso-example.js | |
- name: Spit cluster status after tests | |
if: always() | |
run: | | |
helm ls --all-namespaces | |
kubectl get all --all-namespaces | |
kubectl describe pod |