diff --git a/README.md b/README.md index a884f70..56c5dd0 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,13 @@ contains single `platforms.json` and `filter.json` file. `PLATFORMS_FILTER_GIT` -> `filter.json` + Next you should register this library in Jenkins -> System settings -> Global Pipeline Libraries: * Library name: `SHS.Platforms` * Default version: `master` * Project Repository: `https://git.shstk.ru/SHS/jenkins_lib.git` + Then create pipeline job with fixed name `shstk-platforms` and set script to: ``` @Library('SHS.Platforms') _ @@ -49,15 +51,6 @@ pl.copyToHost('/your/path/platforms.json') ## Usage -Prepare your local configuration (when platforms or filter changed): -``` -@Library('SHS.Platforms') _ -node { - def pl = new org.SHS.Platforms(this) - pl.createLocal() -} -``` - Simple: ``` @Library('SHS.Platforms') _ diff --git a/src/org/SHS/Platforms.groovy b/src/org/SHS/Platforms.groovy index 41f24eb..41528e7 100644 --- a/src/org/SHS/Platforms.groovy +++ b/src/org/SHS/Platforms.groovy @@ -9,7 +9,7 @@ class Platforms { public void get() { 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") /*if (steps.env.PLATFORMS_LOCAL_DIR == null) { steps.error "Add \"PLATFORMS_LOCAL_DIR\" node environment to local directory with write permission"