Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:50
    batmat review_requested #3874
  • Jan 31 2019 21:29
    basil opened #3875
  • Jan 31 2019 18:18
    nisarg1499 opened #3874
  • Jan 31 2019 18:12
    nisarg1499 edited #3873
  • Jan 31 2019 18:04
    nisarg1499 edited #3873
  • Jan 31 2019 18:03
    nisarg1499 opened #3873
  • Jan 31 2019 15:53
    batmat synchronize #3865
  • Jan 31 2019 15:24
    jglick commented #3861
  • Jan 31 2019 15:18
    nisarg1499 closed #3863
  • Jan 31 2019 15:18
    nisarg1499 commented #3863
  • Jan 31 2019 15:13
    oleg-nenashev commented #3863
  • Jan 31 2019 15:11
    nisarg1499 reopened #3863
  • Jan 31 2019 15:11
    nisarg1499 closed #3863
  • Jan 31 2019 15:01
    nisarg1499 synchronize #3863
  • Jan 31 2019 14:54
    batmat synchronize #3865
  • Jan 31 2019 14:45
    batmat synchronize #3865
  • Jan 31 2019 14:16
    Wadeck closed #3805
  • Jan 31 2019 14:12
    pjanouse commented #3802
  • Jan 31 2019 14:12
    pjanouse commented #3802
  • Jan 31 2019 14:05
    pjanouse synchronize #3802
fugkco
@fugkco:matrix.org
[m]
Hello, is there a way to use nodesByLabel to select all nodes?
3 replies
Peak
@pattarika
can you help me with Linux command? I think chrome and chromedriver crash and I dont' know how to restart it. I can fix it by rebooting the server, but I'd like to know if there is a better way.
rtayek
@rtayek
Hi, newbie here trying to do https://github.com/jenkins-docs/simple-python-pyinstaller-app and the samples in https://github.com/jenkinsci/JenkinsPipelineUnit on windows 10. Has anyone got this or anything like it that works on windows? Thanks
halkeye
@halkeye:g4v.dev
[m]
@MarkEWaite: as docs officer, did you know that ^^ repo exists?
1 reply
@rtayek: python + windows should be pretty straight forward. I recommend providing errors when you try something and it doesn't work, instead of asking someone to do it for you. I personally use jenkins + docker to build python apps, I've never used any plugins or scripts that install the binaries on demand, though I believe thats doable too
@rtayek: also, jenkinspipelineunit is a framework for testing jenkins shared libraries, i'm not sure how it relates to either windows or python
rtayek
@rtayek
1 reply
rtayek
@rtayek
@jayshah123 I just ran your script. I got a: + docker inspect -f . node:14-alpine
unable to resolve docker endpoint: open C:/Program Files/Git/certs/client/ca.pem: no such file or directory. This is the same error i get when i run my fork of the https://github.com/jenkins-docs/simple-python-pyinstaller-app project. I suspect that we have some bad environment variables.
Shethap
@shethap

Hi, I am using docker image of jenkins
jenkins/jenkins:lts-jdk1.

It seems its not coming with wget installed. is it possible to install wget? or do we have any jekins official mage which comes with all basic tools installed like apt, wgt, curl etc. ?

