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

Commit

Permalink
Prepare 0.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Mar 30, 2018
1 parent dc9a901 commit 858e9b4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
terraform-aws-github-ci-0.4.0 (2017-03-30)

* Refactored complete code base into TypeScript

terraform-aws-github-ci-0.3.0 (2017-12-03)

* Fixed compatibility errors with Terraform 0.11
Expand Down
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,39 @@ regardless of how much you use them.

## Usage

You need an AWS and GitHub account and a repository you want to be built. The
repository must specify a `buildspec.yml` which is documented [here][2]. First,
you need to go to the [CodeBuild][3] dashboard in your region, manually create
a new project and choose GitHub as the **Source provider**, allowing AWS to
authorize your account.

[2]: http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.htm
[3]: https://console.aws.amazon.com/codebuild/home

### Standalone

You need an AWS and GitHub account and a repository you want to be built. The
repository must specify a `buildspec.yml` which is documented [here][2]. If you
want to get started straight away and have no experience in Terraform, just
[set up your AWS credentials][3], [install Terraform][4], clone the repository
and apply the configuration from the root folder with:
If you want to get started straight away and have no experience in Terraform,
just [set up your AWS credentials][4], [install Terraform][5], clone the
repository and apply the configuration from the root folder with:

``` bash
terraform apply \
-var github_owner=<owner> \
-var github_repository=<repository> \
-var github_oauth_token=<oauth-token> \
-var namespace=<something-unique-for-you>
-var namespace=<unique-identifier>
```

The unique namespace is used for naming resources, specifically important for S3 buckets which are globally unique.
All resources are prefixed with the value specified as `namespace`. If the S3
bucket name (see below) is not explicitly set, it's set to the given `namespace`
which means there must not already exist and S3 bucket with the same name.

Now, when you push to `master`, or create a pull request, CodeBuild will
automatically build the commit and report the status back to GitHub.

[4]: http://docs.aws.amazon.com/de_de/cli/latest/userguide/cli-chap-getting-started.html
[5]: https://www.terraform.io/downloads.html

### Module

Include and configure this module in your Terraform configuration:
Expand All @@ -80,12 +92,9 @@ the terminal.

**Note**: the OAuth-token is currently mandatory, because Terraform doesn't
support conditional blocks inside resources. However, this feature is currently
[being implemented][5] and should be released shortly. You need to go to [CodeBuild](https://eu-west-1.console.aws.amazon.com/codebuild/home) in your region, manually start creating a new project and choose GitHub as the **Source provider**, allowing AWS to authorize to your account.
[being implemented][6] and should be released shortly.

[2]: http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.htm
[3]: http://docs.aws.amazon.com/de_de/cli/latest/userguide/cli-chap-getting-started.html
[4]: https://www.terraform.io/downloads.html
[5]: https://github.com/hashicorp/terraform/issues/7034
[6]: https://github.com/hashicorp/terraform/issues/7034

## Configuration

Expand All @@ -110,7 +119,7 @@ The following variables can be configured:

#### `namespace`

- **Description**: AWS resource namespace/prefix, *only lowercase alphanumeric characters and hyphens allowed*
- **Description**: AWS resource namespace/prefix (lowercase alphanumeric)
- **Default**: `"github-ci"`

### Optional
Expand Down

0 comments on commit 858e9b4

Please sign in to comment.