-
Notifications
You must be signed in to change notification settings - Fork 12
67 lines (61 loc) · 2.27 KB
/
smoke-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# The workflow aims to run on daily basis from the main branch. Also can be run manually by QA for debugging Node tests for Ingress
name: Smoke test
on:
workflow_dispatch:
inputs:
tag:
description: The tag of pytest docker image
type: string
default: latest
required: false
schedule:
- cron: '00 7,12 * * 1-5'
permissions:
contents: read
jobs:
smoke:
name: Smoke
runs-on: self-hosted-1cpu
strategy:
matrix:
k8s: [ v1.23.13, v1.24.12, v1.25.8, v1.26.3, v1.27.1 ]
steps:
- name: Import secrets
uses: hashicorp/vault-action@65d7a12a8098b0aa7fcfdf22ad850c051f8b3ccb # v2.7.2
id: secrets
with:
exportEnv: false
url: ${{ secrets.VAULT_URL }}
role: ${{ secrets.VAULT_ROLE }}
method: kubernetes
secrets: |
kv-gitlab-ci/data/github/ingress api_token ;
kv-gitlab-ci/data/github/ingress user_secret ;
kv-gitlab-ci/data/github/ingress user_uuid ;
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds token_name ;
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds token_secret ;
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.0.2
- name: Create cluster
run: kind create cluster --image=kindest/node:${{ matrix.k8s }}
- name: Run smoke tests
env:
ARCH: amd64
KIND_CLUSTER_NAME: kind
SKIP_CLUSTER_CREATION: true
SKIP_IMAGE_CREATION: true
SKIP_IMAGE_LOADING: true
WALLARM_API_TOKEN: ${{ steps.secrets.outputs.api_token }}
USER_UUID: ${{ steps.secrets.outputs.user_uuid }}
USER_SECRET: ${{ steps.secrets.outputs.user_secret }}
SMOKE_REGISTRY_TOKEN: ${{ steps.secrets.outputs.token_name }}
SMOKE_REGISTRY_SECRET: ${{ steps.secrets.outputs.token_secret }}
CLIENT_ID: 4
run: |
if [ ${{ github.event_name }} == 'workflow_dispatch' ];
then
export SMOKE_IMAGE_TAG="${{ github.event.inputs.tag }}"
fi
kind get kubeconfig > $HOME/.kube/kind-config-kind
export KUBECONFIG=$HOME/.kube/kind-config-kind
make TAG=$(cat TAG) kind-smoke-test