halkeye
@halkeye:g4v.dev
[m]
@shethap: recommendation is to not do much work on the main install, but instead use agents. Its very easy to add things to the jenkins image though. "FROM jenkins/jenkins:lts-jdk11\nRUN apt update && apt install wget" (ish)
rtayek
@rtayek
hi, i am new here. i made 3 posts yesterday and now i can not find any of them. the dates seem to go from april 26 to may 7. my last post was trying answer a question about an error with C:/Program Files/Git/certs/client. i have this same error. when jenkins is running, that is the value of DOCKER_CERT_PATH. seems like this is usually ~/.docker. i have no files there. i am looking at https://stackoverflow.com/questions/41052953/what-is-the-docker-cert-path-in-docker-for-windows-on-windows-10 which may have some good info.
halkeye
@halkeye:g4v.dev
[m]
@rtayek: you shouldn't need docker-machine in windows, docker desktop is way better integrated these days. I'm pretty sure you can just use it natively
that being said, it might not be worth fighting with jenkins controller running in docker, just do java jenkins.war on your server, then have all your agents as docker agents, getting around the whole docker in docker issue
rtayek
@rtayek
@halkeye:g4v.dev i need to roll up a pipeline that will run jobs on a local cluster of 4 windows machine from a local admin machine. the jobs will use python and tensorflow so i thought this app https://github.com/rtayek/simple-python-pyinstaller-app would be a good place to start since evreything could run in the same virtual machine. i had a bunch of problems https://stackoverflow.com/questions/67430586/how-to-get-build-a-python-app-with-pyinstaller-to-work. are you suggesting something like https://www.jenkins.io/blog/2020/05/11/docker-windows-agents/ ? thank you.
halkeye
@halkeye:g4v.dev
[m]
@rtayek: I'm suggesting instead of trying to solve 50 items at once you keep things as simple as possible then refactor. Yes that blog post is a list of docker agents. You can use ssh agents. Cloud agents. Or any other combo.
rtayek
@rtayek
@halkeye:g4v.dev agree completely. i will work on that blog post. thank you.
vivek kumar sahu
@viveksahu26
Hello community, I have one doubt. Suppose I want to run a trigger(this will further run another job) just after my docker image is pulled. So, will Jenkins helpul for the same. Any suggestions??
Mohit Kumar Sharma
@mksha
Hi Everyone
i have a question
i have a groovy class which has some properties that i am able to set and get in pure groovy code , but when i use the same code as jenkins lib then the setter and getter are not avaiable which were created by groovy automatically
any clue ?
rtayek
@rtayek
@mksha don't forget to return this.
Srikanth Jana
@js-techie
where does the script block runs? controller or agent ?
rtayek
@rtayek
@js-techie if you are talking about a groovy script in jenkins the that can be run in any step. https://www.jenkins.io/doc/book/managing/script-console/
Srikanth Jana
@js-techie
thats ok, i heard that...even if we specify a pipeline to run on a specific agent, if we have script block anywhere in pipeline that block will be executed on controller
Just to confirm.
Mark Waite
@MarkEWaite
@js-techie the domain specific language is interpreted on the controller. Flow control is executed on the controller. Steps like sh, bat, powershell, checkout, and git perform their work on the agent defined for that step. It is generally best to place build logic inside scripts that are called from the Jenkinsfile rather than placing build logic inside the Jenkinsfile.
Srikanth Jana
@js-techie
okay got it, thanks you!
Graeme Wilson
@techlunacy
hi is there a way to identify i a job is running inside a pod(using the kubernetes plugin)? an environment variable or something?
Albert Hwang
@stania

finding a right way to call buildWithParameters REST-API,
have tried followings with python3 requests session.post(URL, data=...):

  • {"parameter": [{"name": "SELECTED_BRANCH", "value": "issue3990"}, {"name": "JDK", "value": "JDK8"}]}
  • json=%7B%22parameter%22%3A+%5B%7B%22name%22%3A+%22SELECTED_BRANCH%22%2C+%22value%22%3A+%22issue3990%22%7D%2C+%7B%22name%22%3A+%22JDK%22%2C+%22value%22%3A+%22JDK8%22%7D%5D%7D
  • SELECTED_BRANCH=issue3990&JDK=JDK8

and getting always this NPE callstack

