Field Engineering Workbench Orb
The FE orb is a collection of common function level steps, mostly bash snippets, with some improvement to encourage best practices.
There are 3 commands and a job that emcompasses them in a single call.
Example
Given current version 1.2.3:
[semver:patch]
would be1.2.4
[semver:minor]
would be1.3.0
[semver:major]
would be2.0.0
The values are then stored as ${MAJOR}
, ${MINOR}
,
${PATCH}
varaiables which can be read in subsequent steps.
Bump runs the incremental logic script based on input variables CURRENT_VERSION
and SEMVER_INCREMENT
which can be provided via git commit messages, files in the repo, or git tags.
Available as:
- a job that also parses the
CURRENT_VERSION
andSEMVER_INCREMENT
from git and tags the remote repository with new version. - a command which performs only the incrementing logic, requiring input variables are provided as input.
This command will use git log to find the specified “bump” {major, minor, patch}
You can alternately just manually set SEMVER_INCREMENT
This command will use git tag to find current version
You can alternately just manually set CURRENT_VERSION
Creates and pushes tag matching ${PREFIX}${MAJOR}.${MINOR}.${PATCH}
to remote repo.
If you use a prefix on versions (i.e. v1.2.3, RC0.0.1, beta-0.1.1, etc) You must provide that as an orb parameter version-prefix
. The prefix will be retained as ${PREFIX}
along side the version digits, and included in remote tag.
This queries api.github.com/meta for current SSH keys, and adds them to the /.ssh/known_hosts
This is safer than use of keyscan
which is vulnerable to Man-in-the-middle attacks (MITM).
|
|