1

This is the error that comes up when trying to run pipeline

process apparently never started in /var/jenkins_home/workspace/AsadJ@2@tmp/durable-2744819c
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)

This is my jenkins pipeline

pipeline {
    agent {
        docker { image 'ubuntu:latest' }
   }
   environment {
       dockerImage =''
       registry = 'XYZ'
       registryCredential ='docker-push'
   }
  stages {
    stage("Set Up") {
      steps {
        echo 'Set up GIT'
        git branch: 'main', url: 'https://github.com/XYZ'
      }
    }
    stage("Build docker image") {
      steps {
        echo 'BUILDING'
        script {
            dockerImage = docker.build registry + ":$BUILD_NUMBER"
        }
      }
    }
    stage('Push image') {
     steps {
        script {
            docker.withRegistry('', registryCredential) {
                dockerImage.push()
            }
        }
      }
    }
    
}}

First time using jenkins would really appreciate a solution and explanation.

Asad Khan
  • 11
  • 2

1 Answers1

0

What do you see in logs if you run with '-Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true' config?

See also: Stuck in 'sh' stage and then Process apparently never started in /home/jenkins/jenkins/workspace/ Remove all empty variables: Manage Jenkins -> Configure System

ambergupta09
  • 162
  • 2
  • 11