45 lines
1.0 KiB
Groovy
45 lines
1.0 KiB
Groovy
pipeline {
|
|
agent {
|
|
label 'pi501.in.thelinuxpro.net'
|
|
}
|
|
|
|
stages {
|
|
stage("verify tooling") {
|
|
steps {
|
|
sh '''
|
|
docker version
|
|
docker info
|
|
docker compose version
|
|
'''
|
|
}
|
|
}
|
|
|
|
stage("Build Containers and push to registry") {
|
|
steps {
|
|
sh 'docker compose build --push'
|
|
}
|
|
}
|
|
|
|
stage('Start primary container') {
|
|
steps {
|
|
sh 'docker compose up -d --no-color primary'
|
|
sh 'docker compose ps'
|
|
}
|
|
}
|
|
stage('Start secondary container') {
|
|
steps {
|
|
sh 'DOCKER_HOST="ssh://jenkins@pi502.in.thelinuxpro.net" docker compose up -d --no-color secondary'
|
|
sh 'DOCKER_HOST="ssh://jenkins@pi502.in.thelinuxpro.net" docker compose ps'
|
|
}
|
|
}
|
|
stage('test primary dns') {
|
|
steps {
|
|
sh 'dig ns1.thelinuxpro.net ANY @204.8.15.80'
|
|
sh 'dig ns1.in.thelinuxpro.net ANY @10.99.153.241'
|
|
sh 'dig ns1.thelinuxpro.net ANY @204.8.15.81'
|
|
sh 'dig ns1.in.thelinuxpro.net ANY @10.99.153.242'
|
|
}
|
|
}
|
|
}
|
|
}
|