@@ -22,7 +22,7 @@ pipeline {
2222 RUNBLD_DISABLE_NOTIFICATIONS = ' true'
2323 SLACK_CHANNEL = " #beats-build"
2424 SNAPSHOT = ' true'
25- TERRAFORM_VERSION = " 0.12.30 "
25+ TERRAFORM_VERSION = " 0.13.7 "
2626 XPACK_MODULE_PATTERN = ' ^x-pack\\ /[a-z0-9]+beat\\ /module\\ /([^\\ /]+)\\ /.*'
2727 }
2828 options {
@@ -832,8 +832,10 @@ def withCloudTestEnv(Closure body) {
832832 def maskedVars = []
833833 def testTags = " ${ env.TEST_TAGS} "
834834
835- // AWS
836- if (params. allCloudTests || params. awsCloudTests) {
835+ // Allow AWS credentials when the build was configured to do so with:
836+ // - the cloudtests build parameters
837+ // - the aws github label
838+ if (params. allCloudTests || params. awsCloudTests || matchesPrLabel(label : ' aws' )) {
837839 testTags = " ${ testTags} ,aws"
838840 def aws = getVaultSecret(secret : " ${ AWS_ACCOUNT_SECRET} " ). data
839841 if (! aws. containsKey(' access_key' )) {
@@ -885,6 +887,7 @@ def startCloudTestEnv(Map args = [:]) {
885887 // If it failed then cleanup without failing the build
886888 sh(label : ' Terraform Cleanup' , script : " .ci/scripts/terraform-cleanup.sh ${ folder} " , returnStatus : true )
887889 }
890+ error(' startCloudTestEnv: terraform apply failed.' )
888891 } finally {
889892 // Archive terraform states in case manual cleanup is needed.
890893 archiveArtifacts(allowEmptyArchive : true , artifacts : ' **/terraform.tfstate' )
0 commit comments