Skip to content

Commit

Permalink
Deploy to Kubernetes as part of pipeline (#9850)
Browse files Browse the repository at this point in the history
Closes #9850

Signed-off-by: wkoot <[email protected]>
  • Loading branch information
wkoot authored Oct 1, 2024
1 parent 14a220c commit b7a3d6f
Show file tree
Hide file tree
Showing 18 changed files with 84 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/api_server.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: API-server

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/application-tests-quality.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Application tests quality

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/application-tests.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Application tests

on: [push]
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
---
name: "CodeQL"

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/collector.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Collector

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Documentation

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/feature-tests-quality.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Feature tests quality

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/feature-tests.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Feature tests

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Frontend

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Hadolint

on: [push]
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Helm Chart CI

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Set yaml value change dict with random generated secrets
run: |
echo "VALUE_CHANGES={\"[0].data.DATABASE_USERNAME\":\"$(echo ${RANDOM} | base64)\",\"[0].data.DATABASE_PASSWORD\":\"$(echo ${RANDOM} | base64)\",\"[1].data.LDAP_LOOKUP_USER_PASSWORD\":\"$(echo ${RANDOM} | base64)\"}" >> $GITHUB_ENV
- name: Update values.yaml
uses: fjogeleit/[email protected]
with:
valueFile: "helm/deploy-ci.yaml"
commitChange: false
changes: ${{ env.VALUE_CHANGES }}

- name: Start minikube
uses: medyagh/[email protected]
with:
driver: docker
container-runtime: containerd
minikube-version: latest
kubernetes-version: stable
timeout-minutes: 2

- name: Build and run chart
run: |
eval $(minikube -p minikube docker-env)
kubectl apply -f helm/deploy-ci.yaml
helm dependency build helm
helm upgrade --install --render-subchart-notes quality-time helm
kubectl wait --all pods --timeout=2m --for=condition=Ready
kubectl wait --all deployments --timeout=30s --for=condition=Available
timeout-minutes: 3
1 change: 1 addition & 0 deletions .github/workflows/notifier.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Notifier

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-quality.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Release script quality

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Release

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/shared_code.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Shared Code

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: SonarCloud

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Trivy
on:
push:
Expand Down
23 changes: 23 additions & 0 deletions helm/deploy-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
apiVersion: v1
kind: Secret
metadata:
name: quality-time-db-secret
labels:
app.kubernetes.io/name: quality-time
app.kubernetes.io/instance: quality-time
data:
DATABASE_USERNAME: ""
DATABASE_PASSWORD: ""
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
name: quality-time-ldap-secret
labels:
app.kubernetes.io/name: quality-time
app.kubernetes.io/instance: quality-time
data:
LDAP_LOOKUP_USER_PASSWORD: ""
type: Opaque

0 comments on commit b7a3d6f

Please sign in to comment.