Skip to content

Commit c8096a4

Browse files
authored
chore(ci): Provider cache for lint (terraform-google-modules#641)
1 parent 56af31d commit c8096a4

File tree

12 files changed

+28
-23
lines changed

12 files changed

+28
-23
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12.1
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12.2
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

@@ -68,6 +68,7 @@ docker_test_integration:
6868
.PHONY: docker_test_lint
6969
docker_test_lint:
7070
docker run --rm -it \
71+
-e ENABLE_PARALLEL=1 \
7172
-v "$(CURDIR)":/workspace \
7273
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
7374
/usr/local/bin/test_lint.sh

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,6 @@ tags:
429429
- 'integration'
430430
substitutions:
431431
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
432-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.1'
432+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.2'
433433
options:
434434
machineType: 'N1_HIGHCPU_8'

build/lint.cloudbuild.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ tags:
2222
- 'lint'
2323
substitutions:
2424
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
25-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.1'
25+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.2'
26+
options:
27+
machineType: 'N1_HIGHCPU_8'
28+
env:
29+
- ENABLE_PARALLEL=1

test/bundle.hcl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
terraform {
2+
version = "0.12.29"
3+
}
4+
5+
providers {
6+
google = ["~> 3.42.0"]
7+
google-beta = ["~> 3.42.0"]
8+
external = ["~> 1.0"]
9+
kubernetes = ["~> 1.12.0"]
10+
null = ["~> 2.0"]
11+
random = ["~> 2.0"]
12+
}

test/integration/beta_cluster/controls/gcp.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
service_account = attribute("service_account")
1919
project_id = attribute("project_id")
2020

21-
if service_account.start_with? "projects/"
22-
service_account_name = service_account
23-
else
24-
service_account_name = "projects/#{project_id}/serviceAccounts/#{service_account}"
25-
end
26-
27-
describe google_service_account name: service_account_name do
21+
describe google_service_account(project: project_id, name: service_account) do
2822
its("display_name") { should eq "Terraform-managed service account for cluster #{attribute("cluster_name")}" }
2923
its("project_id") { should eq project_id }
3024
end

test/integration/beta_cluster/inspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: beta_cluster
22
depends:
33
- name: inspec-gcp
44
git: https://github.com/inspec/inspec-gcp.git
5-
tag: v0.10.0
5+
tag: v1.8.0
66
attributes:
77
- name: project_id
88
required: true

test/integration/private_zonal_with_networking/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
expect(data['nodePools']).to include(
8484
including(
8585
"config" => including(
86-
"machineType" => "n1-standard-1",
86+
"machineType" => "e2-medium",
8787
),
8888
)
8989
)

test/integration/private_zonal_with_networking/inspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: private_zonal_with_networking
22
depends:
33
- name: inspec-gcp
44
git: https://github.com/inspec/inspec-gcp.git
5-
tag: v0.10.0
5+
tag: v1.8.0
66
attributes:
77
- name: project_id
88
required: true

test/integration/safer_cluster/inspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: safer_cluster
22
depends:
33
- name: inspec-gcp
44
git: https://github.com/inspec/inspec-gcp.git
5-
tag: v0.11.0
5+
tag: v1.8.0
66
attributes:
77
- name: project_id
88
required: true

test/integration/simple_regional_with_networking/inspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: simple_regional_with_networking
22
depends:
33
- name: inspec-gcp
44
git: https://github.com/inspec/inspec-gcp.git
5-
tag: v0.10.0
5+
tag: v1.8.0
66
attributes:
77
- name: project_id
88
required: true

0 commit comments

Comments
 (0)