-
Notifications
You must be signed in to change notification settings - Fork 1.6k
57 lines (53 loc) · 1.99 KB
/
staging-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
---
name: Test staging
# The intention is this workflow is triggered either manually or
# after build has completed.
on:
workflow_run:
workflows: ['Deploy to staging']
types:
- completed
workflow_dispatch:
concurrency: integration-test
jobs:
staging-test-images:
name: Container images staging tests
# Workflow run always triggers on completion regardless of status
# This prevents us from running if build fails.
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
uses: ./.github/workflows/call-test-images.yaml
with:
registry: ghcr.io
username: ${{ github.actor }}
image: ${{ github.repository }}/staging
image-tag: latest
environment: staging
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
cosign_key: ${{ secrets.COSIGN_PUBLIC_KEY }}
# Called workflows cannot be nested
staging-test-images-integration:
name: run integration tests on GCP
# Wait for other tests to succeed
needs: staging-test-images
uses: ./.github/workflows/call-run-integration-test.yaml
with:
image_name: ghcr.io/${{ github.repository }}/staging
image_tag: latest
secrets:
opensearch_aws_access_id: ${{ secrets.OPENSEARCH_AWS_ACCESS_ID }}
opensearch_aws_secret_key: ${{ secrets.OPENSEARCH_AWS_SECRET_KEY }}
opensearch_admin_password: ${{ secrets.OPENSEARCH_ADMIN_PASSWORD }}
terraform_api_token: ${{ secrets.TF_API_TOKEN }}
gcp-service-account-key: ${{ secrets.GCP_SA_KEY }}
staging-test-packages:
name: Binary packages staging test
# Workflow run always triggers on completion regardless of status
# This prevents us from running if build fails.
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
uses: ./.github/workflows/call-test-packages.yaml
with:
environment: staging
secrets:
bucket: ${{ secrets.AWS_S3_BUCKET_STAGING }}
token: ${{ secrets.GITHUB_TOKEN }}