A Buildkite plugin for changing an existing builds assigned user.
Is this your life?
Currently Buildkite will not let you create a trigger step in your pipeline if the current build was created from a user not in your organization.
This can happen when your build is created from a webhook and the email in the git commit does not match a user's email in your organization.
When creating a trigger step, Buildkite will use the identity of the current builds owner unless another user has interacted with a block step. If a user has interacted with a block step they will become the owner of any triggered pipelines later in the build.
This plugin (ab)uses this functionality to upload a new block step into the current build and then immediately calls the Buildkite API to unblock this step as the user you wish to assume.
steps:
- plugins:
- mgoodings/assume-identity#v1.0.0:
token: <users-api-token>
- wait
The API token for the user you wish to assign this build to.
The label of the block step. Defaults to ":cop: Halt! Identify!".
To run the tests:
docker-compose run --rm tests