Skip to content

Commit

Permalink
Merge branch 'release/4.22.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Feb 14, 2021
2 parents b9ff8f5 + 1fa4993 commit e992786
Show file tree
Hide file tree
Showing 30 changed files with 316 additions and 290 deletions.
7 changes: 6 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
## Description

A few sentences describing the overall goals of the pull request's commits.

## Migrations required

YES | NO - If yes please describe the migration.

## Verification

Please mention the examples you have verified.

## Documentation
Please ensure you update the README in `_docs/README.md`. The README.md in the root can be updated by running the script `ci/bin/autodocs.sh`, requires `terraform-docs` version 0.8+

We use [pre-commit](https://pre-commit.com/) to update the Terraform inputs and outputs in the documentation via [terraform-docs](https://github.com/terraform-docs/terraform-docs). Ensure you have installed those components.

44 changes: 28 additions & 16 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
name: Verify
on:
push:
push:
branches:
- master
- develop
pull_request:


jobs:
verify:
validate_module:
name: Verify module
strategy:
matrix:
terraform: [0.13.6]
runs-on: ubuntu-latest

container:
image: hashicorp/terraform:${{ matrix.terraform }}
steps:
- uses: actions/checkout@v1
- name: verify
run: |
source ./ci/bin/install.sh
./ci/bin/verify.sh
- uses: actions/checkout@v2
- run: terraform init -get -backend=false -input=false
- run: terraform fmt -recursive -check=true -write=false

verify-examples:
verify_examples:
name: Verify examples
strategy:
matrix:
terraform: [0.13.6, 0.14.5, latest]
example: ["runner-default", "runner-docker", "runner-pre-registered", "runner-public"]
defaults:
run:
working-directory: examples/${{ matrix.example }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: verify-examples
run: |
source ./ci/bin/install.sh
./ci/bin/verify-examples.sh
container:
image: hashicorp/terraform:${{ matrix.terraform }}
steps:
- uses: actions/checkout@v2
- run: terraform init -get -backend=false -input=false
- run: terraform fmt -recursive -check=true -write=false
- run: terraform validate
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.30.0
rev: v1.45.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"markdown.extension.toc.levels": "1..2"
}
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## 4.22.0 - 2021-02-14

- Changed: feat: Restrict public access and public objects for cache bucket (#295) @stefan-kolb
- Changed: docs: Improve spelling and fix typos in README.md (#285) @NikolaiGulatz
- Changed: ci: rewrite CI, examples verified for Terraform 13 and 14
- Changed: fix: failing pip install for assigning eip #280
- Added: feat: Add option to customize helper image (#293) @stefan-kolb
- Added: chore: Contributors list (#291)
- Added: feat: Support Security Group custom description (#278) @pandarouxbsd


## 4.21.0 - 2021-01-13

- Changed: Updated default version of runner to 13.7
- Changed: Updated default version of docker machine to GitLab v0.16.2-gitlab.2
- Changed: Updated default runner ami to ubuntu 20.04
Expand Down Expand Up @@ -397,7 +408,8 @@ Module is available as Terraform 0.11 module, pin module to version 3.x. Please
- Update default AMI's to The latest Amazon Linux AMI 2017.09.1 - released on 2018-01-17.
- Minor updates in the example

[unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.21.0...HEAD
[unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.22.0...HEAD
[4.22.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.22.0...4.21.0
[4.21.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.21.0...4.20.0
[4.20.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.20.0...4.19.0
[4.19.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.19.0...4.18.0
Expand Down
265 changes: 142 additions & 123 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
5 changes: 0 additions & 5 deletions ci/bin/install.sh

This file was deleted.

34 changes: 0 additions & 34 deletions ci/bin/terraform.sh

This file was deleted.

25 changes: 0 additions & 25 deletions ci/bin/verify-examples.sh

This file was deleted.

6 changes: 0 additions & 6 deletions ci/bin/verify.sh

This file was deleted.

4 changes: 2 additions & 2 deletions examples/runner-default/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data "aws_security_group" "default" {

module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.48"
version = "2.70"

name = "vpc-${var.environment}"
cidr = "10.0.0.0/16"
Expand Down Expand Up @@ -102,6 +102,6 @@ resource "null_resource" "cancel_spot_requests" {

provisioner "local-exec" {
when = destroy
command = "../../ci/bin/cancel-spot-instances.sh ${self.triggers.environment}"
command = "../../bin/cancel-spot-instances.sh ${self.triggers.environment}"
}
}
19 changes: 5 additions & 14 deletions examples/runner-default/providers.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
provider "aws" {
region = var.aws_region
version = "~> 3.23.0"
region = var.aws_region
}

provider "local" {
version = "1.4"
}
provider "local" {}

provider "null" {
version = "~> 3.0.0"
}
provider "null" {}

provider "tls" {
version = "2.2.0"
}
provider "tls" {}

provider "random" {
version = "~> 3.0.1"
}
provider "random" {}
16 changes: 12 additions & 4 deletions examples/runner-default/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
version = "~> 3.23"
}
local = {
source = "hashicorp/local"
source = "hashicorp/local"
version = "~> 1.4"
}
null = {
source = "hashicorp/null"
source = "hashicorp/null"
version = "~> 3.0"
}
tls = {
source = "hashicorp/tls"
source = "hashicorp/tls"
version = "~> 2.2"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
}
}
}
2 changes: 2 additions & 0 deletions examples/runner-docker/_docs/TF_MODULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
| registration\_token | n/a | `any` | n/a | yes |
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"docker"` | no |
| docker_machine_security_group_description | Description for the docker machine security group. | `string` | `"A security group containing docker-machine instances"` | no |
| gitlab_runner_security_group_description | Name of the timezone that the runner will be used in. | `string` | `"A security group containing gitlab-runner agent instances"` | no |

## Outputs

Expand Down
5 changes: 4 additions & 1 deletion examples/runner-docker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data "aws_availability_zones" "available" {

module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.48"
version = "2.70"

name = "vpc-${var.environment}"
cidr = "10.1.0.0/16"
Expand Down Expand Up @@ -37,6 +37,9 @@ module "runner" {
runners_use_private_address = false
enable_eip = true

docker_machine_security_group_description = "Custom description for docker-machine"
gitlab_runner_security_group_description = "Custom description for gitlab-runner"

vpc_id = module.vpc.vpc_id
subnet_ids_gitlab_runner = module.vpc.public_subnets
subnet_id_runners = element(module.vpc.public_subnets, 0)
Expand Down
17 changes: 6 additions & 11 deletions examples/runner-docker/providers.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
provider "aws" {
region = var.aws_region
version = "2.68"
region = var.aws_region
}

provider "local" {
version = "1.4"
}
provider "local" {}

provider "null" {
version = "2.1.2"
}
provider "null" {}

provider "tls" {
version = "2.2.0"
}
provider "tls" {}

provider "random" {}
19 changes: 14 additions & 5 deletions examples/runner-docker/versions.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@

terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
version = "~> 3.23"
}
local = {
source = "hashicorp/local"
source = "hashicorp/local"
version = "~> 1.4"
}
null = {
source = "hashicorp/null"
source = "hashicorp/null"
version = "~> 3.0"
}
tls = {
source = "hashicorp/tls"
source = "hashicorp/tls"
version = "~> 2.2"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
}
}
required_version = ">= 0.13"
}
2 changes: 1 addition & 1 deletion examples/runner-pre-registered/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data "aws_availability_zones" "available" {

module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.48"
version = "2.70"

name = "vpc-${var.environment}"
cidr = "10.0.0.0/16"
Expand Down
17 changes: 6 additions & 11 deletions examples/runner-pre-registered/providers.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
provider "aws" {
region = var.aws_region
version = "2.68"
region = var.aws_region
}

provider "local" {
version = "1.4"
}
provider "local" {}

provider "null" {
version = "2.1.2"
}
provider "null" {}

provider "tls" {
version = "2.2.0"
}
provider "tls" {}

provider "random" {}
Loading

0 comments on commit e992786

Please sign in to comment.