Skip to content

Commit ff2e84c

Browse files
authored
Add badge and timeout support (#13)
* Add badge and timeout support * Update readme * add outputs * default to false * update readme * pin to release
1 parent 3e7e417 commit ff2e84c

File tree

6 files changed

+121
-29
lines changed

6 files changed

+121
-29
lines changed

README.md

Lines changed: 91 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
2+
[![README Header][readme_header_img]][readme_header_link]
23

3-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
4+
[![Cloud Posse][logo]](https://cpco.io/homepage)
45

56
# terraform-aws-ecs-codepipeline [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-ecs-codepipeline.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-ecs-codepipeline) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-ecs-codepipeline.svg)](https://github.com/cloudposse/terraform-aws-ecs-codepipeline/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
67

@@ -10,7 +11,17 @@ Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS.
1011

1112
---
1213

13-
This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps.
14+
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
15+
[<img align="right" title="Share via Email" src="https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg"/>][share_email]
16+
[<img align="right" title="Share on Google+" src="https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg" />][share_googleplus]
17+
[<img align="right" title="Share on Facebook" src="https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg" />][share_facebook]
18+
[<img align="right" title="Share on Reddit" src="https://docs.cloudposse.com/images/ionicons/social-reddit-outline-2.0.1-16x16-999999.svg" />][share_reddit]
19+
[<img align="right" title="Share on LinkedIn" src="https://docs.cloudposse.com/images/ionicons/social-linkedin-outline-2.0.1-16x16-999999.svg" />][share_linkedin]
20+
[<img align="right" title="Share on Twitter" src="https://docs.cloudposse.com/images/ionicons/social-twitter-outline-2.0.1-16x16-999999.svg" />][share_twitter]
21+
22+
23+
[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]
24+
1425

1526

1627
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
@@ -21,6 +32,11 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
2132

2233

2334

35+
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
36+
37+
38+
39+
2440

2541

2642

@@ -55,21 +71,23 @@ Complete usage can be seen in the [terraform-aws-ecs-web-app](https://github.com
5571
```
5672
Available targets:
5773
58-
help This help screen
74+
help Help screen
5975
help/all Display help for all targets
76+
help/short This help short screen
6077
6178
```
62-
6379
## Inputs
6480

6581
| Name | Description | Type | Default | Required |
6682
|------|-------------|:----:|:-----:|:-----:|
6783
| attributes | Additional attributes (e.g. `policy` or `role`) | list | `<list>` | no |
6884
| aws_account_id | AWS Account ID. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html) | string | `` | no |
6985
| aws_region | AWS Region, e.g. us-east-1. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html) | string | `` | no |
86+
| badge_enabled | Generates a publicly-accessible URL for the projects build badge. Available as badge_url attribute when enabled. | string | `false` | no |
7087
| branch | Branch of the GitHub repository, _e.g._ `master` | string | - | yes |
7188
| build_compute_type | `CodeBuild` instance size. Possible values are: `BUILD_GENERAL1_SMALL` `BUILD_GENERAL1_MEDIUM` `BUILD_GENERAL1_LARGE` | string | `BUILD_GENERAL1_SMALL` | no |
7289
| build_image | Docker image for build environment, _e.g._ `aws/codebuild/docker:docker:17.09.0` | string | `aws/codebuild/docker:17.09.0` | no |
90+
| build_timeout | How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. | string | `60` | no |
7391
| buildspec | Declaration to use for building the project. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html) | string | `` | no |
7492
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no |
7593
| ecs_cluster_name | ECS Cluster Name | string | - | yes |
@@ -88,8 +106,21 @@ Available targets:
88106
| stage | Stage, e.g. 'prod', 'staging', 'dev', or 'test' | string | `default` | no |
89107
| tags | Additional tags (e.g. `map('BusinessUnit', 'XYZ')` | map | `<map>` | no |
90108

109+
## Outputs
110+
111+
| Name | Description |
112+
|------|-------------|
113+
| badge_url | The URL of the build badge when badge_enabled is enabled |
114+
115+
91116

92117

118+
## Share the Love
119+
120+
Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-aws-ecs-codepipeline)! (it helps us **a lot**)
121+
122+
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
123+
93124

94125
## Related Projects
95126

@@ -111,26 +142,38 @@ Check out these related projects.
111142

112143
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-ecs-codepipeline/issues), send us an [email][email] or join our [Slack Community][slack].
113144

145+
[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]
146+
114147
## Commercial Support
115148

116149
Work directly with our team of DevOps experts via email, slack, and video conferencing.
117150

118151
We provide [*commercial support*][commercial_support] for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.
119152

120-
[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)](mailto:hello@cloudposse.com)
153+
[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)][email]
121154

