Concourse resource allowing mutliple branch to run on a specific pipeline. The application is made in TypeScript.
$ npm install
$ npm run build
$ 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
$ cmbranch help
$ 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>
$ 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
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.
You will find examples of how to use it with Concourse CI in the example folder.
version: "3.3"
services:
concourse-multibranch:
build:
context: .
dockerfile: Dockerfile
environment:
cmbCommand: gp --help