DEVOPS-2235 Switching to AiO #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: ['stable/**'] | |
types: ['opened', 'reopened', 'synchronize'] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.RUNNER }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- PLATFORM: amd64 | |
ARCH: x86_64 | |
RUNNER: self-hosted-amd64-1cpu | |
- PLATFORM: arm64 | |
ARCH: aarch64 | |
RUNNER: self-hosted-arm64-1cpu | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.0.2 | |
- name: Build image | |
run: make ARCHS=${{ matrix.ARCH }} PLATFORMS=${{ matrix.PLATFORM }} BUILDX_ARGS=--load build | |
- name: Save image | |
run: docker save -o node-${{ matrix.ARCH }}.tar docker.io/wallarm/node:test | |
- name: Cache image | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
retention-days: 1 | |
name: node-${{ matrix.ARCH }}.tar | |
path: node-${{ matrix.ARCH }}.tar | |
test: | |
name: Test | |
runs-on: ${{ matrix.RUNNER }} | |
needs: | |
- build | |
strategy: | |
matrix: | |
case: [single, split] | |
ARCH: [x86_64, aarch64] | |
include: | |
- ARCH: x86_64 | |
RUNNER: self-hosted-amd64-2cpu | |
- ARCH: aarch64 | |
RUNNER: self-hosted-arm64-2cpu | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.0.2 | |
- name: Import secrets | |
uses: hashicorp/vault-action@affa6f04da5c2d55e6e115b7d1b044a6b1af8c74 # v2.7.4 | |
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 user_secret ; | |
kv-gitlab-ci/data/github/ingress user_uuid ; | |
kv-gitlab-ci/data/github/ingress allure_project_id ; | |
kv-gitlab-ci/data/github/ingress allure_server_token ; | |
kv-gitlab-ci/data/github/ingress allure_server_url ; | |
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds token_name ; | |
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds token_secret ; | |
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds registry_name ; | |
- name: Login | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | |
with: | |
registry: ${{ steps.secrets.outputs.registry_name }} | |
username: ${{ steps.secrets.outputs.token_name }} | |
password: ${{ steps.secrets.outputs.token_secret }} | |
- name: Load cache | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: node-${{ matrix.ARCH }}.tar | |
- name: Load images | |
run: docker load -i node-${{ matrix.ARCH }}.tar | |
- name: Run test | |
env: | |
USER_UUID: ${{ steps.secrets.outputs.user_uuid }} | |
USER_SECRET: ${{ steps.secrets.outputs.user_secret }} | |
WALLARM_API_TOKEN: ${{ steps.secrets.outputs.api_token }} | |
ALLURE_TOKEN: ${{ secrets.ALLURE_SERVER_TOKEN }} | |
ALLURE_ENDPOINT: ${{ secrets.ALLURE_SERVER_URL }} | |
ALLURE_PROJECT_ID: ${{ secrets.ALLURE_PROJECT_ID }} | |
ALLURE_ENVIRONMENT_ARCH: ${{ matrix.ARCH }} | |
run: make ${{ matrix.case }} |