fix
This commit is contained in:
11
README.md
11
README.md
@@ -11,11 +11,13 @@ contains single `platforms.json` and `filter.json` file.
|
|||||||
|
|
||||||
`PLATFORMS_FILTER_GIT` -> `filter.json`
|
`PLATFORMS_FILTER_GIT` -> `filter.json`
|
||||||
|
|
||||||
|
|
||||||
Next you should register this library in Jenkins -> System settings -> Global Pipeline Libraries:
|
Next you should register this library in Jenkins -> System settings -> Global Pipeline Libraries:
|
||||||
* Library name: `SHS.Platforms`
|
* Library name: `SHS.Platforms`
|
||||||
* Default version: `master`
|
* Default version: `master`
|
||||||
* Project Repository: `https://git.shstk.ru/SHS/jenkins_lib.git`
|
* Project Repository: `https://git.shstk.ru/SHS/jenkins_lib.git`
|
||||||
|
|
||||||
|
|
||||||
Then create pipeline job with fixed name `shstk-platforms` and set script to:
|
Then create pipeline job with fixed name `shstk-platforms` and set script to:
|
||||||
```
|
```
|
||||||
@Library('SHS.Platforms') _
|
@Library('SHS.Platforms') _
|
||||||
@@ -49,15 +51,6 @@ pl.copyToHost('/your/path/platforms.json')
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Prepare your local configuration (when platforms or filter changed):
|
|
||||||
```
|
|
||||||
@Library('SHS.Platforms') _
|
|
||||||
node {
|
|
||||||
def pl = new org.SHS.Platforms(this)
|
|
||||||
pl.createLocal()
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Simple:
|
Simple:
|
||||||
```
|
```
|
||||||
@Library('SHS.Platforms') _
|
@Library('SHS.Platforms') _
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class Platforms {
|
|||||||
|
|
||||||
public void get() {
|
public void get() {
|
||||||
steps.stage("Read platforms_local.json") {
|
steps.stage("Read platforms_local.json") {
|
||||||
steps.CopyArtifact(projectName: 'shstk-platforms', target: 'platforms');
|
steps.step([$class: 'CopyArtifact', projectName: 'shstk-platforms', target: 'platforms']);
|
||||||
this._root = steps.readJSON(file: "platforms/platforms_local.json")
|
this._root = steps.readJSON(file: "platforms/platforms_local.json")
|
||||||
/*if (steps.env.PLATFORMS_LOCAL_DIR == null) {
|
/*if (steps.env.PLATFORMS_LOCAL_DIR == null) {
|
||||||
steps.error "Add \"PLATFORMS_LOCAL_DIR\" node environment to local directory with write permission"
|
steps.error "Add \"PLATFORMS_LOCAL_DIR\" node environment to local directory with write permission"
|
||||||
|
|||||||
Reference in New Issue
Block a user