From b8b8b71c5e5e9094492c095111bbb0479415ba45 Mon Sep 17 00:00:00 2001 From: Marija Stopa Date: Fri, 17 Jan 2025 14:57:27 +0100 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c6e93335d..6c2c5ca57 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,28 +4,28 @@ pipeline { DOCKER_CREDENTIALS_ID = 'dockerhub-credentials' } stages { - stage('Checkstyle') { - steps { - sh './mvnw checkstyle:checkstyle' - archiveArtifacts artifacts: 'target/checkstyle-result.xml', fingerprint: true - } - } - stage('Test') { - steps { - sh './mvnw test' - } - } - stage('Build') { - steps { - sh './mvnw clean package -DskipTests' - } - } + // stage('Checkstyle') { + // steps { + // sh './mvnw checkstyle:checkstyle' + // archiveArtifacts artifacts: 'target/checkstyle-result.xml', fingerprint: true + // } + // } + // stage('Test') { + // steps { + // sh './mvnw test' + // } + // } + // stage('Build') { + // steps { + // sh './mvnw clean package -DskipTests' + // } + // } stage('Create Docker Image') { steps { script { withCredentials([usernamePassword(credentialsId: "${DOCKER_CREDENTIALS_ID}", usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD')]) { sh """ - echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin + docker login -u \$DOCKER_USERNAME --password \$DOCKER_PASSWORD docker build -t marijastopa/mr-jenkins:\${GIT_COMMIT:0:7} . docker push marijastopa/mr-jenkins:\${GIT_COMMIT:0:7} """