-
Notifications
You must be signed in to change notification settings - Fork 10
63 lines (54 loc) · 1.95 KB
/
ci-integration-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
name: CI - Integration Tests
on:
pull_request:
paths:
- '**.tf'
push:
branches:
- master
paths:
- '**.tf'
concurrency: terraform
jobs:
integration_test:
name: Test-Kitchen
runs-on: ubuntu-latest
continue-on-error: true
env:
ARM_CLIENT_ID: ${{secrets.AZURE_ARM_CLIENT_ID}}
ARM_CLIENT_SECRET: ${{secrets.AZURE_ARM_CLIENT_SECRET}}
ARM_SUBSCRIPTION_ID: ${{secrets.AZURE_ARM_SUBSCRIPTION_ID}}
ARM_TENANT_ID: ${{secrets.AZURE_ARM_TENANT_ID}}
TF_VAR_subscription_id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
TF_VAR_sysdig_secure_api_token: ${{secrets.KUBELAB_SECURE_API_TOKEN}}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_QA_CLOUDNATIVE_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_QA_CLOUDNATIVE_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Run single-subscription test
run: bundle exec kitchen test "single-subscription-azure"
- name: Destroy single-subscription resources
if: ${{ failure() }}
run: bundle exec kitchen destroy "single-subscription-azure"
- name: Create kind cluster
uses: helm/[email protected]
with:
wait: 120s
- name: Run single-subscription-k8s test
run: bundle exec kitchen test "single-subscription-k8s-azure"
- name: Inspect k8s failure
if: ${{ failure() }}
run: |
kubectl get namespaces
kubectl get deployments -n kitchen
kubectl describe deployment cloud-connector -n kitchen
kubectl logs deployment.apps/cloud-connector -n kitchen
kubectl logs deployment.apps/cloud-scanning -n kitchen
- name: Destroy single-subscription-k8s test
run: bundle exec kitchen destroy "single-subscription-k8s-azure"