diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13f9cf56..38b87c1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: E2E Test -on: [push, pull_request] +on: [push, pull_reques, issue_comment] jobs: krill_e2e_test: @@ -23,20 +23,23 @@ jobs: # to leverage an existing Cargo cache and thus speed up deployment. - name: Install modified Dockerfile into Krill checkout run: | - cp terraform/krill-e2e-test/lib/docker/krill/Dockerfile ${GITHUB_WORKSPACE}/../krill/Dockerfile - + cp ${GITHUB_WORKSPACE}/../repki-deploy/terraform/krill-e2e-test/lib/docker/krill/Dockerfile ${GITHUB_WORKSPACE}/../krill/Dockerfile + - name: Install Terraform uses: marocchino/setup-terraform@v1 with: version: "0.12.13" + - name: Debug print cwd + run: pwd + - name: Install Terraform plugins run: | mkdir -p $HOME/.terraform.d/plugins/ - cp terraform/plugins/terraform-provider-dockermachine $HOME/.terraform.d/plugins/ + cp ${GITHUB_WORKSPACE}/../repki-deploy/terraform/plugins/terraform-provider-dockermachine $HOME/.terraform.d/plugins/ - name: Decrypt SSH key - working-directory: terraform/krill-e2e-test + working-directory: ${GITHUB_WORKSPACE}/../repki-deploy/terraform/krill-e2e-test run: | ./decrypt-ssh-key.sh ls -la $HOME/secrets/ @@ -46,7 +49,7 @@ jobs: # Don't lock the state file, otherwise if the user cancels the build via the # GitHub Actions UI the terraform destroy cleanup step will fail. - name: Deploy - working-directory: terraform/krill-e2e-test/run_on_do + working-directory: ${GITHUB_WORKSPACE}/../repki-deploy/terraform/krill-e2e-test/run_on_do timeout-minutes: 30 run: | terraform init @@ -59,7 +62,7 @@ jobs: TF_VAR_size: s-8vcpu-32gb - name: Run tests - working-directory: terraform/krill-e2e-test/run_on_do + working-directory: ${GITHUB_WORKSPACE}/../repki-deploy/terraform/krill-e2e-test/run_on_do run: terraform apply -auto-approve -var "ssh_key_path=$HOME/secrets/ssh_key" -var "krill_build_path=${GITHUB_WORKSPACE}/../krill" env: # Don't embed env var references in env var definitions here, instead @@ -69,7 +72,7 @@ jobs: - name: Undeploy if: always() - working-directory: terraform/krill-e2e-test/run_on_do + working-directory: ${GITHUB_WORKSPACE}/../repki-deploy/terraform/krill-e2e-test/run_on_do run: terraform destroy -auto-approve -var "ssh_key_path=$HOME/secrets/ssh_key" -var "krill_build_path=${GITHUB_WORKSPACE}/../krill" env: # Don't embed env var references in env var definitions here, instead