/run/secretes
(ref. https://github.com/dduportal/jenkins-examples/blob/8f0bc983389038d90a2b61bed571105069e5c162/docker/docker-compose.yml#L8-L9docker-compose run jenkins ls -l /var/jenkins/home
to confirm. Also this channel is for creating the jenkins packaging, not for jenkins help, I would recommend going to jenkinsci/jenkins room
Hi team.. I'm working with a project that uses espressif and to build it on my machine with docker way I do the following:
docker run --rm -v $PWD:/project -w /project espressif/idf:v4.2.2 idf.py build
(note that, first of all I make a cd to the project directory and then the PWD environment variable passes the correct path for mounting the volume)
I would like to elaborate a declarative pipeline, and I would like to execute the command equivalent to the one above. The way I implemented it based on other examples that worked, and the log result below.
I don't understand why the way to pass these 'idf.py build' arguments in the 'steps' block is not working. Does anyone have any ideas?
My pipeline:
pipeline {
agent any
environment {
PROJ_NAME = 'test'
}
stages {
stage('Checkout') {
steps {
git url: 'ssh://git@bitbucket.org/joaogbc/iot-project.git'
}
}
stage('Build') {
agent {
docker {
image 'espressif/idf:v4.2.2'
args '--rm -v $PWD:/project -w /project'
reuseNode true
}
}
steps{
sh 'idf.py build'
}
}
}
}
Error snippet:
[Pipeline] withDockerContainer
Jenkins does not seem to be running inside a container
$ docker run -t -d -u 1000:1000 --rm -v $PWD:/project -w /project -w /var/lib/jenkins/workspace/iot-project-TEST -v /var/lib/jenkins/workspace/iot-project-TEST:/var/lib/jenkins/workspace/iot-project-TEST:rw,z -v /var/lib/jenkins/workspace/iot-project-TEST@tmp:/var/lib/jenkins/workspace/iot-project-TEST@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** espressif/idf:v4.2.2 cat
$ docker top 81920a1146eabe9bf5c08339a682d81ac23777de0421895e1184d2a8ef27fc8c -eo pid,comm
ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
[Pipeline] {
[Pipeline] sh
+ idf.py build
/var/lib/jenkins/workspace/iot-project-TEST@tmp/durable-b8bf6ce0/script.sh: 1: /var/lib/jenkins/workspace/iot-project-TEST@tmp/durable-b8bf6ce0/script.sh: idf.py: not found
[Pipeline] }
$ docker stop --time=1 81920a1146eabe9bf5c08339a682d81ac23777de0421895e1184d2a8ef27fc8c
$ docker rm -f 81920a1146eabe9bf5c08339a682d81ac23777de0421895e1184d2a8ef27fc8c
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 127
Finished: FAILURE
stage('Build') {
agent {
docker {
image 'tool/stm32-cubeide-image:1.0'
reuseNode true
}
}
steps {
sh '/opt/stm32cubeide/headless-build.sh -importAll $WORKSPACE -data $WORKSPACE -cleanBuild $DIR/$OPT_BUILD'
}
}
jenkins-plugin-cli
which fails the plugin installation?
install-plugins.sh
(which was using the versionLT()
bash function as far as I remember) ?
have it all automated
Use https://www.jenkins.io/projects/jcasc/ with job-dsl-plugin: https://github.com/jenkinsci/job-dsl-plugin/blob/master/docs/JCasC.md :)
have it all automated
Use https://www.jenkins.io/projects/jcasc/ with job-dsl-plugin: https://github.com/jenkinsci/job-dsl-plugin/blob/master/docs/JCasC.md :)
Well... that's just super-interesting and super-helpful - thanks a whole bunch :)
there is even a dedicated channel for it if you need additional help: https://matrix.to/#/#jenkinsci\_configuration-as-code-plugin:gitter.im
Im having trouble with the link, says "does not exist"
Hello @timja @MarkEWaite I'm investigating jenkinsci/docker-inbound-agent#279 and I discovered that the build of the main branch does NOT use the "latest" released version:
Should we slighlty change the release process for this (and jenkins/agent as well)?
it would be easier if they were in the same repository
+100