An open API service indexing awesome lists of open source software.

https://github.com/petegoo/concourse-codebuild-resource

Allows Concourse to interact with AWS Codebuild projects
https://github.com/petegoo/concourse-codebuild-resource

aws-codebuild codebuild concourse

Last synced: 5 months ago
JSON representation

Allows Concourse to interact with AWS Codebuild projects

Awesome Lists containing this project

README

          

# AWS Codebuild Resource

[![Docker Build Status](https://img.shields.io/docker/build/petegoo/concourse-codebuild-resource.svg)](https://hub.docker.com/r/petegoo/concourse-codebuild-resource)

Allows Concourse to interact with [AWS Codebuild](https://aws.amazon.com/codebuild/) projects

- *check:* Respond to new builds completed in Codebuild
- *in:* Pull in artifacts from a completed Codebuild build
- *out:* Start a new build in Codebuild, monitor logs and wait for it to complete

## Resource Type Configuration

```
resource_types:
- name: codebuild
type: docker-image
source:
repository: petegoo/concourse-codebuild-resource
tag: latest
```

## Source Configuration
Make sure you have a Codebuild project already setup.

- `project`: _Required._ The name of the codebuild project
- `region`: _Optional_. The region the Codebuild project resides in. Defaults to the value in the worker instance metadata.
- `role_arn`: _Optional._ The role to assume before calling the command to start aws codebuild. This is not the role that Codebuild will use when it runs. Allows cross account access to Codebuild.

```
resources:
- name: my-project-codebuild
type: codebuild
source:
project: my_project
```

## Behaviour

### `out`: Starts a new build of a Codebuild project
Start a codebuild build of the project configured in the source, optionally overriding the build parameters.

The concourse build will print the build output from the codebuild cloudwatch log group and wait for the build to complete.

After a successful build, the `out` operation will fetch any configured artifacts generated by codebuild from their location in S3.

#### Parameters

Optional:
- `source_version`: The source version supplied to the codebuild sourceVersion parameter.
- `source_version_file`: The path to a file that contains the source version to be supplied to the codebuild sourceVersion parameter. Useful for mapping from e.g. a git resource
- `env_var_overrides`: A list of values and their override values. See below
- `build_input_file`: The path to a file that contains the entire build call that will be passed to the AWS cli command. For an example see `aws codebuild start-build --generate-cli-skeleton`

#### Examples

```
jobs:

- name: build-my-project
plan:
- put: my-project-codebuild

resources:
- name: my-project-codebuild
type: codebuild
source:
project: my_project

resource_types:
- name: codebuild
type: docker-image
source:
repository: petegoo/concourse-codebuild-resource
tag: latest
```

##### Overriding Environment Variables

You can override specific environment variables by including them in your
build `params`.

```
jobs:

- name: build-my-project
plan:
- put: my-project-codebuild
params:
env_var_overrides:
FOO: foo
BAR: bar
```

### `in`: Get the output artifacts from a completed Codebuild build

Fetch the build details and artifacts from a completed Codebuild build.

#### Parameters

There are currently no configurable parameters.

### `check`: Check for new builds

Trigger when a build has been completed.

#### Parameters

There are currently no configurable parameters.