add README.md
This commit is contained in:
29
README.md
Normal file
29
README.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Helper class for Jenkins
|
||||||
|
|
||||||
|
This repo add functionality for automate building with `platforms.json` configuration.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
You should add `PLATFORMS_GIT` environment to your Jenkins with url to git repo, which
|
||||||
|
contains single `platforms.json` file.
|
||||||
|
|
||||||
|
Next you should register this library in Jenkins -> System settings -> Global Pipeline Libraries:
|
||||||
|
* Library name: `SHS`
|
||||||
|
* Default version: `master`
|
||||||
|
* Project Repository: `https://git.shs.tools/SHS/jenkins_lib.git`
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
@Library('SHS') _
|
||||||
|
node {
|
||||||
|
def pl = new org.SHS.Platforms(this)
|
||||||
|
pl.get()
|
||||||
|
pl.forEach ({ dist ->
|
||||||
|
print("iterate ${dist.docker_image}")
|
||||||
|
}, "-test")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`dist` is JSON element of current platform
|
||||||
|
`"-test"` is a stage suffix
|
||||||
Reference in New Issue
Block a user