Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Concourse resource allowing mutliple branch to run on a specific pipeline

Notifications You must be signed in to change notification settings

jjghali/concourse-multibranch

Repository files navigation

concourse-multibranch

FOSSA Status

Introduction

Concourse resource allowing mutliple branch to run on a specific pipeline. The application is made in TypeScript.

Setup

Build the app

$ npm install
$ npm run build

Install the CLI locally

$ npm install-cli

Note: In linux you will need to run the command in sudo if you wish to be able to run it from anywhere

Using it

Help

$ cmbranch help

Branches available in Bitbucket

$ cmbranch branch-available -u <username> -p <password> --project <project-name> -r <repo-slug>

or

$ cmbranch ba -u <username> -p <password> --project <project-name> -r <repo-slug>

Generate a new pipeline with a job per branch

$ cmbranch generate-pipeline -u <username> -p <password> --project <project-name> --repo-slug <repo-slug> --pipeline-file <pipeline-file> --output-filename <output-filename>

Other options exists and you can look at them by using the following command.

$ cmbranch generate-pipeline --help

When usgin Bitbucket credentials stored in Environment variables

Nodejs is not able to get environment variables stored in the system. In order to bypass this limitation you will need to generate the dotenv file before running the app by running the following command:

$ sh retrieveCredentials.sh

It will produce a dotenv file similar to this one.

BITBUCKET_USERNAME=username
BITBUCKET_PASSWORD=password or deploy key

After that you will be able to run the app without putting the credentials in the arguments.

Examples

You will find examples of how to use it with Concourse CI in the example folder.

Using the Docker image with Docker compose (WIP)

version: "3.3"

services:
  concourse-multibranch:
    build:
      context: .
      dockerfile: Dockerfile

    environment:
      cmbCommand: gp --help

Used packages

References

About

Concourse resource allowing mutliple branch to run on a specific pipeline

Resources

Stars

Watchers

Forks

Packages

No packages published