From f2eda545957df41ad978dca4bb607f1961f639f1 Mon Sep 17 00:00:00 2001 From: peri4 Date: Sat, 22 Apr 2023 14:17:58 +0300 Subject: [PATCH] add README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..020a925 --- /dev/null +++ b/README.md @@ -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