Skip to content

Commit

Permalink
Merge branch 'release/4.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Aug 5, 2019
2 parents e8493a0 + 2b305c9 commit 16d2e2b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 4.1.0 - 2019-08-05

- Changed:
- Runner tags namespaced with ":" are split wrong in userdata. #111 @ony-harverson-moonpig


## 4.0.0 - 2019-07-29

### Terraform 0.12
Expand Down Expand Up @@ -194,7 +200,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.0.0...HEAD
[Unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.1.0...HEAD
[4.1.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/4.0.0...4.1.0
[4.0.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.10.0...4.0.0
[3.10.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.9.0...3.10.0
[3.9.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.8.0...3.9.0
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Finally, the runner still supports the manual runner creation. No changes are re

By default the module creates a a cache for the runner in S3. Old objects are automatically remove via a configurable life cycle policy on the bucket.

Creation of the bucket can be disabled and managed outside this module. A good use case is for sharing the cache cross multiple runners. For this purpose the cache is implemented as sub module. For more details see the [cache module](https://github.com/npalm/terraform-aws-gitlab-runner/tree/4.0.0/cache). An example implementation of this use case can be find in the [runner-public](https://github.com/npalm/terraform-aws-gitlab-runner/tree/__GIT_REF__/examples/runner-public) example.
Creation of the bucket can be disabled and managed outside this module. A good use case is for sharing the cache cross multiple runners. For this purpose the cache is implemented as sub module. For more details see the [cache module](https://github.com/npalm/terraform-aws-gitlab-runner/tree/develop/cache). An example implementation of this use case can be find in the [runner-public](https://github.com/npalm/terraform-aws-gitlab-runner/tree/__GIT_REF__/examples/runner-public) example.

## Usage

Expand All @@ -147,7 +147,7 @@ The base image used to host the GitLab Runner agent is the latest available Amaz

### Usage module

Below a basic examples of usages of the module. The dependencies such as a VPC, and SSH keys have a look at the [default example](https://github.com/npalm/terraform-aws-gitlab-runner/tree/4.0.0/examples/runner-default).
Below a basic examples of usages of the module. The dependencies such as a VPC, and SSH keys have a look at the [default example](https://github.com/npalm/terraform-aws-gitlab-runner/tree/develop/examples/runner-default).

``` hcl
module "runner" {
Expand Down Expand Up @@ -179,7 +179,7 @@ module "runner" {

## Examples

A few [examples](https://github.com/npalm/terraform-aws-gitlab-runner/tree/4.0.0/examples/) are provided. Use the following steps to deploy. Ensure your AWS and Terraform environment is set up correctly. All commands below should be run from the `terraform-aws-gitlab-runner/examples/<example-dir>` directory.
A few [examples](https://github.com/npalm/terraform-aws-gitlab-runner/tree/develop/examples/) are provided. Use the following steps to deploy. Ensure your AWS and Terraform environment is set up correctly. All commands below should be run from the `terraform-aws-gitlab-runner/examples/<example-dir>` directory.

### SSH keys

Expand Down
5 changes: 5 additions & 0 deletions examples/runner-default/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ module "runner" {
maximum_timeout = "3600"
}

tags = {
"tf-aws-gitlab-runner:example" = "runner-default"
"tf-aws-gitlab-runner:instancelifecycle" = "spot:yes"
}

runners_off_peak_timezone = var.timezone
runners_off_peak_idle_count = 0
runners_off_peak_idle_time = 60
Expand Down
8 changes: 3 additions & 5 deletions tags.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ locals {
var.tags,
)

tags_string = replace(
replace(jsonencode(local.tags), "/[\\{\\}\"\\s]/", ""),
":",
",",
)
tags_string = join(",", flatten([
for key in keys(local.tags) : [key, lookup(local.tags, key)]
]))
}

data "null_data_source" "tags" {
Expand Down

0 comments on commit 16d2e2b

Please sign in to comment.