Compare commits
No commits in common. "a0f1f49ffb8bb5008bbc063722225e0d1899f92f" and "0a2d7314b6276d1d518c36181891bc2f994d44b8" have entirely different histories.
a0f1f49ffb
...
0a2d7314b6
|
@ -1,40 +1,33 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
label 'agent1-pi501'
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage("verify tooling") {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
echo 'Building from Docker Compose...'
|
||||||
docker version
|
step(
|
||||||
docker info
|
[
|
||||||
docker compose version
|
$class: 'DockerBuilderPublisher',
|
||||||
'''
|
cleanImages: false,
|
||||||
|
cleanupWithJenkinsJobDelete: false,
|
||||||
|
cloud: '',
|
||||||
|
dockerFileDirectory: '',
|
||||||
|
fromRegistry: [url: 'docker-registry1.in.thelinuxpro.net:5000'],
|
||||||
|
pushCredentialsId: '',
|
||||||
|
pushOnSuccess: false,
|
||||||
|
tagsString: ''
|
||||||
|
]
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Push to Registry') {
|
||||||
stage("Build Containers and push to registry") {
|
|
||||||
sh 'docker compose build --push'
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Start primary container') {
|
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
echo('docker push [disabled]')
|
||||||
if [[ $(docker compose ps | wc -l) -eq 1 ]]; then
|
|
||||||
docker compose up -d --no-color primary
|
|
||||||
else
|
|
||||||
docker compose down primary
|
|
||||||
docker compose up -d --no-color primary
|
|
||||||
fi
|
|
||||||
'''
|
|
||||||
sh 'docker compose ps'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Deploy') {
|
||||||
stage('Run tests against the container') {
|
|
||||||
steps {
|
steps {
|
||||||
|
echo 'Deploying....'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ services:
|
||||||
container_name: ns1
|
container_name: ns1
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile.primary
|
dockerfile: Dockerfile.primary
|
||||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-primary:240421.1
|
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-primary:240420.10
|
||||||
restart: always
|
restart: always
|
||||||
user: root
|
user: root
|
||||||
environment:
|
environment:
|
||||||
|
@ -41,7 +41,7 @@ services:
|
||||||
container_name: ns2
|
container_name: ns2
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile.secondary
|
dockerfile: Dockerfile.secondary
|
||||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-secondary:240421.1
|
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-secondary:240420.07
|
||||||
restart: always
|
restart: always
|
||||||
user: root
|
user: root
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in New Issue