Skip to content

feat(cloud-bench) Ensure CloudAccount is created after Lighthouse (#94) #218

feat(cloud-bench) Ensure CloudAccount is created after Lighthouse (#94)

feat(cloud-bench) Ensure CloudAccount is created after Lighthouse (#94) #218

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"