build with docker libs
This commit is contained in:
parent
1dda38d170
commit
4782caeaee
|
@ -2,12 +2,12 @@ pipeline {
|
||||||
agent {
|
agent {
|
||||||
node {
|
node {
|
||||||
label 'pi501.in.thelinuxpro.net'
|
label 'pi501.in.thelinuxpro.net'
|
||||||
|
dockerfile true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage("verify tooling") {
|
stage("verify tooling") {
|
||||||
node {
|
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
docker version
|
docker version
|
||||||
|
@ -16,10 +16,8 @@ pipeline {
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build telegraf') {
|
stage('Build telegraf') {
|
||||||
node {
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
docker.withRegistry('http://docker-registry1.in.thelinuxpro.net:5000')
|
docker.withRegistry('http://docker-registry1.in.thelinuxpro.net:5000')
|
||||||
|
@ -30,18 +28,14 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Create contexts') {
|
stage('Create contexts') {
|
||||||
node {
|
|
||||||
steps {
|
steps {
|
||||||
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'
|
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Start container') {
|
stage('Start container') {
|
||||||
node {
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def status_s = sh(returnStatus: true, script: 'grep $(docker --context pi502 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
|
def status_s = sh(returnStatus: true, script: 'grep $(docker --context pi502 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
|
||||||
|
@ -56,7 +50,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue