mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-18 07:27:42 +02:00
GitHub Actions workflow tweaks.
- Temporarily allow the E2E test to be triggered by an issue comment so that minor issues with migrating it from the rpki-deploy repo can be resolved without unnecessary commits just to trigger the build. - Debug print the current working directory to find out why the build was unable to find the Dockerfile. - Be explicit about the paths to use.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user