chore: enable manual run of nightly builds with possibility of skipping tests (#712)

* Add manual dispatch trigger for nightly build workflow, with an input parameter for optionally skipping the e2e and helm tests part of the workflow

* Bump how much memory to start minikube cluster with on e2e test workflows

* Log events from default namespace on tests failure, bump the limit of kubernetes events logged to 30

* Bump workflow-job plugin version used by default from 2.42 to 1145.v7f2433caa07f
This commit is contained in:
Szymon Fugas
2022-02-10 18:03:08 +01:00
committed by GitHub
parent 424ec3fbc2
commit e8414c09a8
14 changed files with 41 additions and 13 deletions
+9 -3
View File
@@ -3,12 +3,15 @@ on:
push:
branches:
- master
- security-validator
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
branches:
- master
- security-validator
env:
MINIKUBE_CPUS_NUMBER: 2
MINIKUBE_MEMORY_AMOUNT: 6144
jobs:
run-tests:
if: github.event.pull_request.draft == false
@@ -45,7 +48,10 @@ jobs:
sudo apt-get install socat
sudo mkdir -p $HOME/.kube $HOME/.minikube
sudo chown -R $USER $HOME/.kube $HOME/.minikube
make minikube-start MINIKUBE_DRIVER='docker' CPUS_NUMBER=2
make minikube-start \
MINIKUBE_DRIVER='docker' \
MEMORY_AMOUNT=${{ env.MINIKUBE_MEMORY_AMOUNT }} \
CPUS_NUMBER=${{ env.MINIKUBE_CPUS_NUMBER }}
- name: Jenkins Operator - e2e
run: make e2e E2E_TEST_ARGS='-ginkgo.v'
+17 -1
View File
@@ -2,6 +2,16 @@ name: Publish nightly snapshot
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
skipTests:
description: "Flag for skipping the tests. If set to true (without quotation marks), the workflow will skip tests and go straight to releasing the nightly build. Use with caution!"
required: false
env:
MINIKUBE_CPUS_NUMBER: 2
MINIKUBE_MEMORY_AMOUNT: 6144
jobs:
publish-image:
name: Publish nightly snapshot
@@ -32,17 +42,23 @@ jobs:
run: make verify
- name: Prepare environment for e2e
if: ${{ github.event.inputs.skipTests != 'true' }}
run: |
sudo apt-get update
sudo apt-get install socat
sudo mkdir -p $HOME/.kube $HOME/.minikube
sudo chown -R $USER $HOME/.kube $HOME/.minikube
make minikube-start MINIKUBE_DRIVER='docker' CPUS_NUMBER=2
make minikube-start \
MINIKUBE_DRIVER='docker' \
MEMORY_AMOUNT=${{ env.MINIKUBE_MEMORY_AMOUNT }} \
CPUS_NUMBER=${{ env.MINIKUBE_CPUS_NUMBER }}
- name: Jenkins Operator - e2e
if: ${{ github.event.inputs.skipTests != 'true' }}
run: make e2e E2E_TEST_ARGS='-ginkgo.v'
- name: Jenkins Operator - Helm Chart tests
if: ${{ github.event.inputs.skipTests != 'true' }}
run: |
git reset --hard
make helm-lint