summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jenkinsfile18
-rw-r--r--Makefile.am1
-rw-r--r--cfg-version/sstp@20
3 files changed, 14 insertions, 5 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 225f4fce..7a79b0f4 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -36,7 +36,7 @@ def isCustomBuild() {
def gitURI = 'git@github.com:vyos/' + getGitRepoName()
def httpURI = 'https://github.com/vyos/' + getGitRepoName()
- return ! ((getGitRepoURL() == gitURI) || (getGitRepoURL() == httpURI))
+ return !((getGitRepoURL() == gitURI) || (getGitRepoURL() == httpURI)) || env.CHANGE_ID
}
def setDescription() {
@@ -73,7 +73,17 @@ node('Docker') {
stage('Define Agent') {
script {
// create container name on demand
- env.DOCKER_IMAGE = "vyos/vyos-build:" + getGitBranchName()
+ def branchName = getGitBranchName()
+ // Adjust PR target branch name so we can re-map it to the proper
+ // Docker image. CHANGE_ID is set only for pull requests, so it is
+ // safe to access the pullRequest global variable
+ if (env.CHANGE_ID) {
+ branchName = "${env.CHANGE_TARGET}".toLowerCase()
+ }
+ if (branchName.equals("master")) {
+ branchName = "current"
+ }
+ env.DOCKER_IMAGE = "vyos/vyos-build:" + branchName
}
}
}
@@ -88,7 +98,6 @@ pipeline {
}
options {
disableConcurrentBuilds()
- skipDefaultCheckout()
timeout(time: 30, unit: 'MINUTES')
timestamps()
}
@@ -97,8 +106,7 @@ pipeline {
steps {
script {
dir('build') {
- git branch: getGitBranchName(),
- url: getGitRepoURL()
+ checkout scm
}
}
}
diff --git a/Makefile.am b/Makefile.am
index 86aec429..a60168b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,6 +115,7 @@ curver_DATA += cfg-version/interfaces@5
curver_DATA += cfg-version/dns-forwarding@2
curver_DATA += cfg-version/vyos-accel-ppp@2
curver_DATA += cfg-version/snmp@1
+curver_DATA += cfg-version/sstp@2
cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \
cpio -0pd
diff --git a/cfg-version/sstp@2 b/cfg-version/sstp@2
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/cfg-version/sstp@2