I would like to run test deployment to commit's author environment and can't figure out how to configure it.
To simplify, repository owner is a team and each member of that team have a specific test environment, let's say, each committer owns an AWS S3 bucket like <common>-test-<username>. I'd like to configure test deployment to S3 bucket of the user that made commit before production deployment to common S3 bucket.
Environment variables are resolved from repository's owner, in that case, team's environment variables or repositories variables but not from committer's own variables.
I figure out that I could solve it by configuring different manually-triggered deployment steps per user like 'test deployment to <username>' with specific set of variables for each user like <username>_S3BUCKETNAME but this manually-triggered solution is not the prefered approach.
Is there any way to set up that environment?
Any help would be appreciate
Hi Victor,
Bitbucket Pipelines has no built in way to distinguish *who* triggered a pipeline.
The best suggestion I can make is to extract the Git commit author and use that to map to an S3 environment.
For example:
git show -s --format='%an'
You may be able to extract other information from Git which may be more useful for you.
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.