Links
Comment on page

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:

Prerequisites

  • You will need access to create a Bitbucket OAuth Consumer

Bitbucket configuration

Step 1: Create a Bitbucket OAuth Consumer

Follow this Atlassian guide to create an 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:
Please save those for use in Step 2.

Agent configuration

Step 2: Configure the Moderne agent

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_KEYThe key specified in your Bitbucket OAuth consumer.
  • MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRETThe 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.oauthKeyThe key specified in your Bitbucket OAuth consumer.
  • --moderne.agent.bitbucket.cloud.oauthSecretThe 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