From a6d885b038a58d4cf1b0b452044b75bc2d156522 Mon Sep 17 00:00:00 2001 From: weissmall Date: Wed, 5 Nov 2025 16:31:10 +0300 Subject: [PATCH] feat: updated readme --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e2383c3 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +## Examlpe usage in pipeline + +```groovy +@Library('semantic@main') _ + +podTemplate(containers: [ + ... + semanticGetContainerTemplate(), +]) { + ... + // Somewhere in the middle of stages + def VERSION + if (!PULL_REQUEST) { + helpers.withGiteaCreds("GitBackendCreds", "git-tool") { + semantic.semantic( + stageName: "versioning", + giteaTokenCredId: "Gitea-releases", + giteaCredId: "GitBackendCreds", + giteaUrl: "${env.GIT_SCHEME}${env.GIT_HOST}", + currentBranch: BRANCH, + devBranch: "develop", + ) + } + VERSION = semantic.semanticGetVersion() + } +} +```