-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from energywebfoundation/DOI-3055-Include-helm…
…-install-in-generic-microservice-helm-chart-test-pipeline Doi 3055 include helm install in generic microservice helm chart test pipeline
- Loading branch information
Showing
5 changed files
with
88 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,17 +8,54 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.9.0 | ||
- uses: styfle/cancel-workflow-action@0.12.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
helm-check: | ||
runs-on: ubuntu-latest | ||
needs: [cancel-previous] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: helm-check | ||
- uses: actions/checkout@v4 | ||
- name: helm-check-default | ||
uses: igabaydulin/[email protected] | ||
env: | ||
CHART_LOCATION: ./ | ||
CHART_VALUES: ./values.yaml | ||
- name: helm-check-test | ||
uses: igabaydulin/[email protected] | ||
env: | ||
CHART_LOCATION: ./ | ||
CHART_VALUES: ./ci/test-values.yaml | ||
|
||
test-k8s: | ||
runs-on: ubuntu-latest | ||
needs: [helm-check] | ||
strategy: | ||
matrix: | ||
k8s-version: [ v1.27.12, v1.26.15 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.10.3 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
check-latest: true | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
with: | ||
version: v3.10.1 | ||
|
||
- name: Create Kind cluster | ||
uses: helm/[email protected] | ||
with: | ||
kubectl_version: ${{ matrix.k8s-version }} | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --config ci/config.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.11.0 | ||
- uses: styfle/cancel-workflow-action@0.12.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
|
@@ -26,7 +26,7 @@ jobs: | |
changelog: ${{ steps.tag_version.outputs.changelog }} | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
# Take the 1st version from Chart.yaml | ||
- name: Get Chart Version | ||
|
@@ -50,13 +50,13 @@ jobs: | |
|
||
steps: | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1.12.0 | ||
uses: ncipollo/release-action@v1.14.0 | ||
with: | ||
tag: ${{ needs.push-tag.outputs.tag }} | ||
name: Release ${{ needs.push-tag.outputs.tag }} | ||
body: ${{ needs.push-tag.outputs.changelog }} | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Push Helm chart to OCI compatible registry (Github) | ||
uses: bsord/[email protected] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
chart-repos: | ||
- bitnami=https://charts.bitnami.com/bitnami | ||
charts: ./ | ||
helm-extra-args: "--timeout 60s" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Keep empty file for chart testing to grab defaults from values.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
replicaCount: 2 | ||
|
||
# Pod disruption budget will be created only if replicaCount > 1 | ||
pdb: | ||
enabled: true | ||
minAvailable: 1 | ||
|
||
readinessProbe: | ||
enabled: true | ||
initialDelaySeconds: 10 | ||
|
||
livenessProbe: | ||
enabled: true | ||
initialDelaySeconds: 10 | ||
|
||
image: | ||
repository: nginx | ||
pullPolicy: IfNotPresent | ||
# Overrides the image tag whose default is the chart appVersion. | ||
tag: "latest" | ||
|
||
autoscaling: | ||
enabled: true | ||
minReplicas: 2 | ||
maxReplicas: 3 | ||
targetCPUUtilizationPercentage: 80 | ||
# targetMemoryUtilizationPercentage: 80 | ||
|
||
# Allows you to add any config files in specified mount path | ||
configFiles: | ||
config.yml: | | ||
key: value | ||
example.json: | | ||
{ | ||
"key1": "value1", | ||
"key2": "value2" | ||
} | ||
configFilesMountPath: /usr/share/config |