OPSEXP-2938 Bump HxI Connector version for Orion release #1332
Workflow file for this run
This file contains 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: Lint and Test Charts | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- labeled | |
paths: | |
- 'charts/**' | |
- '.github/workflows/lint-test.yaml' | |
- '!charts/**/README.md' | |
- '!charts/**/README.md.gotmpl' | |
- '!charts/**/docs/**' | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
env: | |
INSTALL_NAMESPACE: alfresco | |
# See https://github.com/kubernetes-sigs/kind/releases for the latest available images | |
KIND_VERSION: v0.22.0 | |
KIND_NODE_IMAGE: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 | |
TEST_ALL_CHARTS: ${{ contains(github.event.pull_request.labels.*.name, 'ci-test-all') && 'true' || 'false' }} | |
TEST_ALL_CHARTS_ARG: ${{ contains(github.event.pull_request.labels.*.name, 'ci-test-all') && '--all' || '' }} | |
PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | |
with: | |
version: v3.10.2 | |
- name: Set up Unit Test plugin for Helm | |
env: | |
HELM_UNITTEST_VERSION: v0.6.1 | |
run: | | |
helm plugin install https://github.com/helm-unittest/helm-unittest --version $HELM_UNITTEST_VERSION | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1 | |
with: | |
version: v3.10.1 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config ct.yaml) | |
if [[ -n "$changed" || "$TEST_ALL_CHARTS" == "true" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --config ct.yaml $TEST_ALL_CHARTS_ARG | |
- name: Create kind cluster | |
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 | |
if: steps.list-changed.outputs.changed == 'true' && env.PR_FROM_FORK == 'false' | |
with: | |
version: ${{ env.KIND_VERSION}} | |
node_image: ${{ env.KIND_NODE_IMAGE }} | |
- name: Login to Quay.io | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
if: steps.list-changed.outputs.changed == 'true' && env.PR_FROM_FORK == 'false' | |
with: | |
registry: quay.io | |
username: ${{ secrets.quay_username }} | |
password: ${{ secrets.quay_password }} | |
- name: Get Activiti License from S3 | |
if: steps.list-changed.outputs.changed == 'true' && env.PR_FROM_FORK == 'false' | |
env: | |
AWS_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACSLICENSE_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_ACSLICENSE_SECRET_ACCESS_KEY }} | |
run: aws s3 cp s3://aps-licenses/single-tenant/activiti.lic /tmp/activiti.lic | |
- name: Prepare namespace for install | |
if: steps.list-changed.outputs.changed == 'true' && env.PR_FROM_FORK == 'false' | |
run: | | |
kubectl create ns "$INSTALL_NAMESPACE" | |
kubectl create secret generic quay-registry-secret --from-file=.dockerconfigjson="${HOME}"/.docker/config.json --type=kubernetes.io/dockerconfigjson -n "$INSTALL_NAMESPACE" | |
kubectl create secret generic broker-secret --from-literal=BROKER_URL="failover:(nio://activemq:61616)?timeout=3000" --from-literal=BROKER_USERNAME=admin --from-literal=BROKER_PASSWORD=admin -n "$INSTALL_NAMESPACE" | |
kubectl create secret generic aps-license --from-file=activiti.lic=/tmp/activiti.lic -n "$INSTALL_NAMESPACE" | |
- name: Prepare charts mocks for testing | |
if: steps.list-changed.outputs.changed == 'true' && env.PR_FROM_FORK == 'false' | |
run: | | |
ITER_CMD="ct lsc --config ct.yaml" | |
if [[ "$TEST_ALL_CHARTS" == "true" ]]; then | |
ITER_CMD="ls -1 charts | awk -v prefix='charts/' '{print prefix \$0}'" | |
fi | |
for C in $(eval $ITER_CMD); do | |
if [ -d "${C}/ci/kustomize/" ]; then | |
echo "Prepare mocks for ${C}" | |
pushd "${C}/ci/kustomize/" | |
kubectl kustomize --enable-helm . | \ | |
kubectl -n "$INSTALL_NAMESPACE" apply -f - | |
popd | |
fi | |
done | |
- name: Run chart-testing (install) | |
if: steps.list-changed.outputs.changed == 'true' && env.PR_FROM_FORK == 'false' | |
run: >- | |
ct install --config ct.yaml | |
--namespace "$INSTALL_NAMESPACE" | |
$TEST_ALL_CHARTS_ARG |