Skip to content

Commit

Permalink
chore: update tests to use 1.0 image and update compat note (#85)
Browse files Browse the repository at this point in the history
* chore: update tests to use 1.0 image and update compat note

* bump invalid gke default version

* regen doc, fix build

Co-authored-by: Bharath KKB <[email protected]>
  • Loading branch information
cloud-foundation-bot and bharathkkb authored Nov 15, 2021
1 parent 9c378a5 commit e9c5b90
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 20 deletions.
14 changes: 14 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

releaseType: terraform-module
handleGHRelease: true
14 changes: 14 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Close stale issues"
on:
schedule:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ crash.log
test/fixtures/shared/terraform.tfvars

credentials.json

# tf lock file
.terraform.lock.hcl
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.0
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Then perform the following commands on the root folder:
| gitlab\_runner\_install | Choose whether to install the gitlab runner in the cluster | `bool` | `true` | no |
| gitlab\_services\_subnet\_cidr | Cidr range to use for gitlab GKE services subnet | `string` | `"10.2.0.0/16"` | no |
| gke\_machine\_type | Machine type used for the node-pool | `string` | `"n1-standard-4"` | no |
| gke\_version | Version of GKE to use for the GitLab cluster | `string` | `"1.16"` | no |
| gke\_version | Version of GKE to use for the GitLab cluster | `string` | `"1.20"` | no |
| helm\_chart\_version | Helm chart version to install during deployment | `string` | `"4.2.4"` | no |
| project\_id | GCP Project to deploy resources | `any` | n/a | yes |
| region | GCP region to deploy resources to | `string` | `"us-central1"` | no |
Expand Down
4 changes: 2 additions & 2 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ timeout: 7200s
steps:
- id: prepare
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment']
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && chmod 600 /builder/home/.netrc']
env:
- 'TF_VAR_org_id=$_ORG_ID'
- 'TF_VAR_folder_id=$_FOLDER_ID'
Expand All @@ -38,6 +38,6 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'
options:
machineType: 'N1_HIGHCPU_8'
2 changes: 1 addition & 1 deletion build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tags:
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'
6 changes: 3 additions & 3 deletions examples/simple_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/

provider "google" {
version = "~> 3.42.0"
version = "~> 3.42"
}

provider "google-beta" {
version = "~> 3.42.0"
version = "~> 3.42"
}

module "gke-gitlab" {
source = "../../"
project_id = "${var.project_id}"
project_id = var.project_id
certmanager_email = "no-reply@${var.project_id}.example.com"
}
4 changes: 2 additions & 2 deletions examples/simple_example/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

output "gitlab_url" {
value = "${module.gke-gitlab.gitlab_url}"
value = module.gke-gitlab.gitlab_url
}

output "root_password_instructions" {
value = "${module.gke-gitlab.root_password_instructions}"
value = module.gke-gitlab.root_password_instructions
}
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ provider "kubernetes" {
// Services
module "project_services" {
source = "terraform-google-modules/project-factory/google//modules/project_services"
version = "~> 9.0"
version = "~> 11.0"

project_id = var.project_id
disable_services_on_destroy = false
Expand Down Expand Up @@ -370,7 +370,7 @@ locals {
}

data "template_file" "helm_values" {
template = "${file("${path.module}/values.yaml.tpl")}"
template = file("${path.module}/values.yaml.tpl")

vars = {
DOMAIN = local.domain
Expand Down
14 changes: 14 additions & 0 deletions test/integration/simple_example/inspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: simple_example
depends:
- name: inspec-gcp
Expand Down
13 changes: 6 additions & 7 deletions test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@

module "gke-gitlab-proj" {
source = "terraform-google-modules/project-factory/google"
version = "~> 9.0"
version = "~> 11.0"

name = "ci-gitlab"
random_project_id = true
org_id = var.org_id
folder_id = var.folder_id
billing_account = var.billing_account
skip_gcloud_download = true
name = "ci-gitlab"
random_project_id = true
org_id = var.org_id
folder_id = var.folder_id
billing_account = var.billing_account

auto_create_network = true

Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ variable "certmanager_email" {

variable "gke_version" {
description = "Version of GKE to use for the GitLab cluster"
default = "1.16"
default = "1.20"
}

variable "gke_machine_type" {
Expand Down

0 comments on commit e9c5b90

Please sign in to comment.