From a5e6719283116f2b178fbe7462a3f9c7d0b2ac4f Mon Sep 17 00:00:00 2001 From: Patric Date: Sat, 15 Jun 2024 14:33:11 +0200 Subject: [PATCH] change --- Jenkinsfile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 20d9fae..c5a9581 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,14 +9,27 @@ pipeline { stage('Clone') { steps { git branch: 'main', - //credentialsId: '9174b603-02b6-46bd-970d-64569bab977a', + credentialsId: '9174b603-02b6-46bd-970d-64569bab977a', + url: 'http://192.168.9.65:3001/patric/sc-test.git' + git branch: 'main', url: 'https://github.com/buddy-works/laravel-first-steps.git' } } stage('Build') { steps { - sh 'docker build . -t dockerfile' + script { + dockerImage = docker.build registry + ":$BUILD_NUMBER" + } } } + stage('Deploy our image') { + steps{ + script { + docker.withRegistry( '', registryCredential ) { + dockerImage.push() + } + } + } +} } -} \ No newline at end of file +}