ci: add docker agent

This commit is contained in:
admin 2025-02-23 17:45:13 +00:00
parent 72d8fba305
commit 324ea28d39

22
Jenkinsfile vendored
View File

@ -1,17 +1,14 @@
pipeline {
agent any
environment {
// Update these values with your image details
DOCKER_IMAGE = "log101-dot-dev"
DOCKER_TAG = "latest"
REGISTRY = "192.168.88.252:5000"
agent {
docker {
image 'ubuntu-latest'
}
}
stages {
stage('Checkout') {
steps {
git branch: 'main', url: 'https://git.acayip.dev/log101/log101-dot-dev.git'
git(branch: 'main', url: 'https://git.acayip.dev/log101/log101-dot-dev.git')
}
}
@ -20,6 +17,7 @@ pipeline {
script {
docker.build("${REGISTRY}/${DOCKER_IMAGE}:${DOCKER_TAG}")
}
}
}
@ -30,6 +28,7 @@ pipeline {
docker.image("${REGISTRY}/${DOCKER_IMAGE}:${DOCKER_TAG}").push()
}
}
}
}
@ -38,7 +37,14 @@ pipeline {
script {
sh "docker rmi ${REGISTRY}/${DOCKER_IMAGE}:${DOCKER_TAG} || true"
}
}
}
}
environment {
DOCKER_IMAGE = 'log101-dot-dev'
DOCKER_TAG = 'latest'
REGISTRY = '192.168.88.252:5000'
}
}