Configure an agent with Bitbucket Cloud access
In order to view recipe results and commit changes from a recipe back to Bitbucket, you'll need to create an application link in Bitbucket and configure the Moderne agent with the appropriate variables.
To assist with that, this guide will:
- You will need access to create a Bitbucket OAuth Consumer
Once that's done, configure the callback URL to point at your Moderne tenant:

The consumer should have these permissions:

- Projects - Read
- Repositories - Write
- Pull requests - Write
Once your consumer has been created, you should see a
key
and a secret
:
The following table contains all of the variables/arguments you need to add to your Moderne agent run command in order for it to work with your Bitbucket instance. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne agent guide.
OCI Container
Executable JAR
Variables:
MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_KEY
– The key specified in your Bitbucket OAuth consumer.MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRET
– The secret specified in your Bitbucket OAuth consumer.
Example:
docker run \
# ... Existing variables
-e MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_KEY=yourOAuthKey \
-e MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRET=yourSecretKey \
# ... Additional variables
Arguments:
--moderne.agent.bitbucket.cloud.oauthKey
– The key specified in your Bitbucket OAuth consumer.--moderne.agent.bitbucket.cloud.oauthSecret
– The secret specified in your Bitbucket OAuth consumer.
Example:
java -jar moderne-agent-{version}.jar \
# ... Existing arguments
--moderne.agent.bitbucket.cloud.oauthKey=yourOAuthKey \
--moderne.agent.bitbucket.cloud.oauthSecret=yourSecretKey \
# ... Additional arguments