From 6b828200e698dbff5a3ee61a0c6c9906b0a8493f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 24 Sep 2019 07:35:36 +0200 Subject: Jenkins: remove hardcoded package name --- Jenkinsfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index cd2aa528d..8e70fdc1d 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/. +// 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 += "

VyOS individual package build: vyos-1x

" + description += "

VyOS individual package build: " + getGitRepoName().replace('.git', '') + "

" if (isCustomBuild()) { description += "

" -- cgit v1.2.3 From fe8cd98c92b5f51fecace373ad18f8dfa3727f8b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 24 Sep 2019 22:10:05 +0200 Subject: Jenkins: rely on the global defined label for Docker executors --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 8e70fdc1d..6b0f8d0ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -72,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:current' } -- cgit v1.2.3