Skip to content

Smoke_Test

Smoke_Test #745

Workflow file for this run

# 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-amd64-2cpu
strategy:
fail-fast: false
matrix:
k8s: [ v1.23.13, v1.27.1 ]
steps:
- name: Import secrets
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c # v3.0.0
id: secrets
with:
exportEnv: false
url: ${{ secrets.VAULT_URL }}
role: ${{ secrets.VAULT_ROLE }}
method: kubernetes
path: kubernetes-ci
secrets: |
kv-gitlab-ci/data/github/ingress api_token ;
kv-gitlab-ci/data/github/ingress api_host ;
kv-gitlab-ci/data/github/ingress api_preset ;
kv-gitlab-ci/data/github/ingress user_token ;
kv-gitlab-ci/data/github/shared/allure allure_token ;
kv-gitlab-ci/data/github/ingress webhook_uuid ;
kv-gitlab-ci/data/github/ingress webhook_api_key ;
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@692973e3d937129bcbf40652eb9f2f61becf3332 # 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 }}
WALLARM_API_HOST: ${{ steps.secrets.outputs.api_host }}
WALLARM_API_PRESET: ${{ steps.secrets.outputs.api_preset }}
WEBHOOK_API_KEY: ${{ steps.secrets.outputs.webhook_api_key }}
WEBHOOK_UUID: ${{ steps.secrets.outputs.webhook_uuid }}
USER_TOKEN: ${{ steps.secrets.outputs.user_token }}
SMOKE_REGISTRY_TOKEN: ${{ steps.secrets.outputs.token_name }}
SMOKE_REGISTRY_SECRET: ${{ steps.secrets.outputs.token_secret }}
ALLURE_UPLOAD_REPORT: true
ALLURE_GENERATE_REPORT: true
ALLURE_TOKEN: ${{ steps.secrets.outputs.allure_token }}
ALLURE_ENVIRONMENT_K8S: ${{ matrix.k8s }}
ALLURE_ENVIRONMENT_ARCH: amd64
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