build with docker libs

This commit is contained in:
Kameron Kenny 2024-06-26 12:53:18 -04:00
parent 1dda38d170
commit 4782caeaee
No known key found for this signature in database
GPG Key ID: E5006629839D2276
1 changed files with 1 additions and 8 deletions

9
Jenkinsfile vendored
View File

@ -2,12 +2,12 @@ pipeline {
agent {
node {
label 'pi501.in.thelinuxpro.net'
dockerfile true
}
}
stages {
stage("verify tooling") {
node {
steps {
sh '''
docker version
@ -16,10 +16,8 @@ pipeline {
'''
}
}
}
stage('Build telegraf') {
node {
steps {
script {
docker.withRegistry('http://docker-registry1.in.thelinuxpro.net:5000')
@ -30,18 +28,14 @@ pipeline {
}
}
}
}
stage('Create contexts') {
node {
steps {
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'
}
}
}
stage('Start container') {
node {
steps {
script {
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 {
}
}
}
}
}
}