-
Notifications
You must be signed in to change notification settings - Fork 244
143 lines (131 loc) · 4.33 KB
/
helm-enterprise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
name: Helm (Enterprise)
on:
pull_request:
branches:
- master
- release/**
- next/**
paths:
- helm/**
- test/postman/helm/**
- .github/workflows/helm*
push:
branches:
- master
- release/**
concurrency:
group: helm-ent-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
build_vars:
runs-on: ubuntu-latest
if: >-
github.event_name == 'push'
|| (
! github.event.repository.fork
&& 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]
needs:
- build_vars
name: Helm ${{ matrix.name }} ${{ matrix.values }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.build_vars.outputs.ver_json) }}
steps:
- uses: actions/checkout@v3
- 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: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Setup cluster
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: Create registries auth secret
run: |
kubectl create secret generic regcred \
--from-file=.dockerconfigjson=$HOME/.docker/config.json \
--type=kubernetes.io/dockerconfigjson
- name: Helm install
run: |
helm dep up ./helm/alfresco-content-services
helm install acs ./helm/alfresco-content-services \
--set global.tracking.sharedsecret="$(openssl rand -hex 24)" \
--set global.known_urls=http://localhost \
--set global.alfrescoRegistryPullSecrets=regcred \
--wait --timeout 15m0s \
--values helm/${{ matrix.name }}/${{ matrix.values }} \
--values test/enterprise-integration-test-values.yaml
- name: Spit cluster status after install
if: always()
run: |
helm ls --all-namespaces
kubectl get all --all-namespaces
kubectl describe pod
- uses: nick-fields/retry@v2
id: newman
with:
timeout_minutes: 1
retry_wait_seconds: 30
max_attempts: 5
command: >-
docker run --network=host
-v $(pwd)/test/postman:/etc/postman
-t postman/newman run /etc/postman/helm/acs-test-helm-collection.json
--global-var protocol=http --global-var url=localhost
- name: Spit cluster status after tests
if: always() && steps.newman.outcome != 'skipped'
run: |
helm ls --all-namespaces
kubectl get all --all-namespaces
kubectl describe pod