mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
ci/cd - perform staging tests again
This commit is contained in:
parent
448efc0ef0
commit
500c3564a2
191
.github/workflows/staging.yml
vendored
191
.github/workflows/staging.yml
vendored
|
@ -66,111 +66,110 @@ jobs:
|
|||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
# Code security
|
||||
# code-security:
|
||||
# runs-on: ubuntu-latest
|
||||
# permissions:
|
||||
# actions: read
|
||||
# contents: read
|
||||
# security-events: write
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# language: ["python"]
|
||||
# steps:
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v4
|
||||
# - name: Initialize CodeQL
|
||||
# uses: github/codeql-action/init@v2
|
||||
# with:
|
||||
# languages: ${{ matrix.language }}
|
||||
# config-file: ./.github/codeql.yml
|
||||
# - name: Perform CodeQL Analysis
|
||||
# uses: github/codeql-action/analyze@v2
|
||||
# with:
|
||||
# category: "/language:${{matrix.language}}"
|
||||
code-security:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ["python"]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: ./.github/codeql.yml
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
# Create infrastructures
|
||||
# create-infras:
|
||||
# needs: [code-security, build-containers, build-packages]
|
||||
# strategy:
|
||||
# matrix:
|
||||
# type: [docker, autoconf, swarm, k8s, linux]
|
||||
# uses: ./.github/workflows/staging-create-infra.yml
|
||||
# with:
|
||||
# TYPE: ${{ matrix.type }}
|
||||
# secrets:
|
||||
# CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
# SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
# K8S_IP: ${{ secrets.K8S_IP }}
|
||||
create-infras:
|
||||
needs: [code-security, build-containers, build-packages]
|
||||
strategy:
|
||||
matrix:
|
||||
type: [docker, autoconf, swarm, k8s, linux]
|
||||
uses: ./.github/workflows/staging-create-infra.yml
|
||||
with:
|
||||
TYPE: ${{ matrix.type }}
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
K8S_IP: ${{ secrets.K8S_IP }}
|
||||
|
||||
# Perform tests
|
||||
# staging-tests:
|
||||
# needs: [create-infras]
|
||||
# strategy:
|
||||
# matrix:
|
||||
# type: [docker, autoconf, swarm, k8s, linux]
|
||||
# include:
|
||||
# - type: docker
|
||||
# runs_on: "['self-hosted', 'bw-docker']"
|
||||
# - type: autoconf
|
||||
# runs_on: "['self-hosted', 'bw-autoconf']"
|
||||
# - type: swarm
|
||||
# runs_on: "['self-hosted', 'bw-swarm']"
|
||||
# - type: k8s
|
||||
# runs_on: "['ubuntu-latest']"
|
||||
# - type: linux
|
||||
# runs_on: "['self-hosted', 'bw-linux']"
|
||||
# uses: ./.github/workflows/staging-tests.yml
|
||||
# with:
|
||||
# TYPE: ${{ matrix.type }}
|
||||
# RUNS_ON: ${{ matrix.runs_on }}
|
||||
# secrets: inherit
|
||||
# tests-ui:
|
||||
# needs: [create-infras]
|
||||
# uses: ./.github/workflows/tests-ui.yml
|
||||
# with:
|
||||
# RELEASE: testing
|
||||
# prepare-tests-core:
|
||||
# needs: [create-infras]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v4
|
||||
# - id: set-matrix
|
||||
# run: |
|
||||
# tests=$(find ./tests/core/ -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | jq -c --raw-input --slurp 'split("\n")| .[0:-1]')
|
||||
# echo "::set-output name=tests::$tests"
|
||||
# outputs:
|
||||
# tests: ${{ steps.set-matrix.outputs.tests }}
|
||||
# tests-core:
|
||||
# needs: prepare-tests-core
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# test: ${{ fromJson(needs.prepare-tests-core.outputs.tests) }}
|
||||
# uses: ./.github/workflows/test-core.yml
|
||||
# with:
|
||||
# TEST: ${{ matrix.test }}
|
||||
# RELEASE: testing
|
||||
staging-tests:
|
||||
needs: [create-infras]
|
||||
strategy:
|
||||
matrix:
|
||||
type: [docker, autoconf, swarm, k8s, linux]
|
||||
include:
|
||||
- type: docker
|
||||
runs_on: "['self-hosted', 'bw-docker']"
|
||||
- type: autoconf
|
||||
runs_on: "['self-hosted', 'bw-autoconf']"
|
||||
- type: swarm
|
||||
runs_on: "['self-hosted', 'bw-swarm']"
|
||||
- type: k8s
|
||||
runs_on: "['ubuntu-latest']"
|
||||
- type: linux
|
||||
runs_on: "['self-hosted', 'bw-linux']"
|
||||
uses: ./.github/workflows/staging-tests.yml
|
||||
with:
|
||||
TYPE: ${{ matrix.type }}
|
||||
RUNS_ON: ${{ matrix.runs_on }}
|
||||
secrets: inherit
|
||||
tests-ui:
|
||||
needs: [create-infras]
|
||||
uses: ./.github/workflows/tests-ui.yml
|
||||
with:
|
||||
RELEASE: testing
|
||||
prepare-tests-core:
|
||||
needs: [create-infras]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- id: set-matrix
|
||||
run: |
|
||||
tests=$(find ./tests/core/ -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | jq -c --raw-input --slurp 'split("\n")| .[0:-1]')
|
||||
echo "::set-output name=tests::$tests"
|
||||
outputs:
|
||||
tests: ${{ steps.set-matrix.outputs.tests }}
|
||||
tests-core:
|
||||
needs: prepare-tests-core
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: ${{ fromJson(needs.prepare-tests-core.outputs.tests) }}
|
||||
uses: ./.github/workflows/test-core.yml
|
||||
with:
|
||||
TEST: ${{ matrix.test }}
|
||||
RELEASE: testing
|
||||
|
||||
# Delete infrastructures
|
||||
# delete-infras:
|
||||
# if: ${{ always() }}
|
||||
# needs: [staging-tests]
|
||||
# strategy:
|
||||
# matrix:
|
||||
# type: [docker, autoconf, swarm, k8s, linux]
|
||||
# uses: ./.github/workflows/staging-delete-infra.yml
|
||||
# with:
|
||||
# TYPE: ${{ matrix.type }}
|
||||
# secrets:
|
||||
# CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
# SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
delete-infras:
|
||||
if: ${{ always() }}
|
||||
needs: [staging-tests]
|
||||
strategy:
|
||||
matrix:
|
||||
type: [docker, autoconf, swarm, k8s, linux]
|
||||
uses: ./.github/workflows/staging-delete-infra.yml
|
||||
with:
|
||||
TYPE: ${{ matrix.type }}
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
|
||||
# Push Docker images
|
||||
push-images:
|
||||
# needs: [staging-tests, tests-ui, tests-core]
|
||||
needs: [build-packages, build-containers]
|
||||
needs: [staging-tests, tests-ui, tests-core]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
Loading…
Reference in a new issue