Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit c5062e6

Browse files
committed
Merge branch 'dxw-feature/replace-modules-with-aws-resources'
2 parents 05ab5a2 + 0d95ffb commit c5062e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+15
-2819
lines changed

.githooks/pre-commit

Lines changed: 0 additions & 73 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ node_js: 8
2828
git:
2929
depth: 5
3030

31-
# Cache dependencies
32-
cache:
33-
directories:
34-
- modules/status/lambda/node_modules
35-
- modules/webhook/lambda/node_modules
36-
37-
# Install dependencies
38-
install:
39-
- npm install --prefix modules/status/lambda
40-
- npm install --prefix modules/webhook/lambda
41-
42-
# Perform build and release
31+
# Build script
4332
script:
44-
- make lint
45-
- make build
33+
- terraform fmt -check -diff

Makefile

Lines changed: 0 additions & 59 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ request and build status support using AWS CodeBuild.
2323
This module registers a GitHub webhook which is triggered for `push` and
2424
`pull_request` events and starts the build for the respective branch. All
2525
builds run in parallel. The build progress and status for a respective commit
26-
is reported back to GitHub. Furthermore, a badge for the status of `master` is
27-
generated and hosted on S3.
26+
is reported back to GitHub.
2827

2928
### Cost
3029

@@ -54,7 +53,7 @@ Next, add the following module to your Terraform configuration and apply it:
5453
``` hcl
5554
module "github_ci" {
5655
source = "github.com/squidfunk/terraform-aws-github-ci"
57-
version = "0.5.4"
56+
version = "0.6.0"
5857
5958
namespace = "<namespace>"
6059
github_owner = "<owner>"

assets/architecture.png

-65.6 KB
Binary file not shown.

main.tf

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,6 @@ resource "aws_s3_bucket" "_" {
9292
acl = "private"
9393
}
9494

95-
# aws_s3_bucket_object._
96-
resource "aws_s3_bucket_object" "_" {
97-
bucket = "${aws_s3_bucket._.bucket}"
98-
key = "${var.github_repository}/status.svg"
99-
source = "${path.module}/share/badges/unknown.svg"
100-
acl = "public-read"
101-
cache_control = "no-cache, no-store, must-revalidate"
102-
content_type = "image/svg+xml"
103-
104-
# Ignore, if there already is a status
105-
lifecycle {
106-
ignore_changes = ["*"]
107-
}
108-
}
109-
11095
# -----------------------------------------------------------------------------
11196
# Resources: CodeBuild
11297
# -----------------------------------------------------------------------------
@@ -119,6 +104,7 @@ resource "aws_codebuild_project" "_" {
119104

120105
build_timeout = "5"
121106
service_role = "${aws_iam_role.codebuild.arn}"
107+
badge_enabled = "${var.codebuild_badge_enabled}"
122108

123109
source {
124110
type = "GITHUB"
@@ -147,32 +133,7 @@ resource "aws_codebuild_project" "_" {
147133
}
148134
}
149135

150-
# -----------------------------------------------------------------------------
151-
# Modules
152-
# -----------------------------------------------------------------------------
153-
154-
# module.status
155-
module "status" {
156-
source = "./modules/status"
157-
158-
namespace = "${var.namespace}"
159-
160-
github_owner = "${var.github_owner}"
161-
github_repository = "${var.github_repository}"
162-
github_oauth_token = "${var.github_oauth_token}"
163-
github_reporter = "${var.github_reporter}"
164-
165-
bucket = "${aws_s3_bucket._.bucket}"
166-
}
167-
168-
# module.webhook
169-
module "webhook" {
170-
source = "./modules/webhook"
171-
172-
namespace = "${var.namespace}"
173-
174-
github_owner = "${var.github_owner}"
175-
github_repository = "${var.github_repository}"
176-
github_oauth_token = "${var.github_oauth_token}"
177-
github_reporter = "${var.github_reporter}"
136+
# aws_codebuild_webhook._
137+
resource "aws_codebuild_webhook" "_" {
138+
project_name = "${aws_codebuild_project._.name}"
178139
}

modules/status/cloudwatch/rules/codebuild.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

modules/status/iam/policies/assume-role/lambda.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

modules/status/iam/policies/lambda.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

modules/status/lambda/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)