Skip to content

Commit b7a4164

Browse files
authored
Another helm update (#888)
* Fixes wget globus public index spelling * Adds initial helm unittest for backend * Adds initial helm unittests for frontend * Adds initial helm unittests for nodestatus * Adds initial helm unittests for postgresql * Adds initial helm unittests for ingress * Fixes settings DJANGO_ALLOWED_HOSTS * Fixes allowing additional hosts for ingress TLS and django * Updates readme * Tests disabling database * Updates backend deployment checksum to include configmap * Adds documentation for testing chart. * Updates workflow to unittest helm chart * Fixs pre-commit issues * Pins the helm version installed for unittesting
1 parent 887dfe6 commit b7a4164

58 files changed

Lines changed: 3385 additions & 121 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/containers.yml

Lines changed: 57 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,26 @@ jobs:
2525
permissions:
2626
packages: write
2727
steps:
28-
- uses: actions/checkout@v4
29-
- uses: docker/setup-buildx-action@v3
30-
- uses: docker/login-action@v3
28+
- name: Source | Checkout
29+
uses: actions/checkout@v4
30+
- name: Docker | Setup buildx
31+
uses: docker/setup-buildx-action@v3
32+
- name: Docker | Login to ghcr.io
33+
uses: docker/login-action@v3
3134
with:
3235
registry: ghcr.io
3336
username: ${{ github.actor }}
3437
password: ${{ secrets.GITHUB_TOKEN }}
35-
- uses: docker/metadata-action@v5
38+
- name: Docker | Extract metadata
3639
id: metadata
40+
uses: docker/metadata-action@v5
3741
with:
3842
images: ghcr.io/esgf2-us/metagrid-frontend
3943
tags: |
4044
type=ref,event=pr
4145
type=ref,event=tag
42-
- uses: docker/build-push-action@v4
46+
- name: Docker | Build and push
47+
uses: docker/build-push-action@v4
4348
with:
4449
cache-from: type=gha
4550
cache-to: type=gha,mode=max
@@ -54,21 +59,26 @@ jobs:
5459
permissions:
5560
packages: write
5661
steps:
57-
- uses: actions/checkout@v4
58-
- uses: docker/setup-buildx-action@v3
59-
- uses: docker/login-action@v3
62+
- name: Source | Checkout
63+
uses: actions/checkout@v4
64+
- name: Docker | Setup buildx
65+
uses: docker/setup-buildx-action@v3
66+
- name: Docker | Login to ghcr.io
67+
uses: docker/login-action@v3
6068
with:
6169
registry: ghcr.io
6270
username: ${{ github.actor }}
6371
password: ${{ secrets.GITHUB_TOKEN }}
64-
- uses: docker/metadata-action@v5
72+
- name: Docker | Extract metadata
6573
id: metadata
74+
uses: docker/metadata-action@v5
6675
with:
6776
images: ghcr.io/esgf2-us/metagrid-backend
6877
tags: |
6978
type=ref,event=pr
7079
type=ref,event=tag
71-
- uses: docker/build-push-action@v4
80+
- name: Docker | Build and push
81+
uses: docker/build-push-action@v4
7282
with:
7383
cache-from: type=gha
7484
cache-to: type=gha,mode=max
@@ -82,24 +92,43 @@ jobs:
8292
runs-on: ubuntu-latest
8393
if: github.event_name == 'pull_request'
8494
steps:
85-
- uses: actions/checkout@v4
86-
- uses: azure/setup-helm@v4.3.0
87-
- name: Chart | Lint
95+
- name: Source | Checkout
96+
uses: actions/checkout@v4
97+
- name: Helm | Setup
98+
uses: azure/setup-helm@v4.3.0
99+
- name: Helm | Lint chart
88100
run: |
89101
helm lint helm/
90102
test:
91-
name: Test Helm Chart
103+
name: Unittest Helm Chart
104+
runs-on: ubuntu-latest
105+
if: github.event_name == 'pull_request'
106+
steps:
107+
- name: Source | Checkout
108+
uses: actions/checkout@v4
109+
- name: Helm | Setup
110+
uses: azure/setup-helm@v4.2.0
111+
with:
112+
version: 'v3.19.2'
113+
- name: Helm | Install unittest plugin
114+
run: helm plugin install https://github.com/helm-unittest/helm-unittest.git
115+
- name: Helm | Run chart unittests
116+
working-directory: helm/
117+
run: helm unittest .
118+
test-deploy:
119+
name: Test Helm Chart deploy
92120
runs-on: ubuntu-latest
93121
needs: [frontend, backend]
94122
if: github.event_name == 'pull_request'
95123
continue-on-error: true
96124
steps:
97-
- uses: actions/checkout@v4
98-
- name: Start minikube
125+
- name: Source | Checkout
126+
uses: actions/checkout@v4
127+
- name: Minikube | Start cluster
99128
uses: medyagh/setup-minikube@latest
100-
- name: Set up Helm
129+
- name: Helm | Setup
101130
uses: azure/setup-helm@v4.2.0
102-
- name: Install Helm Chart
131+
- name: Helm | Test chart installation
103132
working-directory: helm/
104133
run: |
105134
PR_NUMBER=$(echo ${GITHUB_REF} | awk -F'/' '{print $3}')
@@ -117,12 +146,13 @@ jobs:
117146
if: github.event_name == 'pull_request'
118147
continue-on-error: true
119148
steps:
120-
- uses: actions/checkout@v4
121-
- name: Start minikube
149+
- name: Source | Checkout
150+
uses: actions/checkout@v4
151+
- name: Minikube | Start cluster
122152
uses: medyagh/setup-minikube@latest
123-
- name: Set up Helm
153+
- name: Helm | Setup
124154
uses: azure/setup-helm@v4.2.0
125-
- name: Install Helm Chart
155+
- name: Helm | Test chart upgrade
126156
working-directory: helm/
127157
env:
128158
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -146,8 +176,9 @@ jobs:
146176
packages: write
147177
if: github.event_name != 'pull_request'
148178
steps:
149-
- uses: actions/checkout@v4
150-
- name: Chart | Push
179+
- name: Source | Checkout
180+
uses: actions/checkout@v4
181+
- name: Helm | Publish chart
151182
uses: appany/helm-oci-chart-releaser@v0.4.2
152183
with:
153184
name: metagrid
@@ -158,3 +189,5 @@ jobs:
158189
registry_username: ${{ github.actor }}
159190
registry_password: ${{ secrets.GITHUB_TOKEN }}
160191
update_dependencies: 'true'
192+
193+

0 commit comments

Comments
 (0)