sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #03634
[Merge] ~cgrabowski/maas-ci/+git/maas-ci-internal:fix_terraform_cleanup into ~maas-committers/maas-ci/+git/maas-ci-internal:main
Christian Grabowski has proposed merging ~cgrabowski/maas-ci/+git/maas-ci-internal:fix_terraform_cleanup into ~maas-committers/maas-ci/+git/maas-ci-internal:main.
Commit message:
fix cleanup action path for terraform job
Requested reviews:
MAAS Committers (maas-committers)
For more details, see:
https://code.launchpad.net/~cgrabowski/maas-ci/+git/maas-ci-internal/+merge/433758
--
Your team MAAS Committers is requested to review the proposed merge of ~cgrabowski/maas-ci/+git/maas-ci-internal:fix_terraform_cleanup into ~maas-committers/maas-ci/+git/maas-ci-internal:main.
diff --git a/github-ci/github-ci.groovy b/github-ci/github-ci.groovy
index a65796f..d0e983b 100644
--- a/github-ci/github-ci.groovy
+++ b/github-ci/github-ci.groovy
@@ -95,6 +95,8 @@ pipeline {
withCredentials([string(credentialsId: '{{ maas_api_key }}', variable: '{{ api_token_env_var }}')]){
sh '''
cd {{ setup_env_dir }}
+ export no_proxy="${no_proxy:-'localhost'},${MAAS_HOST}"
+ export NO_PROXY="${NO_PROXY:-'localhost'},${MAAS_HOST}"
sudo -E -H -u ubuntu {{ setup_env_command }}
'''
}
@@ -106,8 +108,8 @@ pipeline {
{% if test_lock is defined and test_lock %}
lock('{{ test_lock }}') {
sh '''
- export no_proxy="${no_proxy:-'localhost'}, ${MAAS_HOST}"
- export NO_PROXY="${NO_PROXY:-'localhost'}, ${MAAS_HOST}"
+ export no_proxy="${no_proxy:-'localhost'},${MAAS_HOST}"
+ export NO_PROXY="${NO_PROXY:-'localhost'},${MAAS_HOST}"
cd {{ test_dir }}
sudo -E -H -u ubuntu {{ test_command }}
'''
diff --git a/jobs/maas-terraform-test.yaml b/jobs/maas-terraform-test.yaml
index cb33d97..7f876f0 100644
--- a/jobs/maas-terraform-test.yaml
+++ b/jobs/maas-terraform-test.yaml
@@ -74,5 +74,5 @@
maas_api_key: jenkins-maas-token
post_test_actions: |
sh '''
- sudo -E -H -u ubuntu "$WORKSPACE/maas-ci-internal/utilities/terraform_post_actions"
+ sudo -E -H -u ubuntu "$WORKSPACE/maas-ci-internal/utilities/terraform/terraform_post_actions"
'''
diff --git a/utilities/terraform/terraform_post_actions b/utilities/terraform/terraform_post_actions
index fda0202..8d19b5e 100755
--- a/utilities/terraform/terraform_post_actions
+++ b/utilities/terraform/terraform_post_actions
@@ -1,6 +1,8 @@
#!/bin/bash
-COMMIT_HASH="$(git rev-parse HEAD)"
+export no_proxy="${no_proxy:-'localhost'},${MAAS_HOST}"
+export NO_PROXY="${NO_PROXY:-'localhost'},${MAAS_HOST}"
+export COMMIT_HASH="$(git rev-parse HEAD)"
python3 <<EOF
import os
Follow ups