Compare commits

...

2 Commits

Author SHA1 Message Date
Kameron Kenny - pi501 a0f1f49ffb bump version of compose 2024-04-22 21:35:47 -04:00
Kameron Kenny - pi501 e79ea8040e make a jenkinsfile 2024-04-22 21:35:26 -04:00
2 changed files with 40 additions and 33 deletions

69
Jenkinsfile vendored
View File

@ -1,34 +1,41 @@
pipeline {
agent any
agent {
label 'agent1-pi501'
}
stages {
stage('Build') {
steps {
echo 'Building from Docker Compose...'
step(
[
$class: 'DockerBuilderPublisher',
cleanImages: false,
cleanupWithJenkinsJobDelete: false,
cloud: '',
dockerFileDirectory: '',
fromRegistry: [url: 'docker-registry1.in.thelinuxpro.net:5000'],
pushCredentialsId: '',
pushOnSuccess: false,
tagsString: ''
]
)
}
}
stage('Push to Registry') {
steps {
echo('docker push [disabled]')
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
stages {
stage("verify tooling") {
steps {
sh '''
docker version
docker info
docker compose version
'''
}
}
stage("Build Containers and push to registry") {
sh 'docker compose build --push'
}
stage('Start primary container') {
steps {
sh '''
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('Run tests against the container') {
steps {
}
}
}
}

View File

@ -18,7 +18,7 @@ services:
container_name: ns1
build:
dockerfile: Dockerfile.primary
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-primary:240420.10
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-primary:240421.1
restart: always
user: root
environment:
@ -41,7 +41,7 @@ services:
container_name: ns2
build:
dockerfile: Dockerfile.secondary
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-secondary:240420.07
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-secondary:240421.1
restart: always
user: root
environment: