Files
homepage/Jenkinsfile
T

25 lines
397 B
Groovy
Raw Normal View History

2024-12-22 20:06:11 +01:00
node {
def app
2024-12-22 20:06:11 +01:00
stage('Clone repository') {
checkout scm
}
2024-12-22 20:06:11 +01:00
stage('Build image') {
app = docker.build("brandonjones085/test")
}
2024-12-22 20:06:11 +01:00
stage('Test image') {
app.inside {
sh 'echo "Tests passed"'
}
}
stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'git') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
2024-12-22 19:58:51 +01:00
}