122155
- **Questions.** We'll use a Shared Slack channel between your team and ours.
123156
- **Troubleshooting.** We'll help you triage why things aren't working.
124157
- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback.
125158
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects.
126-
- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure.
159+
- **Build New Terraform Modules.** We'll [develop original modules][module_development] to provision infrastructure.
127160
- **Cloud Architecture.** We'll assist with your cloud strategy and design.
128161
- **Implementation.** We'll provide hands-on support to implement our reference architectures.
129162

130163

131-
## Community Forum
132164

133-
Get access to our [Open Source Community Forum][slack] on Slack. It's **FREE** to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build *sweet* infrastructure.
165+
## Terraform Module Development
166+
167+
Are you interested in custom Terraform module development? Submit your inquiry using [our form][module_development] today and we'll get back to you ASAP.
168+
169+
170+
## Slack Community
171+
172+
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
173+
174+
## Newsletter
175+
176+
Signup for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
134177

135178
## Contributing
136179

@@ -140,7 +183,7 @@ Please use the [issue tracker](https://github.com/cloudposse/terraform-aws-ecs-c
140183

141184
### Developing
142185

143-
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://github.com/orgs/cloudposse/projects/3) with our other projects, we would love to hear from you! Shoot us an [email](mailto:hello@cloudposse.com).
186+
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://cpco.io/help-out) with our other projects, we would love to hear from you! Shoot us an [email][email].
144187

145188
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
146189

@@ -155,7 +198,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
155198

156199
## Copyright
157200

158-
Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com)
201+
Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
159202

160203

161204

@@ -196,26 +239,16 @@ All other trademarks referenced herein are the property of their respective owne
196239

197240
## About
198241

199-
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know at <hello@cloudposse.com>
242+
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know by [leaving a testimonial][testimonial]!
200243

201-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
244+
[![Cloud Posse][logo]][website]
202245

