Skip to content

Commit 52eb142

Browse files
committed
[tests] remove git path from infra_dir
1 parent ceec88f commit 52eb142

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

tests/pipelines/tf-examples-lb-https-gke.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
backend_prefix: terraform-google-lb-http/
3636
env_name: tf-ci-lb-https-gke
3737
example_dir: examples/https-gke
38-
infra_dir: git/examples/https-gke/gke-node-port
38+
infra_dir: examples/https-gke/gke-node-port
3939
region: us-central1
4040
zone: us-central1-b
4141
TF_VAR_network_name: tf-ci-lb-https-gke
@@ -45,10 +45,14 @@ jobs:
4545
init_script: |
4646
# Export Terraform vars from infra state
4747
cd gke-node-port
48+
MIG=$(terraform output instance_group)
49+
NODE_TAG=$(terraform output node_tag)
50+
NETWORK_NAME=$(terraform output network_name)
51+
4852
cat > ../terraform.tfvars <<EOF
49-
backend = "$(terraform output instance_group)"
50-
target_tags = "$(terraform output node_tag)"
51-
network_name = "$(terraform output network_name)"
53+
backend = "${MIG}"
54+
target_tags = "${NODE_TAG}"
55+
network_name = "${NETWORK_NAME}"
5256
EOF
5357
cat ../terraform.tfvars
5458

tests/pipelines/tf-lb-http-pull-requests.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ jobs:
318318
backend_prefix: terraform-google-lb-http/
319319
env_name: tf-ci-lb-https-gke-pr
320320
example_dir: examples/https-gke
321-
infra_dir: git/examples/https-gke/gke-node-port
321+
infra_dir: examples/https-gke/gke-node-port
322322
region: us-central1
323323
zone: us-central1-f
324324
TF_VAR_network_name: tf-ci-lb-https-gke-pr
@@ -328,10 +328,14 @@ jobs:
328328
init_script: |
329329
# Export Terraform vars from infra state
330330
cd gke-node-port
331+
MIG=$(terraform output instance_group)
332+
NODE_TAG=$(terraform output node_tag)
333+
NETWORK_NAME=$(terraform output network_name)
334+
331335
cat > ../terraform.tfvars <<EOF
332-
backend = "$(terraform output instance_group)"
333-
target_tags = "$(terraform output node_tag)"
334-
network_name = "$(terraform output network_name)"
336+
backend = "${MIG}"
337+
target_tags = "${NODE_TAG}"
338+
network_name = "${NETWORK_NAME}"
335339
EOF
336340
cat ../terraform.tfvars
337341
@@ -365,7 +369,7 @@ jobs:
365369
backend_prefix: terraform-google-lb-http/
366370
env_name: tf-ci-lb-https-gke-pr
367371
example_dir: examples/https-gke
368-
infra_dir: git/examples/https-gke/gke-node-port
372+
infra_dir: examples/https-gke/gke-node-port
369373
region: us-central1
370374
zone: us-central1-f
371375
TF_VAR_network_name: tf-ci-lb-https-gke-pr
@@ -375,10 +379,14 @@ jobs:
375379
init_script: |
376380
# Export Terraform vars from infra state
377381
cd gke-node-port
382+
MIG=$(terraform output instance_group)
383+
NODE_TAG=$(terraform output node_tag)
384+
NETWORK_NAME=$(terraform output network_name)
385+
378386
cat > ../terraform.tfvars <<EOF
379-
backend = "$(terraform output instance_group)"
380-
target_tags = "$(terraform output node_tag)"
381-
network_name = "$(terraform output network_name)"
387+
backend = "${MIG}"
388+
target_tags = "${NODE_TAG}"
389+
network_name = "${NETWORK_NAME}"
382390
EOF
383391
cat ../terraform.tfvars
384392

0 commit comments

Comments
 (0)