java.lang.NullPointerException
    at java.base/java.util.TreeMap.getEntry(TreeMap.java:345)
    at java.base/java.util.TreeMap.containsKey(TreeMap.java:231)
    at java.base/java.util.TreeSet.contains(TreeSet.java:234)
    at hudson.model.ParametersAction.isSafeParameter(ParametersAction.java:358)
    at hudson.model.ParametersAction.filter(ParametersAction.java:330)
    at hudson.model.ParametersAction.getParameters(ParametersAction.java:183)
    at hudson.model.ParametersAction.buildEnvironment(ParametersAction.java:143)
    at hudson.model.EnvironmentContributingAction.buildEnvVars(EnvironmentContributingAction.java:84)
    at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:957)
    at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:57)
    at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:168)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1289)
    at hudson.scm.SCM.checkout(SCM.java:505)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1204)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:636)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:508)
    at hudson.model.Run.execute(Run.java:1907)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)

and my git SCM "branches to build" setting value is $SELECTED_BRANCH.

job does work fine if I trigger with web UI, but never succeeded with REST API.

(Jenkins 2.277.4)

Bruno P. Kinoshita
@kinow
Hi all. Just passing by to report spam in JIRA JENKINS-65583 , thanks!
Mohit Kumar Sharma
@mksha
HI everyone , how can i open a bug/issue ?
bec doc says , go to the jenkins jira board, but i dont have access to open a issue ticket
so how can one open a bug/issue ?
Hari Krishna Dara
@haridsv
I would like to request feedback on the JENKINS-65563 for which I already raised a PR jenkinsci/script-security-plugin#344. More specifically, I would like to understand the safety concern raised by Devin Nusbaum, whether it is well founded or based on the default "deny by default" security principle.
halkeye
@halkeye:g4v.dev
[m]
@haridsv: how can invokeMethod already be implemented? And if so, why do you need it whitelisted?
wouldn't invokemethod pretty much let you run any function on any object you want?
Hari Krishna Dara
@haridsv
@halkeye:g4v.dev The reason I need it whitelisted is to be able to override it, add some dynamic behavior and then call the default super methods. I don't need the ability to call it on arbitrary object. To be specific, I need this and getProperty to be customizable on the CpsScript. What would be the right way to whitelist them?
2 replies
halkeye
@halkeye:g4v.dev
[m]
you can also white list stuff on your install
1 reply
no idea, devin is by far the expect
DoofusCanadensis
@kenrachynski:matrix.org
[m]
I've found it's often way easier to treat Jenkins as a fancy scheduler and do all my build stuff in my project itself
1 reply
halkeye
@halkeye:g4v.dev
[m]
it depends on how much actual jenkins logic you need in your scripts, but even something like "readJSON(sh('groovy ./prepare.groovy', returnStdout: true).trim())" would give you the ability to run whatever you want and feed it back into jenkins as needed
Hari Krishna Dara
@haridsv
How about if CpsScript is enhanced to call custom getProperty and invokeMethod that could be implemented by user script classes? By default they would do nothing (probably would throw some "Not Implemented" equivalent exception). This would require no additional whitelisting.
2 replies
qspors
@qspors
Hello. I have more than 100 Jenkins jobs, In this jobs I have a lot of parametrized params, Is it possible make special request thru jenkins console for get list of this params ???
rtayek
@rtayek
@halkeye:g4v.dev i am back to just running from the war. all of the jenkins problems went away. i can run the containers from the command line. so there is no interference. i am making progress. thank you.
rtayek
@rtayek
is there any way to bookmark some of these posts?
Stephane Odul
@sodul
We are using Jenkins over k8s with the kubernetes plugin. Our pods are defined where there is a relatively small container for the agent, with 400MB RAM, while the pipeline workload happens with various containers and with a lot more RAM available: 1GB or more. We have been experiencing instability with git, as our repo has hundred of branches, and think things would scale better if we could offload the git commands from the jenkins agent container to the workload container, all while benefiting from all the configuration details of the git plugin. Is there support for such? Right now our jenkinsfiles do not even mention git, as the pipeline is configured to point to a jenkinsfile on the same repo and the clone happens automatically for each stage, having to 'manually' clone checkout would make our jenkinsfiles a lot more complex.