Skip to content

Commit

Permalink
better workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Aug 1, 2024
1 parent 6db73a0 commit 6ca0a76
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: true

env:
ACS_CHART_VERSION: 8.3.0

jobs:
build-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,8 +119,7 @@ jobs:

- name: Load Docker images
run: |
kind get clusters
ls -1 /tmp/*.tar | xargs --no-run-if-empty -L 1 kind load image-archive -n chart-testing
kind load image-archive -n chart-testing /tmp/docker-images.tar
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -142,45 +144,48 @@ jobs:
- name: Fetch upstream values for tests
run: >-
curl -L
https://raw.githubusercontent.com/Alfresco/acs-deployment/c1096488a9dd2bef4fe20f9677a14afba4fc8932/test/enterprise-integration-test-values.yaml
https://raw.githubusercontent.com/Alfresco/acs-deployment/${{ env.ACS_CHART_VERSION }}/test/enterprise-integration-test-values.yaml
-o test/helm/enterprise-integration-test-values.yaml &&
ls -l test/helm/enterprise-integration-test-values.yaml
cat test/helm/enterprise-integration-test-values.yaml
- name: Helm install
id: helm_install
run: |
helm repo add alfresco https://kubernetes-charts.alfresco.com/stable
helm repo update
helm install acs alfresco/alfresco-content-services \
--version ${{ env.ACS_CHART_VERSION }} \
--set global.search.sharedSecret="$(openssl rand -hex 24)" \
--set global.known_urls=http://localhost \
--set global.alfrescoRegistryPullSecrets=regcred \
--values test/helm/enterprise-integration-test-values.yaml \
--values test/helm/test-overrides.yaml
- name: Watch Helm deployment
env:
HELM_INSTALL_TIMEOUT: 7m
run: |
kubectl get pods --watch &
KWPID=$!
kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID
echo -n "Waiting for ESC Reindexing job to complete... "
kubectl wait --timeout=${{ env.HELM_INSTALL_TIMEOUT }} --all=true --for=condition=Available deploy && kill $KWPID
echo "Waiting for ESC Reindexing job to complete... "
kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing
echo "Completed."
- name: Spit cluster status after install
if: always()
- name: Debug cluster status after install
if: always() && steps.helm_install.outcome != 'skipped'
run: |
helm ls --all-namespaces --all
helm status acs --show-resources
kubectl get all --all-namespaces
kubectl describe pod
- name: Run helm test
id: helm_test
run: helm test acs

- name: Spit cluster status after helm test
- 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
kubectl logs -l app.kubernetes.io/name=mediation --tail=-1

0 comments on commit 6ca0a76

Please sign in to comment.