Skip to Content
Bitbucket Pipelines Guide
CI Provider Guide · Bitbucket Pipelines

Bitbucket Pipelines Guide

Just like GitLab CI, Bitbucket Pipelines runs every step inside a container image of your choice. By setting image: ghcr.io/toolboxanonymous/neospaxe-engine:latest, your pipeline runs the NeoSpaxe engine directly against $BITBUCKET_CLONE_DIR with zero extra tooling required.

1. Add Repository Variables

In Bitbucket, open Repository settings → Pipelines → Repository variables and add the following secured variables:

  • NEOSPAXE_LICENSE_KEY — Your license key emailed by Dodo Payments (mark as Secured).
  • AWS_ACCESS_KEY_ID — Your AWS IAM access key ID.
  • AWS_SECRET_ACCESS_KEY — Your AWS IAM secret access key (mark as Secured).
  • AWS_REGION — Your target AWS region (e.g., us-east-1).

2. Add bitbucket-pipelines.yml

Drop the canonical configuration from engine/workflows/bitbucket-pipelines.yml into the root of your repository:

pipelines: custom: deploy-preview: - variables: - name: NEOSPAXE_STAGE - name: NEOSPAXE_ACTION default: deploy - step: name: Deploy NeoSpaxe preview image: ghcr.io/toolboxanonymous/neospaxe-engine:latest script: - export NEOSPAXE_API="https://neospaxe.com/functions/v1/neospaxe-engine" - export NEOSPAXE_WORKSPACE="$BITBUCKET_CLONE_DIR" - node /engine/src/image/main.mjs

3. Running a Deploy or Teardown in Bitbucket

Because the custom: deploy-preview pipeline declares prompted variables: for both NEOSPAXE_STAGE and NEOSPAXE_ACTION (defaulting to deploy), one pipeline definition handles the entire lifecycle:

  1. Go to Branches or Commits in Bitbucket, click the ••• menu, and select Run pipeline for a branch.
  2. Choose custom: deploy-preview.
  3. Enter your stage name in NEOSPAXE_STAGE (for example, pr-19 or feat-webhooks).
  4. Leave NEOSPAXE_ACTION as deploy to create/update the AWS preview stack, or change it to remove to tear down the stack and stop hourly billing.
Zero-Config Workload Detection Works Here Too

When Bitbucket clones your repo into $BITBUCKET_CLONE_DIR, NeoSpaxe inspects your project files. If you already have a stack blueprint, it runs yours untouched; if not, the black-box engine automatically synthesizes a static site, container (Fargate), or serverless API blueprint before provisioning AWS.

Last updated on