Skip to content

OPSEXP-2950 Bump elasticsearch to 8.16.1 for pre-release #1827

OPSEXP-2950 Bump elasticsearch to 8.16.1 for pre-release

OPSEXP-2950 Bump elasticsearch to 8.16.1 for pre-release #1827

---
name: Helm (Community)
on:
pull_request:
branches:
- master
- release/**
- next/**
paths:
- helm/**
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.build_vars.outputs.ver_json) }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: "3.12.1"
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: ${{ ! github.event.repository.fork }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup cluster
uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.4.0
with:
ingress-nginx-ref: controller-v1.8.2
- name: Set nginx ingress config
run: |
kubectl -n ingress-nginx patch cm ingress-nginx-controller \
-p '{"data": {"allow-snippet-annotations":"true"}}'
- name: Create registries auth secret
if: ${{ ! github.event.repository.fork }}
run: |
kubectl create secret generic regcred \
--from-file=.dockerconfigjson=$HOME/.docker/config.json \
--type=kubernetes.io/dockerconfigjson
- 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=regcred \
--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@7152eba30c6575329ac0576536151aca5a72780e # v.3.0.0
id: newman
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: Spit cluster status after tests
if: always() && steps.newman.outcome != 'skipped'
run: |
helm ls --all-namespaces
kubectl get all --all-namespaces
kubectl describe pod