Update Jenkinsfile3

This commit is contained in:
s464903 2024-03-30 11:16:59 +01:00
parent 2f50f8d1b8
commit 317896e141

View File

@ -30,7 +30,9 @@ pipeline {
def testImage = docker.build("test-image", "./Dockerfile") def testImage = docker.build("test-image", "./Dockerfile")
} }
} }
stage('Build') { stage('Run in container'){
docker.image('test-image').inside {
stage('Build') {
steps { steps {
// Run the maven build // Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
@ -40,8 +42,6 @@ pipeline {
} }
} }
} }
stage('Run in container'){
docker.image('test-image').inside {
stage('Checkout') { stage('Checkout') {
steps { steps {
// Krok: Sklonowanie repozytorium git // Krok: Sklonowanie repozytorium git