203-
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We love [Open Source Software](https://github.com/cloudposse/)!
246+
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
204247

205-
We offer paid support on all of our projects.
248+
We offer [paid support][commercial_support] on all of our projects.
206249

207-
Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
250+
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
208251

209-
[docs]: https://docs.cloudposse.com/
210-
[website]: https://cloudposse.com/
211-
[github]: https://github.com/cloudposse/
212-
[commercial_support]: https://github.com/orgs/cloudposse/projects
213-
[jobs]: https://cloudposse.com/jobs/
214-
[hire]: https://cloudposse.com/contact/
215-
[slack]: https://slack.cloudposse.com/
216-
[linkedin]: https://www.linkedin.com/company/cloudposse
217-
[twitter]: https://twitter.com/cloudposse/
218-
[email]: mailto:hello@cloudposse.com
219252

220253

221254
### Contributors
@@ -233,3 +266,36 @@ Check out [our other projects][github], [apply for a job][jobs], or [hire us][hi
233266
[sarkis_avatar]: https://github.com/sarkis.png?size=150
234267

235268

269+
270+
[![README Footer][readme_footer_img]][readme_footer_link]
271+
[![Beacon][beacon]][website]
272+
273+
[logo]: https://cloudposse.com/logo-300x69.svg
274+
[docs]: https://cpco.io/docs
275+
[website]: https://cpco.io/homepage
276+
[github]: https://cpco.io/github
277+
[jobs]: https://cpco.io/jobs
278+
[hire]: https://cpco.io/hire
279+
[slack]: https://cpco.io/slack
280+
[linkedin]: https://cpco.io/linkedin
281+
[twitter]: https://cpco.io/twitter
282+
[testimonial]: https://cpco.io/leave-testimonial
283+
[newsletter]: https://cpco.io/newsletter
284+
[email]: https://cpco.io/email
285+
[commercial_support]: https://cpco.io/commercial-support
286+
[we_love_open_source]: https://cpco.io/we-love-open-source
287+
[module_development]: https://cpco.io/module-development
288+
[terraform_modules]: https://cpco.io/terraform-modules
289+
[readme_header_img]: https://cloudposse.com/readme/header/img?repo=cloudposse/terraform-aws-ecs-codepipeline
290+
[readme_header_link]: https://cloudposse.com/readme/header/link?repo=cloudposse/terraform-aws-ecs-codepipeline
291+
[readme_footer_img]: https://cloudposse.com/readme/footer/img?repo=cloudposse/terraform-aws-ecs-codepipeline
292+
[readme_footer_link]: https://cloudposse.com/readme/footer/link?repo=cloudposse/terraform-aws-ecs-codepipeline
293+
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img?repo=cloudposse/terraform-aws-ecs-codepipeline
294+
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?repo=cloudposse/terraform-aws-ecs-codepipeline
295+
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-ecs-codepipeline&url=https://github.com/cloudposse/terraform-aws-ecs-codepipeline
296+
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-ecs-codepipeline&url=https://github.com/cloudposse/terraform-aws-ecs-codepipeline
297+
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-ecs-codepipeline
298+
[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-ecs-codepipeline
299+
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-ecs-codepipeline
300+
[share_email]: mailto:?subject=terraform-aws-ecs-codepipeline&body=https://github.com/cloudposse/terraform-aws-ecs-codepipeline
301+
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-ecs-codepipeline?pixel&cs=github&cm=readme&an=terraform-aws-ecs-codepipeline

docs/targets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
```
33
Available targets:
44
5-
help This help screen
5+
help Help screen
66
help/all Display help for all targets
7+
help/short This help short screen
78
89
```

docs/terraform.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
21
## Inputs
32

43
| Name | Description | Type | Default | Required |
54
|------|-------------|:----:|:-----:|:-----:|
65
| attributes | Additional attributes (e.g. `policy` or `role`) | list | `<list>` | no |
76
| aws_account_id | AWS Account ID. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html) | string | `` | no |
87
| aws_region | AWS Region, e.g. us-east-1. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html) | string | `` | no |
8+
| badge_enabled | Generates a publicly-accessible URL for the projects build badge. Available as badge_url attribute when enabled. | string | `false` | no |
99
| branch | Branch of the GitHub repository, _e.g._ `master` | string | - | yes |
1010
| build_compute_type | `CodeBuild` instance size. Possible values are: `BUILD_GENERAL1_SMALL` `BUILD_GENERAL1_MEDIUM` `BUILD_GENERAL1_LARGE` | string | `BUILD_GENERAL1_SMALL` | no |
1111
| build_image | Docker image for build environment, _e.g._ `aws/codebuild/docker:docker:17.09.0` | string | `aws/codebuild/docker:17.09.0` | no |
12+
| build_timeout | How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. | string | `60` | no |
1213
| buildspec | Declaration to use for building the project. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html) | string | `` | no |
1314
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no |
1415
| ecs_cluster_name | ECS Cluster Name | string | - | yes |
@@ -27,3 +28,9 @@
2728
| stage | Stage, e.g. 'prod', 'staging', 'dev', or 'test' | string | `default` | no |
2829
| tags | Additional tags (e.g. `map('BusinessUnit', 'XYZ')` | map | `<map>` | no |
2930

31+
## Outputs
32+
33+
| Name | Description |
34+
|------|-------------|
35+
| badge_url | The URL of the build badge when badge_enabled is enabled |
36+

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,14 @@ data "aws_iam_policy_document" "codebuild" {
163163
}
164164

165165
module "build" {
166-
source = "git::https://github.com/cloudposse/terraform-aws-codebuild.git?ref=tags/0.7.2"
166+
source = "git::https://github.com/cloudposse/terraform-aws-codebuild.git?ref=tags/0.11.0"
167+
enabled = "${var.enabled}"
167168
namespace = "${var.namespace}"
168169
name = "${var.name}"
169170
stage = "${var.stage}"
170171
build_image = "${var.build_image}"
171172
build_compute_type = "${var.build_compute_type}"
173+
build_timeout = "${var.build_timeout}"
172174
buildspec = "${var.buildspec}"
173175
delimiter = "${var.delimiter}"
174176
attributes = "${concat(var.attributes, list("build"))}"
@@ -179,8 +181,8 @@ module "build" {
179181
image_repo_name = "${var.image_repo_name}"
180182
image_tag = "${var.image_tag}"
181183
github_token = "${var.github_oauth_token}"
182-
enabled = "${var.enabled}"
183184
environment_variables = "${var.environment_variables}"
185+
badge_enabled = "${var.badge_enabled}"
184186
}
185187

186188
resource "aws_iam_role_policy_attachment" "codebuild_s3" {

outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
output "badge_url" {
2+
description = "The URL of the build badge when badge_enabled is enabled"
3+
value = "${module.build.badge_url}"
4+
}

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ variable "branch" {
4444
description = "Branch of the GitHub repository, _e.g._ `master`"
4545
}
4646

47+
variable "badge_enabled" {
48+
type = "string"
49+
default = "false"
50+
description = "Generates a publicly-accessible URL for the projects build badge. Available as badge_url attribute when enabled."
51+
}
52+
4753
variable "build_image" {
4854
default = "aws/codebuild/docker:17.09.0"
4955
description = "Docker image for build environment, _e.g._ `aws/codebuild/docker:docker:17.09.0`"
@@ -54,6 +60,12 @@ variable "build_compute_type" {
5460
description = "`CodeBuild` instance size. Possible values are: `BUILD_GENERAL1_SMALL` `BUILD_GENERAL1_MEDIUM` `BUILD_GENERAL1_LARGE`"
5561
}
5662

63+
variable "build_timeout" {
64+
type = "string"
65+
default = "60"
66+
description = "How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed."
67+
}
68+
5769
variable "buildspec" {
5870
default = ""
5971
description = "Declaration to use for building the project. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html)"

0 commit comments

Comments
 (0)