My organization hosts an on premise Jenkins installation. Presently, we Jenkins authenticates to Bitbucket c/o an App Password provisioned by one of our DevOps Engineers.
We would like to create a CI/CD dedicated Bitbucket account and provision App Passwords from it. This won't be associated with a specific user. It will be a host generating App Passwords and the like for any CI/CD tools. We would like the e-mail address associated with this account to be a group distribution i.e., DevOps@MyCompany.com. This way all engineers on the DevOps team will receive e-mails about this account from Atlassian/Bitbucket.
When attempting to setup the account, we're getting an error saying that we can't use a group distribution e-mail address. I don't see this in Bitbucket's documentation (might be missing it). How should we proceed?
I'm in the same boat. It seems while read only access to a repo can be given with an access key, there is no concept in Bitbucket Cloud for machine or a service user like Jenkins. As G Suite is our mail provider, I'm provisioning a user account in G Suite for jenkins, setting 2FA to myself (as the DevOps engineer) then creating a bitbucket account for this jenkins user.
Like you I'll then generate an app password from this Jenkin's user's bitbucket account to allow the Jenkins service to operate on repo's.
To answer your question, reroute the email of the user:
Again using G Suite as an example go into Apps --> G Suite --> Settings for Gmail, Add Setting, Recipient: Jenkins Username, Change envelope recipient, devops@mycompany.com
Did you find a less hacky approach?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.