Commit e07ff832 authored by Ndoumbe's avatar Ndoumbe
Browse files

Update Jenkinsfile

parent d6b71856
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -37,17 +37,19 @@ pipeline {
           }
        }

		stage('Building docker image for tai and pushing it') {

       stage('Building image') {
      steps{
				ws("$WORKSPACE" + '/tai_build/') {
        script {
			  withCredentials([usernamePassword(credentialsId: 'docker-hub-ndiop', passwordVariable: 'Password', usernameVariable: 'Username')]) {
                  sh ('docker login -u ${env.Username} -p ${env.Password}')
                        docker.withRegistry('', 'docker-hub-ndiop') {
                          def image = docker.build registry 
                          image.push()
          dockerImage = docker.build registry 
        }
      }
    }
    stage('push Image') {
      steps{
         script {
            docker.withRegistry( '', docker-hub-ndiop ) {
            dockerImage.push()
          }
        }
      }