Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACS-6670 test renditions with latest versions #1229

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/helm-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
helm repo add elastic https://helm.elastic.co/

- name: Helm install
id: helm_install
run: |
helm dep build .
helm install ${{ matrix.name }} . \
Expand Down Expand Up @@ -128,3 +129,18 @@ jobs:
helm ls --all-namespaces
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.name }}-${{ matrix.values }}
path: logs
52 changes: 17 additions & 35 deletions .github/workflows/helm-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

helm_integration:
runs-on: alfrescoPub-ubuntu2204-16G-4CPU
timeout-minutes: 12
timeout-minutes: 20
needs:
- build_vars
name: ${{ matrix.values }} on ${{ matrix.name }}
Expand Down Expand Up @@ -115,20 +115,15 @@ jobs:
- name: Check if we want additional helm customizations
id: configurable-extra-values
run: |
if [ "${{ matrix.values }}" = "values.yaml" -o "${{ matrix.values }}" = "pre-release_values.yaml" ]; then
echo "Enabling clustered tests via auto-scaling: 2 replicas max"
echo "Renditions tests will be skipped because particularly flaky on clustered runs"

echo "helm_install_params=--values test/autoscaling-hpa-test-values.yaml \
--set dtas.additionalArgs[0]='-k not test_renditions'" >> "$GITHUB_OUTPUT"
fi
echo "helm_install_params=--set alfresco-repository.replicaCount=2" >> "$GITHUB_OUTPUT"

- name: Add dependency chart repos
run: |
helm repo add self https://alfresco.github.io/alfresco-helm-charts/
helm repo add elastic https://helm.elastic.co/

- name: Helm install
id: helm_install
run: >-
helm dep build ./helm/alfresco-content-services &&
helm install acs ./helm/alfresco-content-services
Expand Down Expand Up @@ -181,7 +176,7 @@ jobs:

- name: Run helm test
id: helm_test
run: helm test acs
run: helm test acs --timeout 10m

- name: Spit cluster status after helm test
if: always() && steps.helm_test.outcome != 'skipped'
Expand All @@ -191,30 +186,17 @@ jobs:
kubectl describe pod
kubectl events --for deployment/acs-alfresco-repository

- name: Check HPA behavior during tests
id: hpa_check
if: always() && (matrix.values == 'values.yaml' || matrix.values == 'pre-release_values.yaml') && steps.helm_test.outcome != 'skipped'
run: |
echo "Checking current repo hpa status"
kubectl get hpa acs-alfresco-repository
echo -n "Repository should have 2 replicas after Helm test... "
SETSIZE=$(kubectl get deployment/acs-alfresco-repository -o jsonpath='{@.spec.replicas}')
if [ "$SETSIZE" -ne 2 ]; then
echo "Got $SETSIZE instead"
exit 1
else
echo "Got $SETSIZE"
echo -n "Now waiting for scale down"
kubectl patch hpa acs-alfresco-repository \
-p '{"spec": {"behavior": {"scaleDown": {"stabilizationWindowSeconds": 20}}}}'
echo -n "(speeding scale down up)... "
kubectl wait --timeout=2m --for=jsonpath='spec.replicas'=1 deployment/acs-alfresco-repository
echo "Scale down completed"
fi

- name: Spit cluster status after HPA check
if: always() && steps.hpa_check.outcome != 'skipped'
- name: Collect logs from all containers
if: always() && steps.helm_install.outcome != 'skipped'
run: |
kubectl get all --all-namespaces
kubectl describe pod
kubectl events --for deployment/acs-alfresco-repository
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.name }}-${{ matrix.values }}
path: logs
2 changes: 2 additions & 0 deletions test/enterprise-integration-test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ elasticsearch:
cpu: "1"
memory: "1Gi"
alfresco-search-enterprise:
reindexing:
hookExecution: false
resources:
requests:
cpu: "0.1"
Expand Down
Loading