Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote checkout not working #209

Open
rcjames opened this issue Jul 19, 2022 · 5 comments
Open

Remote checkout not working #209

rcjames opened this issue Jul 19, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@rcjames
Copy link

rcjames commented Jul 19, 2022

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

  • Jenkins server version 2.346.2 running in Kubernetes.
  • Agent based on jenkins/inbound-agent:4.7-1-alpine running in Kubernetes.
  • conventional-commits plugin version 0.11.2

Reproduction steps

  1. Create a Jenkinsfile in the root of the repository
pipeline {

	agent {
		label 'k8s'
	}

	environment {
		RELEASE_VERSION = ""
	}

	stages {
		stage('Checkout') {
			steps {
				withCredentials([[$class:           'UsernamePasswordMultiBinding',
						  credentialsId:    'xxxxxx',
						  usernameVariable: 'GIT_USERNAME',
						  passwordVariable: 'GIT_PASSWORD' ]]) {
					sh "git config --global user.email [email protected]"
					sh "git config --global user.name jenkins"
					sh "git config remote.origin.url https://\${GIT_PASSWORD}@github.com/xxxx/xxxx.git"
					sh "git fetch --tags"
				}
			}
		}

		stage('Build and release') {
			steps {
				script {
					env.RELEASE_VERSION = nextVersion()
					sh '''
						make build release
					'''
				}
			}
		}
	}

	post {
		success {
			withCredentials([[$class:           'UsernamePasswordMultiBinding',
					  credentialsId:    'xxxxx',
					  usernameVariable: 'GIT_USERNAME',
					  passwordVariable: 'GIT_PASSWORD' ]]) {
				sh "git tag env.RELEASE_VERSION"
				sh "git push --tags"
			}
		}
	}
}
  1. Run the job on a remote agent in Kubernetes

Expected Results

Next version to be generated out

Actual Results

java.io.IOException: error=2, No such file or directory
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at io.jenkins.plugins.conventionalcommits.process.ProcessUtil.execute(ProcessUtil.java:49)
	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:217)
	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution.start(SynchronousStepExecution.java:37)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:319)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:193)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
Caused: java.io.IOException: Cannot run program "git" (in directory "/home/jenkins/workspace/tructure-trigger-pipeline_master"): error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at io.jenkins.plugins.conventionalcommits.process.ProcessUtil.execute(ProcessUtil.java:49)
	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:217)
	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution.start(SynchronousStepExecution.java:37)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:319)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:193)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
	at WorkflowScript.run(WorkflowScript:29)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78)
	at jdk.internal.reflect.GeneratedMethodAccessor325.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:402)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:314)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:278)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Anything else?

There are semver tags present in the repository (e.g. 0.0.9). Likely related to #173

@rcjames rcjames added the bug Something isn't working label Jul 19, 2022
@philippart-s
Copy link
Collaborator

Hi,

Sorry for the delay but I'm in holidays and this plugin have few developers 😉 .
I can try have a look when I come back but your use case is very particular with Kubernetes, it may take time that I test in the same environment.

The error message seems indicate that the git client is not installed on your worker, can you verify your worker tools configuration ?

@rcjames
Copy link
Author

rcjames commented Aug 8, 2022

@philippart-s - Not to worry. This is not an urgent thing.

The error message seems indicate that the git client is not installed on your worker, can you verify your worker tools configuration ?

I have exec'd into one of the agents and confirmed that git is installed and on the path. The git checkout defined in the pipeline manifest I have included above also has no issues.

@wwuck
Copy link

wwuck commented Sep 9, 2022

@philippart-s I am getting the same error without using kubernetes.

pipeline script:

def repositories = [
    'ssh://[email protected]/git-repository-url'
]

def credentials = 'credentials-id'

def builders = [:]

