Ruff Jenkins Plugin for Henge
This plugin provides common variables and extensions for Henge on Ruff Jenkins.
Variables
Name | Description |
---|
branch | Current Git branch, defaults to environment variable GIT_BRANCH . For complete resolving logic, please check out the source code. |
jenkinsUrl | Defaults to environment variable JENKINS_URL , fallbacks to 'http://jenkins.nanchao.org:8080/' . |
configUrl | Base url or path under which the configuration files are stored. For example "{configUrl}/embedded-platforms.json" . |
Local Configuration URL
If you want to use local configuration files, you may add, for example, a
embedded-platforms.json
file under your project directory, and distribute
with --local
:
henge dist --local
Then the configUrl
variable will have the value "."
.
If you want to provide reusable configurations, you can add them into a
directory and set environment variable HENGE_RUFF_CONFIG_DIR
(which will
update the configUrl
variable).
Dependency Resolving
Jenkins Artifact Resolving
This plugin adds the ability to resolve Jenkins dependencies to proper artifact
URLs.
Some extra options are provided:
- job: Jenkins job name.
- singleNode?: - Indicates whether the target multiplatform artifact is built
on a single node (usually for embedded cross-compilation configuration)
instead of several ones (usually for PCs).
- branch?: - Resolve this dependency to specific branch (one of
"master"
,
"release"
and "develop"
).
GitHub Resolving
GitHub resolving is also provided with following options:
- github: GitHub project path, in the form of
<username>/<project>
. - branch?: - Branch to resolve, default to
"master"
.
Default Artifact ID
This plugin also provides default artifact ID for artifacts, the ID could look
like:
"{name}-{version}"
(master or local)"{name}-{version}-{platform}"
(master or local, multiplatform)"{name}-{version}-SNAPSHOPT-{build}"
(other braches on Jenkins)"{name}-{version}-{platform}-SNAPSHOPT-{build}"
(other braches on Jenkins,
multiplatform)
Build
To build this plugin:
npm install
npm install henge
npm run build
Or you can use watch mode for compilation during development:
npm run build -- -w