diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-24 22:17:29 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-24 22:17:54 +0200 |
commit | ada309946ae2e44e2f125214b4791aa42c98ad44 (patch) | |
tree | 9de0670dc11f8de3fa5ef3e06f810bfbe32f4ea3 /Jenkinsfile | |
parent | 458128f9bc3ffa060447a9f42206fa54f9d1f183 (diff) | |
download | vyos-1x-ada309946ae2e44e2f125214b4791aa42c98ad44.tar.gz vyos-1x-ada309946ae2e44e2f125214b4791aa42c98ad44.zip |
Jenkins: sync with current version
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index c3a3c9320..aca4dedc6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,13 +24,17 @@ def getGitRepoURL() { return scm.userRemoteConfigs[0].url } -// Returns true if this is a custom build launched on any project fork, -// returns false if this is build from git@github.com:vyos/env.JOB_NAME -// env.JOB_NAME is e.g. vyos-build or vyos-1x and so on .... +def getGitRepoName() { + return getGitRepoURL().split('/').last() +} + +// Returns true if this is a custom build launched on any project fork. +// Returns false if this is build from git@github.com:vyos/<reponame>. +// <reponame> can be e.g. vyos-1x.git or vyatta-op.git def isCustomBuild() { // GitHub organisation base URL - def gitURI = 'git@github.com:vyos/vyos-1x.git' - def httpURI = 'https://github.com/vyos/vyos-1x.git' + def gitURI = 'git@github.com:vyos/' + getGitRepoName() + def httpURI = 'https://github.com/vyos/' + getGitRepoName() return ! ((getGitRepoURL() == gitURI) || (getGitRepoURL() == httpURI)) } @@ -40,7 +44,7 @@ def setDescription() { // build up the main description text def description = "" - description += "<h2>VyOS individual package build: vyos-1x</h2>" + description += "<h2>VyOS individual package build: " + getGitRepoName().replace('.git', '') + "</h2>" if (isCustomBuild()) { description += "<p style='border: 3px dashed red; width: 50%;'>" @@ -68,7 +72,6 @@ setDescription() pipeline { agent { docker { - label 'Docker' args '--sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' image 'vyos/vyos-build:crux' } |