Skip to content

Commit 3394612

Browse files
authored
Update Codefresh badge (#68)
1 parent 5d69100 commit 3394612

File tree

7 files changed

+21
-24
lines changed

7 files changed

+21
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
[![Cloud Posse][logo]](https://cpco.io/homepage)
55

6-
# terraform-null-label [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/cloudposse%2Fterraform-null-label%2Ftest?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/cloudposse/terraform-null-label/test) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-null-label.svg)](https://github.com/cloudposse/terraform-null-label/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
6+
# terraform-null-label [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-null-label?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d097280a52a3d4ae8db7221) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-null-label.svg)](https://github.com/cloudposse/terraform-null-label/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
77

88

9-
Terraform module designed to generate consistent label names and tags for resources. Use `terraform-null-label` to implement a strict naming convention.
9+
Terraform module designed to generate consistent names and tags for resources. Use `terraform-null-label` to implement a strict naming convention.
1010

1111
A label follows the following convention: `{namespace}-{environment}-{stage}-{name}-{attributes}`. The delimiter (e.g. `-`) is interchangeable.
1212
The label items are all optional. So if you prefer the term `stage` to `environment` you can exclude environment and the label `id` will look like `{namespace}-{stage}-{name}-{attributes}`.

README.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ github_repo: cloudposse/terraform-null-label
3333
# Badges to display
3434
badges:
3535
- name: "Codefresh Build Status"
36-
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/cloudposse%2Fterraform-null-label%2Ftest?type=cf-1"
37-
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/cloudposse/terraform-null-label/test"
36+
image: "https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-null-label?type=cf-1"
37+
url: "https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d097280a52a3d4ae8db7221"
3838
- name: "Latest Release"
3939
image: "https://img.shields.io/github/release/cloudposse/terraform-null-label.svg"
4040
url: "https://github.com/cloudposse/terraform-null-label/releases/latest"
@@ -49,7 +49,7 @@ related:
4949

5050
# Short description of this project
5151
description: |-
52-
Terraform module designed to generate consistent label names and tags for resources. Use `terraform-null-label` to implement a strict naming convention.
52+
Terraform module designed to generate consistent names and tags for resources. Use `terraform-null-label` to implement a strict naming convention.
5353
5454
A label follows the following convention: `{namespace}-{environment}-{stage}-{name}-{attributes}`. The delimiter (e.g. `-`) is interchangeable.
5555
The label items are all optional. So if you prefer the term `stage` to `environment` you can exclude environment and the label `id` will look like `{namespace}-{stage}-{name}-{attributes}`.

codefresh/test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: '1.0'
22

33
stages:
4-
- Prepare
5-
- Test
4+
- Prepare
5+
- Test
66

77
steps:
88
main_clone:
@@ -19,13 +19,13 @@ steps:
1919
image: ${{TEST_IMAGE}}
2020
stage: Prepare
2121
commands:
22-
- cf_export PATH="/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
23-
- make init
24-
- git -C build-harness checkout master
25-
- make -C test/ clean init TEST_HARNESS_BRANCH=master
26-
- make -C test/src clean init
27-
- find . -type d -name '.terraform' | xargs rm -rf
28-
- find . -type f -name 'terraform.tfstate*' -exec rm -f {} \;
22+
- cf_export PATH="/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
23+
- make init
24+
- git -C build-harness checkout master
25+
- make -C test/ clean init TEST_HARNESS_BRANCH=master
26+
- make -C test/src clean init
27+
- find . -type d -name '.terraform' | xargs rm -rf
28+
- find . -type f -name 'terraform.tfstate*' -exec rm -f {} \;
2929

3030
test:
3131
type: "parallel"
@@ -39,25 +39,25 @@ steps:
3939
image: ${{TEST_IMAGE}}
4040
description: Test "readme/lint"
4141
commands:
42-
- make readme/lint
42+
- make readme/lint
4343

4444
test_module:
4545
title: Test module with bats
4646
image: ${{TEST_IMAGE}}
4747
stage: Test
4848
commands:
49-
- make -C test/ module
49+
- make -C test/ module
5050

5151
test_examples_complete:
5252
title: Test "examples/complete" with bats
5353
image: ${{TEST_IMAGE}}
5454
stage: Test
5555
commands:
56-
- make -C test/ examples/complete
56+
- make -C test/ examples/complete
5757

5858
test_examples_complete_terratest:
5959
title: Test "examples/complete" with terratest
6060
image: ${{TEST_IMAGE}}
6161
stage: Test
6262
commands:
63-
- make -C test/src
63+
- make -C test/src

examples/complete/versions.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
terraform {
32
required_version = "~> 0.12.0"
43
}

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ locals {
2525
# Merge attributes
2626
attributes = compact(distinct(concat(var.attributes, var.context.attributes, local.defaults.attributes)))
2727

28-
2928
tags = merge(var.context.tags, local.generated_tags, var.tags)
3029
tags_as_list_of_maps = data.null_data_source.tags_as_list_of_maps.*.outputs
3130

3231
tags_context = {
33-
# For AWS we need `Name` to be disambiguated sine it has a special meaning
32+
# For AWS we need `Name` to be disambiguated sine it has a special meaning
3433
name = local.id
3534
namespace = local.namespace
3635
environment = local.environment
3736
stage = local.stage
3837
attributes = local.id_context.attributes
3938
}
39+
4040
generated_tags = { for l in keys(local.tags_context) : title(l) => local.tags_context[l] if length(local.tags_context[l]) > 0 }
4141

4242
id_context = {
@@ -76,6 +76,6 @@ data "null_data_source" "tags_as_list_of_maps" {
7676
"key" = element(keys(local.tags), count.index)
7777
"value" = element(values(local.tags), count.index)
7878
},
79-
var.additional_tag_map,
79+
var.additional_tag_map
8080
)
8181
}

provider.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
provider "null" {
22
version = "~> 2.1"
33
}
4-

terraform.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
terraform {
22
required_version = "~> 0.12.0"
33
}
4-

0 commit comments

Comments
 (0)