Hi
I'm trying to run this jenkinsfile, but get the below error. Does anyone
know what the problem is?
Jenkinfile
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
def failIfNoTests = ""
try {
failIfNoTests = ITEST_FAIL_IF_NO_TEST
} catch (Throwable e) {
failIfNoTests = "false"
}
def itestPattern = ""
try {
itestPattern = ITEST_PATTERN
} catch (Throwable e) {
itestPattern = "*KT"
}
def versionPrefix = ""
try {
versionPrefix = VERSION_PREFIX
} catch (Throwable e) {
versionPrefix = "1.0"
}
def canaryVersion = "${versionPrefix}.${env.BUILD_NUMBER}"
//def utils = new io.fabric8.Utils()
node {
def envProd = 'shiftwork-production'
checkout scm
kubernetes.pod('buildpod')
.withNewContainer()
.withImage('jhipster/jhipster')
.withPrivileged(true)
//.withHostPathMount('/var/run/docker.sock','/var/run/docker.sock')
//.withEnvVar('DOCKER_CONFIG','/home/jenkins/.docker/')
//.withSecret('jenkins-docker-cfg','/home/jenkins/.docker')
//.withSecret('jenkins-maven-settings','/root/.m2')
//.withServiceAccount('jenkins')
.inside {
stage 'Canary Release'
mavenCanaryRelease{
version = canaryVersion
}
stage 'Integration Test'
mavenIntegrationTest{
environment = 'Testing'
failIfNoTests = localFailIfNoTests
itestPattern = localItestPattern
}
stage 'Rolling Upgrade Production'
def rc = readFile 'target/classes/kubernetes.json'
kubernetesApply(file: rc, environment: envProd)
}
}
Error
[Pipeline] withPod
[Pipeline] {
[Pipeline] stage (Canary Release)
Using the ‘stage’ step without a block argument is deprecated
Entering stage Canary Release
Proceeding
[Pipeline] sh
[copy of sw] Running shell script
$ sh -c echo $$ > '/home/jenkins/workspace/copy of
sw@tmp/durable-65cd6640/pid'; jsc=durable-5f8d30ed8e3c29be00825e1f021569f8;
JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/copy of
sw@tmp/durable-65cd6640/script.sh' > '/home/jenkins/workspace/copy of
sw@tmp/durable-65cd6640/jenkins-log.txt' 2>&1; echo $? >
'/home/jenkins/workspace/copy of sw@tmp/durable-65cd6640/jenkins-result.txt'
exit
/bin/sh: 1: cannot create /home/jenkins/workspace/copy of
sw@tmp/durable-65cd6640/pid: Directory nonexistent
/bin/sh: 1: cannot create /home/jenkins/workspace/copy of
sw@tmp/durable-65cd6640/jenkins-log.txt: Directory nonexistent
/bin/sh: 1: cannot create /home/jenkins/workspace/copy of
sw@tmp/durable-65cd6640/jenkins-result.txt: Directory nonexistent
$ command terminated with non-zero exit code: Error executing in Docker
Container: 2[Pipeline] }
[Pipeline] // withPod
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/6a59f50b-5c30-4792-9eb7-e42d918620ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.