summaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-24 22:14:34 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-24 22:14:34 +0200
commit13cf7bf131d3fc67c63b3a5a53c38bef469df14f (patch)
treec393260273106cd9600350b6cfcc4047c3b1d50c /Jenkinsfile
parentbb1e2f8368ed22d43707a91375f6ddcd376d974a (diff)
parenta7a1ebc45225be0dc12c032d2bba7ac00ad13252 (diff)
downloadvyatta-op-13cf7bf131d3fc67c63b3a5a53c38bef469df14f.tar.gz
vyatta-op-13cf7bf131d3fc67c63b3a5a53c38bef469df14f.zip
Merge branch 'current' of github.com:vyos/vyatta-op into equuleus
* 'current' of github.com:vyos/vyatta-op: Jenkins: sync with vyos-1x pipeline
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 399ece8..a77701b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,12 +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/reponame
+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/vyatta-op.git'
- def httpURI = 'https://github.com/vyos/vyatta-op.git'
+ def gitURI = 'git@github.com:vyos/' + getGitRepoName()
+ def httpURI = 'https://github.com/vyos/' + getGitRepoName()
return ! ((getGitRepoURL() == gitURI) || (getGitRepoURL() == httpURI))
}
@@ -39,7 +44,7 @@ def setDescription() {
// build up the main description text
def description = ""
- description += "<h2>VyOS individual package build: " + env.JOB_NAME + "</h2>"
+ description += "<h2>VyOS individual package build: " + getGitRepoName().replace('.git', '') + "</h2>"
if (isCustomBuild()) {
description += "<p style='border: 3px dashed red; width: 50%;'>"
@@ -67,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:equuleus'
}