Skip to content

OPSEXP-2273 Fixup docker compose community top comments (#999) #917

OPSEXP-2273 Fixup docker compose community top comments (#999)

OPSEXP-2273 Fixup docker compose community top comments (#999) #917

---
name: Helm (Enterprise)
on:
pull_request:
branches:
- master
- release/**
paths:
- helm/**
- test/postman/helm/**
- .github/workflows/helm*
push:
branches:
- master
- release/**
concurrency:
group: ${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: false
jobs:
build_vars:
runs-on: ubuntu-latest
if: >-
github.event_name == 'push'
|| (
github.event.pull_request.head.user.login == 'Alfresco'
&& github.actor != 'dependabot[bot]'
)
outputs:
app_json: ${{ steps.getcharts.outputs.app }}
ver_json: ${{ steps.app_versions.outputs.json }}
chart_names: ${{ steps.chart_names.outputs.json}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: getcharts
uses: ./.github/actions/charts-as-json
with:
charts-root: helm
- id: app_versions
env:
JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }}
JQ_FILTER: >-
[inputs | .charts[] | {name: .name, values: .values[]}]
| del(.[] | select(.values=="community_values.yaml"))
run: |
echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}'
VERS=$(echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}')
echo "json=$VERS" >> $GITHUB_OUTPUT
- id: chart_names
env:
JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }}
JQ_FILTER: $json | [.charts[].name]
run: |
CHARTS=$(jq -nc --argjson json '${{ env.JSON }}' '${{ env.JQ_FILTER }}')
echo "json=$CHARTS" >> $GITHUB_OUTPUT
helm_integration:
runs-on: [self-hosted, linux, X64]
needs:
- build_vars
name: Helm ${{ matrix.name }} ${{ matrix.values }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
include: ${{ fromJSON(needs.build_vars.outputs.ver_json) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: azure/setup-helm@v3
with:
version: "3.12.1"
- name: Setup aws cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- name: Setup dnsutils
run: |
sudo apt update
sudo apt install -y dnsutils
- name: compute version as expected by deployment script
id: values_to_version
run: |
VFILE="${{ matrix.values }}"
if [ "${VFILE}" == 'values.yaml' ]; then V='latest'
else V=${VFILE%_values.yaml}
fi
SANITIZED_V=$(echo ${{ matrix.name }} | sed -r 's/[[:punct:]]?(.)[[:alnum:]]*/\1/g')-${V//./}
SANITIZED_V=${SANITIZED_V,,}
echo "Release prefix to $SANITIZED_V"
echo "app_version=$V" >> $GITHUB_OUTPUT
echo "app_prefix=${SANITIZED_V}" >> $GITHUB_OUTPUT
- uses: >-
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/[email protected]
with:
skip_checkout: "true"
test_newman: "true"
chart_name: ${{ matrix.name }}
release_prefix: ${{ steps.values_to_version.outputs.app_prefix }}
acs_version: ${{ steps.values_to_version.outputs.app_version }}
aws_access_key_id: ${{ secrets.ACS_CLUSTER_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.ACS_CLUSTER_AWS_SECRET_ACCESS_KEY }}
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
quay_username: ${{ secrets.QUAY_USERNAME }}
quay_password: ${{ secrets.QUAY_PASSWORD }}
acm_certificate: ${{ secrets.ACM_CERTIFICATE }}
aws_sg: ${{ secrets.AWS_SG }}