mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
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
This commit is contained in:
commit
aca46a9270
48
Jenkinsfile
vendored
48
Jenkinsfile
vendored
@ -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 {
|
||||
|
||||
@ -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
|
||||
|
||||
7
scripts/list-package-arch
Executable file
7
scripts/list-package-arch
Executable file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user