diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-03-09 19:03:09 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2020-03-09 19:03:09 +0200 |
commit | e4adaa449eb29da969d4b95f9423ff618d0b448e (patch) | |
tree | 416437d74af5f1db78088dfd422bc8a43daade97 | |
parent | 7a0a53a0e67cb83eebfe8a07a62f1ab348de3929 (diff) | |
parent | 68c31a9934dbebc507f556593c9d80270138c4f5 (diff) | |
download | vyatta-cfg-e4adaa449eb29da969d4b95f9423ff618d0b448e.tar.gz vyatta-cfg-e4adaa449eb29da969d4b95f9423ff618d0b448e.zip |
Merge branch 'crux' of github.com:vyos/vyatta-cfg into cruxvyos/1.2.5
-rw-r--r-- | Jenkinsfile | 31 | ||||
-rwxr-xr-x | scripts/init/vyos-router | 11 |
2 files changed, 34 insertions, 8 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 394644e..225f4fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -69,11 +69,21 @@ def projectProperties = [ properties(projectProperties) setDescription() +node('Docker') { + stage('Define Agent') { + script { + // create container name on demand + env.DOCKER_IMAGE = "vyos/vyos-build:" + getGitBranchName() + } + } +} + pipeline { agent { docker { - args '--sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' - image 'vyos/vyos-build:crux' + args "--sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006" + image "${env.DOCKER_IMAGE}" + alwaysPull true } } options { @@ -87,7 +97,8 @@ pipeline { steps { script { dir('build') { - git branch: getGitBranchName(), url: getGitRepoURL() + git branch: getGitBranchName(), + url: getGitRepoURL() } } } @@ -96,7 +107,10 @@ pipeline { steps { script { dir('build') { - sh "dpkg-buildpackage -b -us -uc -tc" + def commitId = sh(returnStdout: true, script: 'git rev-parse --short=11 HEAD').trim() + currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1]) + + sh 'dpkg-buildpackage -b -us -uc -tc' } } } @@ -116,9 +130,13 @@ pipeline { sshagent(['SSH-dev.packages.vyos.net']) { // build up some fancy groovy variables so we do not need to write/copy // every option over and over again! + def RELEASE = getGitBranchName() + if (getGitBranchName() == "master") { + RELEASE = 'current' + } - def VYOS_REPO_PATH = '/home/sentrium/web/dev.packages.vyos.net/public_html/repositories/' + getGitBranchName() + '/' - if (getGitBranchName() != "equuleus") + def VYOS_REPO_PATH = '/home/sentrium/web/dev.packages.vyos.net/public_html/repositories/' + RELEASE + '/' + if (getGitBranchName() == "crux") VYOS_REPO_PATH += 'vyos/' def SSH_OPTS = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR' @@ -128,7 +146,6 @@ pipeline { files = findFiles(glob: '*.deb') files.each { PACKAGE -> - def RELEASE = getGitBranchName() def ARCH = sh(returnStdout: true, script: "dpkg-deb -f ${PACKAGE} Architecture").trim() def SUBSTRING = sh(returnStdout: true, script: "dpkg-deb -f ${PACKAGE} Package").trim() def SSH_DIR = '~/VyOS/' + RELEASE + '/' + ARCH diff --git a/scripts/init/vyos-router b/scripts/init/vyos-router index a211795..66cfcfb 100755 --- a/scripts/init/vyos-router +++ b/scripts/init/vyos-router @@ -173,6 +173,15 @@ bind_mount_boot () start () { + log_daemon_msg "Waiting for NIC's to settle down" + # On boot time udev migth take a long time to reorder nic's, this will ensure that + # all udev activity is completed and all nics presented at boot-time will have their + # final name before continuing with vyos-router initialization. + SECONDS=0 + udevadm settle + STATUS=$? + log_progress_msg "setteled in ${SECONDS}sec." + log_end_msg ${STATUS} # Fixup for FRR # In 5.1 master, zebra thinks existence of /var/run/netns is @@ -244,7 +253,7 @@ stop() umount ${vyatta_configdir} log_action_end_msg $? - /usr/lib/frr/frr stop + /usr/lib/frr/frrinit.sh stop } case "$action" in |