For a list of available scripts and their usage run the command:
npx devops-helper --help
-
promote-app [REMOTE] [BRANCHES] <APP_VERSION> --dryRun
Merge all the changes of the first branch to the other branches (from left to right) for a specific app version, for me information about app version check APPVERSION.md.
If you don't follow the versioned workflow, you can provide the
--noVersionedBranch
option to skip the version checks.*BRANCHES parameters must be a valid JSON string array
Example:
- Auto detected version from the branch name:
Your current branch is:
branch_1/1.2.3
npx --yes devops-helper promote-app https://gitlab-ci-token:ACCESS_TOKEN@gitlab.com/REPOSITORY "[\"branch_1\", \"branch_2\", \"branch_3\"]"
it will merge
branch_1/1.2.3
intobranch_2/1.2.3
, andbranch_2/1.2.3
intobranch_3/1.2.3
- Manually set version:
npx --yes devops-helper promote-app https://gitlab-ci-token:ACCESS_TOKEN@gitlab.com/REPOSITORY "[\"develop\", \"uat\", \"store\"]" 9.99.9
It will merge
branch_1/9.99.9
intobranch_2/9.99.9
, andbranch_2/9.99.9
intobranch_3/9.99.9
- Without any versioned branches:
npx --yes devops-helper promote-app https://gitlab-ci-token:ACCESS_TOKEN@gitlab.com/REPOSITORY "[\"branch_1\", \"branch_2\", \"branch_3\"]" --noVersionedBranch
It will merge
branch_1
intobranch_2
, andbranch_2
intobranch_3
ACCESS_TOKEN
and REPOSITORY
The ACCESS_TOKEN
can be created from there, just the write_repository
is required
- Place the new script in the scripts folder
- Edit the file devops-helper.ts and add the command that will invoke the script
yarn fix
to run the linter and automatically fix your code