Configure Bitbucket CI/CD Pipelines
Bitbucket Pipelines skill for building bitbucket-pipelines.yml with caching, parallel steps, Docker builds, and deployments.
1.0.0Add to Favorites
Why it matters
Automate your software delivery with expert Bitbucket Pipelines configuration. This asset helps you build efficient, scalable, and maintainable CI/CD workflows.
Outcomes
What it gets done
Define basic and multi-stage pipeline structures
Implement advanced caching and Docker integration strategies
Configure deployment patterns for AWS and Kubernetes
Optimize pipelines for security, performance, and error handling
Install
Add it to your toolbox
Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-bitbucket-pipeline-config | bash After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.
Reports
Agent outcome reports
No reports yet
Overview
A prompt-based skill that equips the assistant to write bitbucket-pipelines.yml configurations covering parallel test execution, custom caching, Docker builds, and AWS or Kubernetes deployment steps. It includes ready-to-adapt YAML for each pattern plus best practices for secrets, performance, and conditional execution. Use it when authoring or restructuring a Bitbucket Pipelines configuration and you need working YAML rather than general CI/CD advice.
What it does
This skill turns the assistant into an expert for building efficient, scalable Bitbucket Pipelines configurations in bitbucket-pipelines.yml. It covers core pipeline structure (default and branch-specific pipeline steps), multi-stage pipelines with parallel step execution, advanced caching strategies (custom cache definitions for tools like Gradle, Maven, Cypress, and Next.js, plus cache-optimization patterns using --prefer-offline and pip's cache directory), Docker integration (service containers such as Postgres for integration tests, building and pushing images, and multi-stage Docker builds with build-args), deployment patterns to AWS (S3 sync plus CloudFront invalidation, with manual-trigger production deploys) and Kubernetes (fetching kubectl, decoding a base64 kubeconfig secret, templating an image tag, and checking rollout status), and a set of best practices for secrets management, performance, error handling, and conditional execution based on changed paths.
When to use - and when NOT to
Use it when writing or restructuring a bitbucket-pipelines.yml file and you need concrete, working YAML: a basic build-test-deploy pipeline, a parallel unit-test-plus-lint-and-security-scan stage feeding into a build step, custom cache definitions, a Postgres service container for integration tests, single- and multi-stage Docker build-and-push scripts using $BITBUCKET_REPO_FULL_NAME and $BITBUCKET_COMMIT, AWS S3/CloudFront and Kubernetes deployment scripts, environment-variable validation guards, step size limits for memory-intensive tasks, and condition.changesets.includePaths for path-based conditional execution. It is not a general CI/CD theory guide and does not cover other CI platforms (GitHub Actions, GitLab CI, Jenkins) - the YAML and environment variables shown are Bitbucket Pipelines-specific.
Inputs and outputs
Inputs are the project's build/test/deploy commands and its target deployment infrastructure (Docker registry, AWS account, or Kubernetes cluster). Outputs include ready-to-adapt pipeline YAML for each covered scenario: a parallel block running independent Unit Tests and Lint/Security Scan steps before a Build Application step with an after-script listing the build output, a definitions.caches block for custom cache paths, a definitions.services.postgres block with environment variables, Docker build/tag/push scripts including a multi-stage build with --target production and --build-arg, AWS CLI deployment commands, and a Kubernetes deploy script that downloads kubectl, writes the kubeconfig, substitutes the image tag with sed, and runs kubectl rollout status.
image: node:18
pipelines:
default:
- step:
name: Build and Test
caches:
- node
script:
- npm ci
- npm run test
- npm run build
artifacts:
- dist/**
branches:
master:
- step:
name: Deploy to Production
deployment: production
script:
- echo "Deploying to production"
develop:
- step:
name: Deploy to Staging
deployment: staging
script:
- echo "Deploying to staging"
Integrations
The patterns target Bitbucket Pipelines' own step, cache, service, and deployment primitives, integrating with Docker (build/push to a configurable registry), AWS (S3 and CloudFront via the AWS CLI), and Kubernetes (via kubectl against a base64-encoded kubeconfig secret). A step's size: 2x setting doubles available memory to 4GB (8GB when a Docker service is running), letting a memory-heavy caching or build step opt in without changing the pipeline's global defaults.
Who it's for
Teams setting up or optimizing a Bitbucket Pipelines CI/CD workflow, especially those adding parallel test execution to cut build time, wiring a Docker build-and-push step, or configuring environment-specific (staging vs. production, manual-trigger) deployments to AWS or Kubernetes. Also useful for anyone hardening an existing pipeline around secrets handling, memory-intensive step sizing, and path-based conditional runs.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.