I'm trying to build a pipeline to build a java maven project pipeline committed on github. I've installed jenkins on my windows machine. My pipeline is getting struck at below stage
Started by user Akshay Katti
Obtained Jenkinsfile from git C:\Users\ak186148\git\Kylo-Accelerator
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on Jenkins in C:\Users\ak186148\.jenkins\workspace\Kylo-Promoter-CI-CD
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
> git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git.exe config remote.origin.url C:\Users\ak186148\git\Kylo-Accelerator # timeout=10
Fetching upstream changes from C:\Users\ak186148\git\Kylo-Accelerator
> git.exe --version # timeout=10
> git.exe fetch --tags --progress C:\Users\ak186148\git\Kylo-Accelerator +refs/heads/*:refs/remotes/origin/*
> git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
> git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision e8ad0282a7fbd877461b3866a15f0116b2848065 (refs/remotes/origin/master)
> git.exe config core.sparsecheckout # timeout=10
> git.exe checkout -f e8ad0282a7fbd877461b3866a15f0116b2848065
Commit message: "Add initial Jenkinsfile"
> git.exe rev-list --no-walk e8ad0282a7fbd877461b3866a15f0116b2848065 # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] sh
[C:\Users\ak186148\.jenkins\workspace\Kylo-Promoter-CI-CD] Running shell script
nohup: failed to run command 'sh': No such file or directory
process apparently never started in C:\Users\ak186148\.jenkins\workspace\Kylo-Promoter-CI-CD@tmp\durable-b24ab647
[Pipeline] sh
[C:\Users\ak186148\.jenkins\workspace\Kylo-Promoter-CI-CD] Running shell script
nohup: failed to run command 'sh': No such file or directory
process apparently never started in C:\Users\ak186148\.jenkins\workspace\Kylo-Promoter-CI-CD@tmp\durable-5e2947b3
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
Please find attached my Jenkinsfile (i've changed from sh to bat)
pipeline {
agent {
docker {
image 'maven:3-alpine'
args '-v /root/.m2:/root/.m2'
}
}
stages {
stage('Build')
{
steps {
bat 'mvn -B -DskipTests clean package'
}
}
}
}
Also please find below the error on blue ocean page blue_ocean_error
Please help.