diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-10-06 11:36:09 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-10-06 11:36:09 +0200 |
commit | aca46a9270bba6bcb50cedbbeafaf1279ab8c82b (patch) | |
tree | 1c669fb6e58a3af765632abbc8337e0db45030e3 | |
parent | 173aaa25b60efa45b402b68f9b193cf9f83b3746 (diff) | |
parent | 45a9ea3c32183c0b0e7bbcabbe41dbe8d6337744 (diff) | |
download | vyos-build-aca46a9270bba6bcb50cedbbeafaf1279ab8c82b.tar.gz vyos-build-aca46a9270bba6bcb50cedbbeafaf1279ab8c82b.zip |
Merge branch 'current' into equuleus
* current:
Jenkins: add getGitRepoName()
Docker: ARM: add missing no--check-valid-until files
Kernel: T1708: update to Linux 4.19.76
Jenkins: explicitly set GitHub status is no longer required
Docker: we only need LUA 5.2 for Accel-PPP build
Docker: add liblua5.2-dev to accel-ppp dependencies
[Jenkinsfile] Call a script that creates latest rolling release symlink
Jenkins: run on all nodes that support Docker
Packages: remove vyatta-op-dhcp-server
Docker: add dkms
Add helper to list individual package architectues
add hooks for autobuild
-rw-r--r-- | Jenkinsfile | 48 | ||||
-rw-r--r-- | docker/Dockerfile | 7 | ||||
-rwxr-xr-x | scripts/list-package-arch | 7 |
3 files changed, 24 insertions, 38 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index fcf0dafd..e2077bc4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,11 +25,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/vyos-build.git +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() { - def gitURI = "git@github.com:vyos/vyos-build.git" - def httpURI = "https://github.com/vyos/vyos-build.git" + // GitHub organisation base URL + def gitURI = 'git@github.com:vyos/' + getGitRepoName() + def httpURI = 'https://github.com/vyos/' + getGitRepoName() return ! ((getGitRepoURL() == gitURI) || (getGitRepoURL() == httpURI)) } @@ -56,24 +62,6 @@ def setDescription() { item.save() } -def setGitHubStatus(state, description) { - if (isCustomBuild()) - return - - withCredentials([string(credentialsId: 'GitHub-API-Token', variable: 'TOKEN')]) { - def commitId = sh(returnStdout: true, script: "git rev-parse HEAD").trim() - def postBody = [ - state: "${state}", - target_url: "${BUILD_URL}", - description: "${description}", - context: 'continuous-integration/jenkins', - ] - def postBodyString = groovy.json.JsonOutput.toJson(postBody) - sh "curl 'https://api.github.com/repos/vyos/vyos-build/statuses/${commitId}?access_token=${TOKEN}' \ - -H 'Content-Type: application/json' -X POST -d '${postBodyString}' -k" - } -} - /* Only keep the 10 most recent builds. */ def projectProperties = [ [$class: 'BuildDiscarderProperty',strategy: [$class: 'LogRotator', numToKeepStr: '1']], @@ -94,7 +82,6 @@ pipeline { agent { dockerfile { filename 'Dockerfile' - label 'jessie-amd64' dir 'docker' args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' } @@ -103,7 +90,6 @@ pipeline { stage('Configure') { steps { script { - setGitHubStatus("pending", "Build is pending.") sh """ ./configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/" """ @@ -156,18 +142,10 @@ pipeline { sh """ scp ${SSH_OPTS} build/vyos*.iso ${SSH_REMOTE}:${SSH_DIR}/ """ + sh """ + ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c '/usr/bin/make-latest-rolling-symlink.sh'" + """ } - - setGitHubStatus("success", "Build has succeeded!") - } - } - failure { - script { - // only deploy ISO if build from official repository - if (isCustomBuild()) - return - - setGitHubStatus("failure", "Build has failed!") } } cleanup { diff --git a/docker/Dockerfile b/docker/Dockerfile index 799b118d..78102ae3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -163,13 +163,14 @@ RUN apt-get update && apt-get install -y \ bison \ libelf-dev \ bc \ - kmod + kmod \ + dkms -# Packages needed for vyos-accel-ppp +# Packages needed for Accel-ppp RUN apt-get update && apt-get install -y \ cdbs \ cmake \ - liblua5.1-dev + liblua5.2-dev # Prerequisites for building rtrlib # see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html diff --git a/scripts/list-package-arch b/scripts/list-package-arch new file mode 100755 index 00000000..10ac02d3 --- /dev/null +++ b/scripts/list-package-arch @@ -0,0 +1,7 @@ +#!/bin/bash +# Execute this script from the vyos-build top directory +# Will generate a list of architectures in each repository +for a in $(echo vyos-build; ./scripts/build-packages -l | egrep -e '^ \* ' | sed 's/^ \* //'); do + n=$(curl https://raw.githubusercontent.com/vyos/${a}/current/debian/control 2>/dev/null | grep "Architecture" | tr '\n' ',') + printf "%-24s %s \n" "${a}" "${n}" +done |