Skip to content

Update dependency @types/node to v17.0.45 #1845

Update dependency @types/node to v17.0.45

Update dependency @types/node to v17.0.45 #1845

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
- version-bumps
jobs:
checkout:
name: Checkout
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
with:
submodules: true
- name: Tar files
run: tar -cf checkout.tar ./
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: checkout.tar
path: checkout.tar
js-get-deps:
needs: checkout
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: checkout.tar
- name: Untar files
run: tar -xf checkout.tar ./
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3.3.0
with:
node-version-file: '.nvmrc'
- run: npm install
- name: Tar files
run: tar -cf codebase.tar ./
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: codebase.tar
path: codebase.tar
js-units:
runs-on: ubuntu-latest
needs: js-get-deps
permissions:
checks: write
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: codebase.tar
- name: Untar files
run: tar -xf codebase.tar ./
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3.3.0
with:
node-version-file: '.nvmrc'
- run: npm run ci-test
- uses: tanmen/jest-reporter@3216c80e8bc9370133df330696754aca95749eaf # renovate: tag=v1
if: always()
with:
action-name: Jest Unit Test Results
github-token: ${{ secrets.GITHUB_TOKEN }}
build-web-ui:
runs-on: ubuntu-latest
needs: js-get-deps
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: codebase.tar
- name: Untar files
run: tar -xf codebase.tar ./
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3.3.0
with:
node-version-file: '.nvmrc'
- run: "npm run build:webpack"
- name: Tar files
run: tar -cf webui.tar dist
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: webui.tar
path: webui.tar
publish-web-ui:
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- build-web-ui
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: webui.tar
- name: Untar files
run: tar -xf webui.tar dist
- name: Deploy
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # renovate: tag=v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
js-build-binaries:
runs-on: ubuntu-latest
needs: js-get-deps
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: codebase.tar
- name: Untar files
run: tar -xf codebase.tar ./
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3.3.0
with:
node-version-file: '.nvmrc'
- uses: MOZGIII/install-ldid-action@d5ab465f3a66a4d60a59882b935eb30e18e8d043 # renovate: tag=v1
with:
tag: v2.1.5-procursus2
- run: npm run build
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-alpine-arm64
path: dist/bin/psp-migration-alpine-arm64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-alpine-x64
path: dist/bin/psp-migration-alpine-x64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-linux-arm64
path: dist/bin/psp-migration-linux-arm64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-linux-x64
path: dist/bin/psp-migration-linux-x64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-linuxstatic-arm64
path: dist/bin/psp-migration-linuxstatic-arm64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-linuxstatic-x64
path: dist/bin/psp-migration-linuxstatic-x64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-win-arm64.exe
path: dist/bin/psp-migration-win-arm64.exe
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-win-x64.exe
path: dist/bin/psp-migration-win-x64.exe
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-macos-arm64
path: dist/bin/psp-migration-macos-arm64
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: psp-migration-macos-x64
path: dist/bin/psp-migration-macos-x64
policytests:
runs-on: ubuntu-latest
needs:
- checkout
- js-build-binaries
permissions:
checks: write
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
system:
- psp
- gatekeeper
- kyverno
- kubewarden
- pss
- krail
e2e: ["fixtures"]
include:
- system: kubewarden
e2e: "e2e"
- system: gatekeeper
e2e: "e2e"
- system: kyverno
e2e: "e2e"
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: checkout.tar
- name: Untar files
run: tar -xf checkout.tar ./
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
if: matrix.e2e == 'e2e'
with:
name: psp-migration-linuxstatic-x64
- if: matrix.e2e == 'e2e'
run: chmod +x psp-migration-linuxstatic-x64
- uses: helm/kind-action@d08cf6ff1575077dee99962540d77ce91c62387d # renovate: tag=v1.3.0
timeout-minutes: 5
with:
config: tests/kind-config-${{matrix.system}}.yaml
- uses: azure/setup-helm@20d2b4f98d41febe2bbca46408499dbb535b6258 # tag=v3.0
with:
version: 'v3.7.1'
- if: matrix.system == 'gatekeeper'
name: Install gatekeeper
run: |
kubectl apply --wait -f https://raw.github.com/open-policy-agent/gatekeeper/release-3.7/deploy/gatekeeper.yaml
kubectl wait --for=condition=available --timeout=600s -n gatekeeper-system \
deployment/gatekeeper-audit \
deployment/gatekeeper-controller-manager
kubectl apply --wait -k submodules/gatekeeper-library/library/pod-security-policy
kubectl apply --wait -k patched_gatekeeper_templates
until kubectl wait --for condition=established --timeout=60s \
crd/constrainttemplates.templates.gatekeeper.sh \
crd/k8spspvolumetypes.constraints.gatekeeper.sh
do
sleep 1
done
- if: matrix.system == 'kubewarden'
name: Install kubewarden
run: |
helm repo add jetstack https://charts.jetstack.io
helm repo add kubewarden https://charts.kubewarden.io
helm repo update
helm install --wait \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.5.3 \
--set installCRDs=true
helm install --create-namespace -n kubewarden kubewarden-crds kubewarden/kubewarden-crds
helm install --wait -n \
kubewarden kubewarden-controller kubewarden/kubewarden-controller \
--set telemetry.enabled=False
helm install --wait -n kubewarden kubewarden-defaults kubewarden/kubewarden-defaults \
--set policyServer.telemetry.enabled=False
- if: matrix.system == 'kyverno'
name: Install kyverno
run: |
helm repo add kyverno https://kyverno.github.io/kyverno/
helm repo update
helm install kyverno kyverno/kyverno -n kyverno --create-namespace
kubectl wait --for=condition=available --timeout=600s -n kyverno \
deployment/kyverno-admission-controller
- if: matrix.system == 'krail'
name: Install k-rail
run: |
helm repo add k-rail https://cruise-automation.github.io/k-rail/
helm repo update
kubectl create namespace k-rail
kubectl label namespace k-rail k-rail/ignore=true
helm install --wait --set webhookTimeout=30 --set replicaCount=1 k-rail k-rail/k-rail --namespace k-rail
- name: BATS tests
continue-on-error: false
run: submodules/bats/bin/bats --report-formatter junit tests
env:
SYSTEM: ${{ matrix.system }}
E2E_TEST: ${{ matrix.e2e == 'e2e' && './psp-migration-linuxstatic-x64' }}
- name: Test Report
uses: dorny/test-reporter@0d00bb14cb0cc2c9b8985df6e81dd333188224e1 # renovate: tag=v1.5.0
if: always()
with:
name: Test results (${{ matrix.system }}) ${{ matrix.e2e == 'e2e' && 'end-to-end' || 'static policy'}}
path: report.xml
reporter: java-junit
fail-on-error: true
release-binaries:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs:
- js-build-binaries
- semver
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-alpine-arm64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-alpine-x64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-linux-arm64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-linux-x64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-linuxstatic-arm64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-linuxstatic-x64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-win-arm64.exe
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-win-x64.exe
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-macos-arm64
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: psp-migration-macos-x64
- uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # tag=v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: v${{ needs.semver.outputs.semantic_version}}
prerelease: false
title: v${{ needs.semver.outputs.semantic_version}}
files: "*"
codeql:
runs-on: ubuntu-latest
permissions:
security-events: write
needs: checkout
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3.0.0
with:
name: checkout.tar
- name: Untar files
run: tar -xf checkout.tar ./
- name: Initialize CodeQL
uses: github/codeql-action/init@3f62b754e23e0dd60f91b744033e1dc1654c0ec6 # tag=v2.1.15
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3f62b754e23e0dd60f91b744033e1dc1654c0ec6 # tag=v2.1.15
semver:
name: Generate a semantic version number
runs-on: ubuntu-latest
outputs:
semantic_version: ${{ steps.semver.outputs.semantic_version }}
steps:
- name: Checkout repo
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
with:
fetch-depth: '0'
- name: Semver run
id: semver
uses: lukaszraczylo/semver-generator@403b3f115fc9371ff4bf5a64e1328d2ba99260b4 # 1.10.143
with:
config_file: .github/semver.yaml
repository_local: true