From 314cf12306cb0dbc80e953557060850796d7b773 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Tue, 7 Nov 2023 12:39:17 +0100 Subject: [PATCH] fix(ci): disable deprecated security scans and install cert-manager on ingress tests (#550) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Datree is no more and we need to ensure tests are actually working again **โš™๏ธ Type of change** - [ ] โš™๏ธ Feature/App addition - [x] ๐Ÿช› Bugfix - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** **๐Ÿ“ƒ Notes:** **โœ”๏ธ Checklist:** - [ ] โš–๏ธ My code follows the style guidelines of this project - [ ] ๐Ÿ‘€ I have performed a self-review of my own code - [ ] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [ ] ๐Ÿ“„ I have made corresponding changes to the documentation - [ ] โš ๏ธ My changes generate no new warnings - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [ ] โฌ†๏ธ I increased versions for any altered app according to semantic versioning **โž• App addition** If this PR is an app addition please make sure you have done the following. - [ ] ๐Ÿชž I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] ๐Ÿ–ผ๏ธ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- .github/workflows/common_library_tests.yaml | 346 ++++++++++---------- 1 file changed, 173 insertions(+), 173 deletions(-) diff --git a/.github/workflows/common_library_tests.yaml b/.github/workflows/common_library_tests.yaml index 089fc1ef..ebadd707 100644 --- a/.github/workflows/common_library_tests.yaml +++ b/.github/workflows/common_library_tests.yaml @@ -213,8 +213,8 @@ jobs: if [[ "${{ matrix.values }}" =~ cnpg.*-values.yaml ]]; then helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait fi - if [[ "${{ matrix.values }}" =~ ingress.*-values.yaml ]]; then + helm install cert-manager truecharts/cert-manager --namespace cert-manager --create-namespace --wait helm install traefik truecharts/traefik --namespace traefik --create-namespace --wait fi @@ -241,175 +241,175 @@ jobs: cat /tmp/output.log rm -f /tmp/output.log - security: - needs: - - lint - name: Security Scans - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - # We run tests on k3s version of latest SCALE release and SCALE nightly - k3s-version: - - v1.26 - - v1.27 - - v1.28 - # We run tests on Helm version of latest SCALE release - helm-version: - - v3.12.3 - - latest - values: - - basic-values.yaml - - configmap-values.yaml - - secrets-values.yaml - - imagePullSecret-values.yaml - - daemonset-values.yaml - - job-values.yaml - - cron-values.yaml - - statefulset-values.yaml - - persistence-values.yaml - - extra-containers-values.yaml - - rbac-values.yaml - - networkPolicy-values.yaml - - register-operator-values.yaml - # Runs as root, so test results become obviously red - # - codeserver-values.yaml - # - netshoot-values.yaml - - - steps: - - name: Install Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 - with: - version: ${{ matrix.helm-version }} - - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 1 - - - name: build helm deps - run: | - cd library/common-test - helm dependency update - cd - - - name: Add namespace - run: | - echo "namespace: common-test" >> library/common-test/ci/${{ matrix.values }} - - - name: Run Security Scan - uses: datreeio/action-datree@main - with: - path: 'library/common-test' - cliArguments: '--ignore-missing-schemas --policy CommonBasic' - isHelmChart: true - helmArguments: '--values library/common-test/ci/${{ matrix.values }}' - - security-man: - needs: - - lint - name: Security Scans (manifests) - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - # We run tests on k3s version of latest SCALE release and SCALE nightly - k3s-version: - - v1.26 - - v1.27 - - v1.28 - # We run tests on Helm version of latest SCALE release - helm-version: - - v3.12.3 - - latest - values: - - ingress-values.yaml - - metrics-values.yaml - # - cnpg-values.yaml - # - cnpg-multi-values.yaml - - steps: - - name: Install Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 - with: - version: ${{ matrix.helm-version }} - - - name: Prep Helm - run: | - helm repo add truecharts https://charts.truecharts.org - helm repo add truecharts-deps https://deps.truecharts.org - helm repo add truecharts-library https://library-charts.truecharts.org - helm repo update - - name: Add Dependencies - run: | - helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait - helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait - helm install traefik truecharts/traefik --namespace traefik --create-namespace --wait - - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 1 - - - name: build helm deps - run: | - cd library/common-test - helm dependency update - cd - - - - name: Run Security Scan - uses: datreeio/action-datree@main - with: - path: 'library/common-test' - cliArguments: '--ignore-missing-schemas --policy ManifestManager' - isHelmChart: true - helmArguments: '--values library/common-test/ci/${{ matrix.values }}' - - security-vpn: - needs: - - lint - name: Security Scans (vpn) - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - # We run tests on k3s version of latest SCALE release and SCALE nightly - k3s-version: - - v1.26 - - v1.27 - - v1.28 - # We run tests on Helm version of latest SCALE release - helm-version: - - v3.12.3 - - latest - values: - - vpn-gluetun-values.yaml - - vpn-tailscale-values.yaml - # Is deprecated and runs as root, skipping for now - # - vpn-openvpn-values.yaml - - vpn-wireguard-values.yaml - - steps: - - name: Install Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 - with: - version: ${{ matrix.helm-version }} - - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 1 - - - name: build helm deps - run: | - cd library/common-test - helm dependency update - cd - - - - name: Run Security Scan - uses: datreeio/action-datree@main - with: - path: 'library/common-test' - cliArguments: '--ignore-missing-schemas --policy WithVPN' - isHelmChart: true - helmArguments: '--values library/common-test/ci/${{ matrix.values }}' +# security: +# needs: +# - lint +# name: Security Scans +# runs-on: ubuntu-22.04 +# strategy: +# fail-fast: false +# matrix: +# # We run tests on k3s version of latest SCALE release and SCALE nightly +# k3s-version: +# - v1.26 +# - v1.27 +# - v1.28 +# # We run tests on Helm version of latest SCALE release +# helm-version: +# - v3.12.3 +# - latest +# values: +# - basic-values.yaml +# - configmap-values.yaml +# - secrets-values.yaml +# - imagePullSecret-values.yaml +# - daemonset-values.yaml +# - job-values.yaml +# - cron-values.yaml +# - statefulset-values.yaml +# - persistence-values.yaml +# - extra-containers-values.yaml +# - rbac-values.yaml +# - networkPolicy-values.yaml +# - register-operator-values.yaml +# # Runs as root, so test results become obviously red +# # - codeserver-values.yaml +# # - netshoot-values.yaml +# +# +# steps: +# - name: Install Helm +# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 +# with: +# version: ${{ matrix.helm-version }} +# +# - name: Checkout +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 +# with: +# fetch-depth: 1 +# +# - name: build helm deps +# run: | +# cd library/common-test +# helm dependency update +# cd - +# - name: Add namespace +# run: | +# echo "namespace: common-test" >> library/common-test/ci/${{ matrix.values }} +# +# - name: Run Security Scan +# uses: datreeio/action-datree@main +# with: +# path: 'library/common-test' +# cliArguments: '--ignore-missing-schemas --policy CommonBasic' +# isHelmChart: true +# helmArguments: '--values library/common-test/ci/${{ matrix.values }}' +# +# security-man: +# needs: +# - lint +# name: Security Scans (manifests) +# runs-on: ubuntu-22.04 +# strategy: +# fail-fast: false +# matrix: +# # We run tests on k3s version of latest SCALE release and SCALE nightly +# k3s-version: +# - v1.26 +# - v1.27 +# - v1.28 +# # We run tests on Helm version of latest SCALE release +# helm-version: +# - v3.12.3 +# - latest +# values: +# - ingress-values.yaml +# - metrics-values.yaml +# # - cnpg-values.yaml +# # - cnpg-multi-values.yaml +# +# steps: +# - name: Install Helm +# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 +# with: +# version: ${{ matrix.helm-version }} +# +# - name: Prep Helm +# run: | +# helm repo add truecharts https://charts.truecharts.org +# helm repo add truecharts-deps https://deps.truecharts.org +# helm repo add truecharts-library https://library-charts.truecharts.org +# helm repo update +# - name: Add Dependencies +# run: | +# helm install prometheus-operator truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait +# helm install cloudnative-pg truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait +# helm install traefik truecharts/traefik --namespace traefik --create-namespace --wait +# +# - name: Checkout +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 +# with: +# fetch-depth: 1 +# +# - name: build helm deps +# run: | +# cd library/common-test +# helm dependency update +# cd - +# +# - name: Run Security Scan +# uses: datreeio/action-datree@main +# with: +# path: 'library/common-test' +# cliArguments: '--ignore-missing-schemas --policy ManifestManager' +# isHelmChart: true +# helmArguments: '--values library/common-test/ci/${{ matrix.values }}' +# +# security-vpn: +# needs: +# - lint +# name: Security Scans (vpn) +# runs-on: ubuntu-22.04 +# strategy: +# fail-fast: false +# matrix: +# # We run tests on k3s version of latest SCALE release and SCALE nightly +# k3s-version: +# - v1.26 +# - v1.27 +# - v1.28 +# # We run tests on Helm version of latest SCALE release +# helm-version: +# - v3.12.3 +# - latest +# values: +# - vpn-gluetun-values.yaml +# - vpn-tailscale-values.yaml +# # Is deprecated and runs as root, skipping for now +# # - vpn-openvpn-values.yaml +# - vpn-wireguard-values.yaml +# +# steps: +# - name: Install Helm +# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 +# with: +# version: ${{ matrix.helm-version }} +# +# - name: Checkout +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 +# with: +# fetch-depth: 1 +# +# - name: build helm deps +# run: | +# cd library/common-test +# helm dependency update +# cd - +# +# - name: Run Security Scan +# uses: datreeio/action-datree@main +# with: +# path: 'library/common-test' +# cliArguments: '--ignore-missing-schemas --policy WithVPN' +# isHelmChart: true +# helmArguments: '--values library/common-test/ci/${{ matrix.values }}'