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
- Host: GitHub
- URL: https://github.com/petegoo/concourse-codebuild-resource
- Owner: PeteGoo
- License: mit
- Created: 2017-12-23T03:58:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-27T07:59:19.000Z (about 5 years ago)
- Last Synced: 2025-04-07T20:50:16.893Z (9 months ago)
- Topics: aws-codebuild, codebuild, concourse
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS Codebuild Resource
[](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.