Skip to content

Commit

Permalink
Make deployment task configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieparkinson committed Aug 3, 2021
1 parent 9d40ad1 commit 3617e39
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Add the following to your `pipeline.yml`:
```yml
steps:
- plugins:
- wellcomecollection/github-deployments#v0.2.2:
- wellcomecollection/github-deployments#v0.2.3:
ref: ${BUILDKITE_COMMIT}
environment: stage
```
Expand All @@ -28,6 +28,10 @@ The environment to create the deployment for as per https://docs.github.com/en/r

The ARN of the role for the plugin to assume when fetching secrets

### `task` (string, default `deploy:weco`)

The name of the GitHub Deployment task - useful for distinguishing between different deploy types.

## Development

The plugin is written in Typescript and compiled into binaries with https://github.com/vercel/pkg - when you push a tag, a GitHub action will create a release for you.
2 changes: 2 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ configuration:
type: string
assume_role:
type: string
task:
type: string
additionalProperties: false
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const main = async () => {
environment: config.environment,
production_environment:
config.environment === "prod" || config.environment === "production",
task: "deploy:weco",
task: config.task,
auto_merge: false,
required_contexts: [],
mediaType: {
Expand Down
1 change: 1 addition & 0 deletions src/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export const config = {
environment: process.env[envVar("environment")] || "stage",
ref: process.env[envVar("ref")] || environment.commit,
assumeRole: process.env[envVar("assume_role")],
task: process.env[envVar("task")] || "deploy:weco",
};

0 comments on commit 3617e39

Please sign in to comment.