buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

Feature Request: Chain steps within context of a single checkout on the same agent node #460

Open lwoodson opened 5 years ago

lwoodson commented 5 years ago

Scenario: We are in a multi-app, multi-language, mutli-account AWS environment with buildkite agents hosted in one of our AWS accounts. We need to run build steps within the context of a docker container (using the docker or docker-compose plugins) with an assumed role (using the cultureamp/aws-assume-role-buildkite-plugin) that gives the necessary permissions to carry out releases, pushes to S3, cloudformation stack updates, etc... to the application's resources in different accounts. We want to follow the principle of least permission with these app-specific roles so that the build for App-A can't interfere with resources of App-B.

It would be advantageous if we could execute some steps within the context of the same checkout and on the same agent node. This would enable us to do something like:

Since we can't do the above, we have to replicate the permissions needed to do the sops decryption w/KMS in all trusted roles we create for buildkite agents to assume across N apps. We also have to chain commands or author & run wrappers within the docker build containers to first do the decryption and then carry out the real work of the step.

It would be much better for us if we could simply allow those cross-cutting permissions to be in place for the agents themselves, carry out common cross-cutting tasks like secrets decryption as a step with the artifact of that step (the decrypted file) being available during subsequent step(s).

I am new to buildkite, so there may be some non-hacky way to achieve the above that I haven't come across in the documentation. If so, feel free to point me to it and tell me to RTFM 😄