This commit is contained in:
2024-12-25 12:40:39 +03:00
parent 82205785d3
commit 48df59e97b
2 changed files with 3 additions and 10 deletions

View File

@@ -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') _

View File

@@ -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"