apps sc: Added monitoring and dashboard for cluster autoscaling #3523
Workflow file for this run
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
name: UnitTests-pipeline | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- 'pre-release-*' | |
jobs: | |
pipeline-tests: | |
runs-on: ubuntu-latest | |
env: | |
CK8S_CONFIG_PATH: /github/workspace/pipeline/config/exoscale | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout compliantkubernetes-apps | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
cache-from: type=gha | |
context: ./pipeline | |
load: true | |
pull: false | |
push: false | |
tags: elastisys-ck8s-apps/app:latest | |
- name: Init and configure config for compliantkubernetes-apps | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/init-unit-tests.bash" | |
env: | |
CK8S_CLOUD_PROVIDER: exoscale | |
CI_CK8S_FLAVOR: prod | |
CK8S_PGP_FP: 529D964DE0BBD900C4A395DA09986C297F8B7757 | |
- name: Run config validation | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/validate-config.bash" | |
- name: Run template validation | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/validate-template.bash" | |
- name: Run linters | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/lint.bash" | |
unit-tests: | |
runs-on: ubuntu-latest | |
env: | |
CK8S_CONFIG_PATH: /github/workspace/ck8s-config | |
strategy: | |
fail-fast: false | |
matrix: | |
cloud: ["safespring", "exoscale", "citycloud", "elastx", "upcloud"] | |
flavor: ["prod", "dev"] | |
steps: | |
- name: Checkout compliantkubernetes-apps | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
cache-from: type=gha | |
context: ./pipeline | |
load: true | |
pull: false | |
push: false | |
tags: elastisys-ck8s-apps/app:latest | |
- name: Init and configure config for compliantkubernetes-apps | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/init-unit-tests.bash" | |
env: | |
CK8S_CLOUD_PROVIDER: ${{ matrix.cloud }} | |
CI_CK8S_FLAVOR: ${{ matrix.flavor }} | |
CK8S_PGP_FP: 529D964DE0BBD900C4A395DA09986C297F8B7757 | |
- name: Run template validation | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/validate-template.bash" | |
- name: Run linters | |
run: /usr/bin/docker run --rm -e "CK8S_CONFIG_PATH" -e "CK8S_CLOUD_PROVIDER" -e "CI_CK8S_FLAVOR" -e "CK8S_PGP_FP" -e "GITHUB_RUN_ID" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && ./pipeline/lint.bash" | |
opa: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout compliantkubernetes-apps | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
cache-from: type=gha | |
context: ./pipeline | |
load: true | |
pull: false | |
push: false | |
tags: elastisys-ck8s-apps/app:latest | |
- name: Run unit tests for OPA policies | |
run: /usr/bin/docker run --rm -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest ./pipeline/test-opa.bash | |
bats: | |
runs-on: ubuntu-latest | |
env: | |
CK8S_PGP_FP: 529D964DE0BBD900C4A395DA09986C297F8B7757 | |
steps: | |
- name: Checkout compliantkubernetes-apps | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
cache-from: type=gha | |
context: ./pipeline | |
load: true | |
pull: false | |
push: false | |
tags: elastisys-ck8s-apps/app:latest | |
- name: Run Bats tests | |
run: /usr/bin/docker run --rm -e "CK8S_PGP_FP" -e CI=true -v "/home/runner/work/compliantkubernetes-apps/compliantkubernetes-apps":"/github/workspace" -w /github/workspace elastisys-ck8s-apps/app:latest bash -c "./pipeline/sops-pgp-setup.bash && bats --tap ./pipeline" |