업데이트 'Jenkinsfile'

This commit is contained in:
2023-03-24 14:36:16 +09:00
parent 269ab2faf7
commit 9acd9964af

14
Jenkinsfile vendored
View File

@@ -36,27 +36,35 @@ podTemplate(
def registry = 'https://10.43.250.34:5000/v2/'
echo "gradle build"
stage("Gradle Build") {
container('gradle') {
echo "gradle build start"
sh 'chmod +x ./gradlew'
sh './gradlew build'
echo "gradle build end"
}
}
stage("Dockerize and Push") {
sh 'echo 1111'
echo "docker start"
container("docker") {
sh 'echo 2222'
echo "docker start loding"
def dockerImage = docker.build("${image}:${tag}")
echo "docker build end"
echo "docker push start"
docker.withRegistry("https://${registry}", 'REGISTRY_CREDENTIALS') {
echo "docker push loding"
dockerImage.push()
dockerImage.push('latest')
echo "docker push end"
}
}
}
sh 'echo 6666'
echo "end"
} catch(e) {
echo e.getMessage()