Module: check_mk
Branch: master
Commit: 2d14a8a78870034c3e712618f0d9c571ffb4bf8b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d14a8a7887003…
Author: Alex Zurhake <az(a)mathias-kettner.de>
Date: Thu Mar 7 09:12:01 2019 +0100
Fix bracket and formating
Change-Id: Ib8b85b35b985edae4df92fd85c75517bf81c1194
---
buildscripts/scripts/os-nodes.jenkins | 43 ++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/buildscripts/scripts/os-nodes.jenkins
b/buildscripts/scripts/os-nodes.jenkins
index b04dd90..d2227dd 100644
--- a/buildscripts/scripts/os-nodes.jenkins
+++ b/buildscripts/scripts/os-nodes.jenkins
@@ -17,11 +17,12 @@ node {
IMAGE = 'ubuntu-18.04-common'
docker.image(IMAGE).pull()
docker.image(IMAGE).inside('-u 0:0 --cap-add=SYS_ADMIN --network
infrastructure_local-infra') {
- stage('checkout sources') {
- cleanWs()
- checkout(scm)
- stash name: 'distroinfos', includes: 'omd/distros/*.mk'
- stash name: 'dockerfiles', includes:
'buildscripts/infrastructure/os-nodes/*/Dockerfile'
+ stage('checkout sources') {
+ cleanWs()
+ checkout(scm)
+ stash name: 'distroinfos', includes: 'omd/distros/*.mk'
+ stash name: 'dockerfiles', includes:
'buildscripts/infrastructure/os-nodes/*/Dockerfile'
+ }
}
}
}
@@ -29,24 +30,24 @@ node {
DISTRO_LIST.each { DISTRO ->
DOCKER_BUILDS[DISTRO] = {
node {
- docker.withRegistry(DOCKER_REGISTRY, 'nexus') {
- IMAGE = 'ubuntu-18.04-common'
- docker.image(IMAGE).inside('-u 0:0 -v
/var/run/docker.sock:/var/run/docker.sock --cap-add=SYS_ADMIN --network
ci_local-infra') {
- stage('build ' + DISTRO + ' os-image') {
- unstash name: 'dockerfiles'
- unstash name: 'distroinfos'
- def DISTRO_INFO = 'omd/distros/' + sh(script: "echo
\'$DISTRO\' | tr 'a-z' 'A-Z' | tr '-' '_'",
returnStdout: true).trim() + '.mk'
- def OS_PACKAGES = sh(script: """
- cat \'$DISTRO_INFO\' | sed
's/OS_PACKAGES\\s\\++=\\s\\+\\(.*\\)/\\1/;t;d' | sed 's/#.*\$//' | tr
'\\n' ' '
- """,
- returnStdout: true).trim()
- dir('buildscripts/infrastructure/os-nodes/' + DISTRO) {
- docker.withRegistry(DOCKER_REGISTRY, 'nexus') {
- sh "docker build -t $DOCKER_REGISTRY/$DISTRO-os-image
--build-arg PACKAGES='$OS_PACKAGES' --network ci_local-infra ."
- sh "docker push $DOCKER_REGISTRY/$DISTRO-os-image"
+ docker.withRegistry(DOCKER_REGISTRY, 'nexus') {
+ IMAGE = 'ubuntu-18.04-common'
+ docker.image(IMAGE).inside('-u 0:0 -v
/var/run/docker.sock:/var/run/docker.sock --cap-add=SYS_ADMIN --network
ci_local-infra') {
+ stage('build ' + DISTRO + ' os-image') {
+ unstash name: 'dockerfiles'
+ unstash name: 'distroinfos'
+ def DISTRO_INFO = 'omd/distros/' + sh(script: "echo
\'$DISTRO\' | tr 'a-z' 'A-Z' | tr '-' '_'",
returnStdout: true).trim() + '.mk'
+ def OS_PACKAGES = sh(script: """
+ cat \'$DISTRO_INFO\' | sed
's/OS_PACKAGES\\s\\++=\\s\\+\\(.*\\)/\\1/;t;d' | sed 's/#.*\$//' | tr
'\\n' ' '
+ """,
+ returnStdout: true).trim()
+ dir('buildscripts/infrastructure/os-nodes/' + DISTRO) {
+ def DOCKER_REGISTRY_NOHTTP =
DOCKER_REGISTRY.split('//')[1]
+ sh "docker build -t
$DOCKER_REGISTRY_NOHTTP/$DISTRO-os-image --build-arg PACKAGES='$OS_PACKAGES'
--network ci_local-infra ."
+ sh "docker push
$DOCKER_REGISTRY_NOHTTP/$DISTRO-os-image"
}
}
- }
+ }
}
}
}