repositories.eachWithIndex { elem, index ->
  builders[index.toString()] = {
    node('build-agent-with-git-installed') {
      stage('checkout') { 
        checkout([$class: 'GitSCM', branches: [[name: '*/main']], extensions: [[$class: 'CloneOption', noTags: false, reference: '', shallow: false]], userRemoteConfigs: [[credentialsId: credentials, url: elem]]])
      }
      
      stage('Get next version ...') {
        echo 'start new version'
        sh('which git')
        sh('echo $PATH')
        sh('git tag')
        sh('git show 0.1.0')
        CURRENT_VERSION=currentVersion()
        echo "Current version: $CURRENT_VERSION"  
        NEXT_VERSION=nextVersion()
        echo "Next version : $NEXT_VERSION"
      }
      
    }
  }
}

parallel builders

build log:

[2022-09-09T15:33:12.442Z] Started by user User1
[2022-09-09T15:33:12.466Z] [Pipeline] Start of Pipeline
[2022-09-09T15:33:12.482Z] [Pipeline] parallel
[2022-09-09T15:33:12.485Z] [Pipeline] { (Branch: 0)
[2022-09-09T15:33:12.500Z] [Pipeline] node
[2022-09-09T15:33:12.507Z] Running on build-agent-with-git-installed in /var/lib/jenkins-agent/agent/workspace/Test/test-release
[2022-09-09T15:33:12.512Z] [Pipeline] {
[2022-09-09T15:33:12.520Z] [Pipeline] stage
[2022-09-09T15:33:12.521Z] [Pipeline] { (checkout)
[2022-09-09T15:33:12.532Z] [Pipeline] checkout
[2022-09-09T15:33:12.538Z] The recommended git tool is: NONE
[2022-09-09T15:33:12.548Z] using credential credentials-id
[2022-09-09T15:33:12.557Z] Fetching changes from the remote Git repository
[2022-09-09T15:33:12.553Z]  > /usr/bin/git rev-parse --resolve-git-dir /var/lib/jenkins-agent/agent/workspace/Test/test-release/.git # timeout=10
[2022-09-09T15:33:12.559Z]  > /usr/bin/git config remote.origin.url ssh://[email protected]/git-repository-url # timeout=10
[2022-09-09T15:33:12.566Z] Fetching upstream changes from ssh://[email protected]:7999/tem/another-test-repository.git
[2022-09-09T15:33:12.566Z]  > /usr/bin/git --version # timeout=10
[2022-09-09T15:33:12.570Z]  > git --version # 'git version 2.30.2'
[2022-09-09T15:33:12.570Z] using GIT_SSH to set credentials templates@esk-jenkins-01
[2022-09-09T15:33:12.571Z] Verifying host key using known hosts file, will automatically accept unseen keys
[2022-09-09T15:33:12.573Z]  > /usr/bin/git fetch --tags --force --progress -- ssh://[email protected]/git-repository-url +refs/heads/*:refs/remotes/origin/* # timeout=10
[2022-09-09T15:33:13.588Z] Checking out Revision 96e6032105be22ed94f55b756c7207c6517fdcf5 (refs/remotes/origin/main)
[2022-09-09T15:33:13.598Z] Commit message: "feat: add fake git"
[2022-09-09T15:33:13.585Z]  > /usr/bin/git rev-parse refs/remotes/origin/main^{commit} # timeout=10
[2022-09-09T15:33:13.590Z]  > /usr/bin/git config core.sparsecheckout # timeout=10
[2022-09-09T15:33:13.591Z]  > /usr/bin/git checkout -f 96e6032105be22ed94f55b756c7207c6517fdcf5 # timeout=10
[2022-09-09T15:33:13.599Z]  > /usr/bin/git rev-list --no-walk 96e6032105be22ed94f55b756c7207c6517fdcf5 # timeout=10
[2022-09-09T15:33:13.610Z] The recommended git tool is: NONE
[2022-09-09T15:33:13.617Z] using credential credentials-id
[2022-09-09T15:33:13.626Z] The recommended git tool is: NONE
[2022-09-09T15:33:13.633Z] using credential credentials-id
[2022-09-09T15:33:13.640Z] [GitCheckoutListener] Recording commits of 'git ssh://[email protected]/git-repository-url'
[2022-09-09T15:33:13.640Z] [GitCheckoutListener] Found previous build 'Test/test-release #21' that contains recorded Git commits
[2022-09-09T15:33:13.640Z] [GitCheckoutListener] -> Starting recording of new commits since '96e6032'
[2022-09-09T15:33:13.640Z] [GitCheckoutListener] -> Using head commit '96e6032' as starting point
[2022-09-09T15:33:13.640Z] [GitCheckoutListener] -> Git commit decorator could not be created for SCM 'hudson.plugins.git.GitSCM@7eab87af'
[2022-09-09T15:33:13.640Z] [GitCheckoutListener] -> No new commits found
[2022-09-09T15:33:13.935Z] [Pipeline] echo
[2022-09-09T15:33:13.937Z] done checkout
[2022-09-09T15:33:13.939Z] [Pipeline] }
[2022-09-09T15:33:13.952Z] [Pipeline] // stage
[2022-09-09T15:33:13.959Z] [Pipeline] stage
[2022-09-09T15:33:13.961Z] [Pipeline] { (Get next version ...)
[2022-09-09T15:33:13.973Z] [Pipeline] echo
[2022-09-09T15:33:13.974Z] start new version
[2022-09-09T15:33:13.978Z] [Pipeline] sh
[2022-09-09T15:33:14.253Z] + which git
[2022-09-09T15:33:14.253Z] /usr/bin/git
[2022-09-09T15:33:14.266Z] [Pipeline] sh
[2022-09-09T15:33:14.540Z] + echo /usr/local/bin:/usr/bin:/bin:/usr/games
[2022-09-09T15:33:14.540Z] /usr/local/bin:/usr/bin:/bin:/usr/games
[2022-09-09T15:33:14.551Z] [Pipeline] sh
[2022-09-09T15:33:13.621Z]  > /usr/bin/git rev-parse HEAD^{commit} # timeout=10
[2022-09-09T15:33:14.841Z] [Pipeline] sh
[2022-09-09T15:33:15.115Z] + git tag
[2022-09-09T15:33:15.116Z] 0.1.0
[2022-09-09T15:33:15.127Z] [Pipeline] sh
[2022-09-09T15:33:15.399Z] + git show 0.1.0
[2022-09-09T15:33:15.399Z] commit 838c14db312cf0d46f29db828999b4ef8b48287e
[2022-09-09T15:33:15.399Z] Author: user1 <[email protected]>
[2022-09-09T15:33:15.399Z] Date:   Fri Sep 9 23:17:54 2022 +1000
[2022-09-09T15:33:15.399Z] 
[2022-09-09T15:33:15.399Z]     feat: file2
[2022-09-09T15:33:15.399Z] 
[2022-09-09T15:33:15.399Z] diff --git a/file2 b/file2
[2022-09-09T15:33:15.399Z] new file mode 100644
[2022-09-09T15:33:15.399Z] index 0000000..e69de29
[2022-09-09T15:33:15.409Z] [Pipeline] currentVersion
[2022-09-09T15:33:15.415Z] Current Tag is: 
[2022-09-09T15:33:15.419Z] [Pipeline] echo
[2022-09-09T15:33:15.421Z] Current version: 0.0.0
[2022-09-09T15:33:15.423Z] [Pipeline] nextVersion
[2022-09-09T15:33:15.427Z] Current Tag is: 
[2022-09-09T15:33:15.435Z] [Pipeline] }
[2022-09-09T15:33:15.454Z] [Pipeline] // stage
[2022-09-09T15:33:15.461Z] [Pipeline] }
[2022-09-09T15:33:15.477Z] [Pipeline] // node
[2022-09-09T15:33:15.485Z] [Pipeline] }
[2022-09-09T15:33:15.486Z] Terminated
[2022-09-09T15:33:15.490Z] Failed in branch 0
[2022-09-09T15:33:15.498Z] Terminated
[2022-09-09T15:33:15.504Z] [Pipeline] // parallel
[2022-09-09T15:33:15.509Z] Terminated
[2022-09-09T15:33:15.518Z] [Pipeline] End of Pipeline
[2022-09-09T15:33:15.520Z] Terminated
[2022-09-09T15:33:15.525Z] java.io.IOException: error=2, No such file or directory
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
[2022-09-09T15:33:15.525Z] 	at io.jenkins.plugins.conventionalcommits.process.ProcessUtil.execute(ProcessUtil.java:49)
[2022-09-09T15:33:15.525Z] 	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:217)
[2022-09-09T15:33:15.525Z] 	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:133)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution.start(SynchronousStepExecution.java:37)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
[2022-09-09T15:33:15.525Z] 	at jdk.internal.reflect.GeneratedMethodAccessor905.invoke(Unknown Source)
[2022-09-09T15:33:15.525Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
[2022-09-09T15:33:15.525Z] 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
[2022-09-09T15:33:15.525Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
[2022-09-09T15:33:15.525Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
[2022-09-09T15:33:15.525Z] Caused: java.io.IOException: Cannot run program "git" (in directory "/var/lib/jenkins-agent/agent/workspace/Test/test-release"): error=2, No such file or directory
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
[2022-09-09T15:33:15.525Z] 	at io.jenkins.plugins.conventionalcommits.process.ProcessUtil.execute(ProcessUtil.java:49)
[2022-09-09T15:33:15.525Z] 	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:217)
[2022-09-09T15:33:15.525Z] 	at io.jenkins.plugins.conventionalcommits.NextVersionStep$Execution.run(NextVersionStep.java:133)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution.start(SynchronousStepExecution.java:37)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
[2022-09-09T15:33:15.525Z] 	at jdk.internal.reflect.GeneratedMethodAccessor905.invoke(Unknown Source)
[2022-09-09T15:33:15.525Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
[2022-09-09T15:33:15.525Z] 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
[2022-09-09T15:33:15.525Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
[2022-09-09T15:33:15.525Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
[2022-09-09T15:33:15.525Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
[2022-09-09T15:33:15.525Z] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
[2022-09-09T15:33:15.525Z] 	at WorkflowScript.run(WorkflowScript:28)
[2022-09-09T15:33:15.525Z] 	at ___cps.transform___(Native Method)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78)
[2022-09-09T15:33:15.525Z] 	at jdk.internal.reflect.GeneratedMethodAccessor479.invoke(Unknown Source)
[2022-09-09T15:33:15.525Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-09-09T15:33:15.525Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
[2022-09-09T15:33:15.525Z] 	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
[2022-09-09T15:33:15.526Z] 	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
[2022-09-09T15:33:15.526Z] 	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
[2022-09-09T15:33:15.526Z] 	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
[2022-09-09T15:33:15.526Z] 	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
[2022-09-09T15:33:15.526Z] 	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
[2022-09-09T15:33:15.526Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2022-09-09T15:33:15.526Z] 	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
[2022-09-09T15:33:15.526Z] 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:30)
[2022-09-09T15:33:15.526Z] 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70)
[2022-09-09T15:33:15.526Z] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[2022-09-09T15:33:15.526Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2022-09-09T15:33:15.526Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[2022-09-09T15:33:15.526Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[2022-09-09T15:33:15.526Z] 	at java.base/java.lang.Thread.run(Thread.java:829)
[2022-09-09T15:33:15.531Z] Terminated
[2022-09-09T15:33:15.532Z] Finished: FAILURE

@dmitrigrigoriev
Copy link

Is there something new? Unfortunately I've got the same problem.

@wagst
Copy link

wagst commented Jan 13, 2023

I also see this error "java.io.IOException: Cannot run program "git"...
Are there any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants