Skip to content

Commit

Permalink
AAE-18178: use kind for helm upgrade tests (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
atchertchian authored Nov 21, 2023
1 parent 069154c commit e7fe92d
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ on:

env:
CHART_DIR: "helm/alfresco-process-application"
# TODO: create dedicated cluster?
TEST_CLUSTER_NAME: activiti
HELM_REPO_BASE_URL: https://kubernetes-charts.alfresco.com
HELM_REPO: Alfresco/charts
HELM_REPO_BRANCH: master
Expand Down Expand Up @@ -48,27 +46,34 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Define test namespace
id: define-namespace
env:
RUN_ID: ${{ github.run_id }}
REPO_NAME: ${{ github.event.repository.name }}
run: echo "name=gh-$REPO_NAME-$RUN_ID" >> $GITHUB_OUTPUT

- name: Build
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
chart-dir: ${{ env.CHART_DIR }}

- name: Execute dry run
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
chart-dir: ${{ env.CHART_DIR }}
test-rancher-url: ${{ secrets.RANCHER2_URL }}
test-rancher-access-key: ${{ secrets.RANCHER2_ACCESS_KEY }}
test-rancher-secret-key: ${{ secrets.RANCHER2_SECRET_KEY }}
test-cluster-name: ${{ env.TEST_CLUSTER_NAME }}
test-namespace: ${{ steps.define-namespace.outputs.name }}
- name: Setup Cluster
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]

- name: Compute Keycloak Client Secret
id: compute-keycloak-secret
run: echo "result=$(uuidgen)" >> $GITHUB_OUTPUT

- name: Execute helm upgrade dry-run
env:
CHART_DIR: ${{ env.CHART_DIR }}
NAMESPACE: "test"
DOMAIN: "example"
KEYCLOAK_SECRET: ${{ steps.compute-keycloak-secret.outputs.result }}
shell: bash
run: |
NAMESPACE_LOWERCASE=$(echo ${NAMESPACE} | tr "[:upper:]" "[:lower:]")
helm upgrade $NAMESPACE_LOWERCASE $CHART_DIR \
--install \
--set global.gateway.domain=$DOMAIN \
--set global.keycloak.clientSecret=$KEYCLOAK_SECRET \
--namespace $NAMESPACE_LOWERCASE \
--wait \
--dry-run
- name: Package Helm Chart
id: package-helm-chart
Expand Down

0 comments on commit e7fe92d

Please sign in to comment.