Configure Bitbucket

Setup Bitbucket Pipelines for use with DuploCloud.

Prerequisites

To use Pipelines, you need to:

  • Create a bitbucket-pipelines.yml file in your repository's root directory. This file contains the configuration for your builds and deployments.

  • Deploy the application with DuploCloud as a Service and test that it works as expected.

Bitbucket Pipelines are only recommended to be used for upgrades of container images and to run tests that can be written to run either before or after.

Configuring BitBucket Pipelines

Configure BitBucket Pipelines for use with DuploCloud:

  1. Create a repository variable for the DUPLO_TOKEN. Set the variable at the project or workspace level or even in a deployment. Create service account users in DuploCloud by assigning a user name, such as bitbucket. Ensure the user name is not an email to avoid confusion.

  2. Retrieve a token for the user (bitbucket) that you set up.

  3. Use OpenID Connect (OIDC) by setting up an OpenID login with Bitbucket Pipelines.

  4. After configuring the OIDC provider by using AWS IAM, the IAM role needs an associated trust relationship. For example:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "BitbucketWorkspace",
            "Effect": "Allow",
            "Principal": {
                "Federated": "arn:aws:iam::{account id}:oidc-provider/api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/identity/oidc"
            },
            "Action": "sts:AssumeRoleWithWebIdentity",
            "Condition": {
                "StringEquals": {
                    "api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/identity/oidc:aud": "ari:cloud:bitbucket::workspace/{workspace id}"
                }
            }
        }
    ]
}

Last updated

Logo

© DuploCloud, Inc. All rights reserved. DuploCloud trademarks used herein are registered trademarks of DuploCloud and affiliates