local-bbp

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 3 Imported by: 0

README

Local-BBP

GitHub License GitHub Release GitHub go.mod Go version

Local-BBP is an open-source CLI tool written in Go, designed to simulate Bitbucket pipelines on your local machine. This tool allows developers to test and debug their pipeline configurations faster and more efficiently before pushing to Bitbucket.

Why Local-BBP?

As a developer, I often find that the first few pipeline runs for a new project fail due to configuration issues. This can be incredibly time-consuming and frustrating, as each failure requires a push to Bitbucket, a wait for the pipeline to run, and then reviewing the results to identify and fix issues. With Local-BBP, I can run and debug these pipelines locally, saving time and reducing the number of failed runs in the actual CI environment.

Supported Features

  • Run pipeline
    • Run default
    • Run branches
    • Run custom
    • Run pull request
    • Run tags
  • Parallel steps
  • Secret variables from file
  • Custom Docker image in single step
  • Artifacts
  • Smart caches
  • Pipe image in script
  • Services
  • Permissions
  • Settings
    • Default image
    • Timeout
    • Container Size
  • Validate bitbucket-pipelines.yml file

Installation

You can install the latest version of Local-BBP using the following command:

curl -s https://raw.githubusercontent.com/zhex/local-bbp/main/scripts/install.sh | bash
Usages

You need to have Docker installed on your machine to run Local-BBP.

To simulate your Bitbucket pipeline locally, navigate to the directory containing your bitbucket-pipelines.yml file and run:

bbp run

This command will execute your default pipeline steps as defined in the bitbucket-pipelines.yml file.

You can also specify a specific pipeline to run using the -n flag:

bbp run -n my-pipeline

You can also specify a path to the project directory containing the bitbucket-pipelines.yml file:

bbp run -p /path/to/project

Support secret variables by providing a path to the secrets file:

bbp run -s /path/to/secrets

The secret file format is the same as dot env file. Sample secrets file:

MY_SECRET="my-secret-value"
MY_OTHER_SECRET="my-other-secret-value"

Also, you can validate your bitbucket-pipelines.yml file using the following command:

bbp validate

The validation rules are based on the official Bitbucket Pipelines configuration schema.

License

Local-BBP is released under the MIT License. See LICENSE for more details.

Support

For any issues or questions, please open an issue on our GitHub repository.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL