RE: Kubernetes Plugin: How to run commands within agent container as non-root?

2020-09-15 Thread iris Jasper Orschulko
Hi Vincent, I am fairly certain, that the images are identical, as I used to pod image from the jenkins logs (jenkins/inbound-agent:4.3-4). The second image I used in the pipeline for the build process was https://hub.docker.com/r/kasproject/kas which also should have a non-root user (builder,

Re: Get result of build step

2020-09-15 Thread Marat Gareev
Thank you! It became clearer. пн, 14 сент. 2020 г. в 20:43, Stuart Rowe : > The triggerRemoteJob pipeline step returns a Handle > , > w

Re: Kubernetes Plugin: How to run commands within agent container as non-root?

2020-09-15 Thread Vincent Latombe
Your second image runs as root and its /etc/passwd matches what you were seeing in your pipeline. ➭ docker run --entrypoint /bin/bash -ti kasproject/kas root@ffa3dff671f9:/# cat /etc/passwd root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin

How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread zil...@gmail.com
I see this, but I don't understand how to implement it for my use case. https://www.codependentcodr.com/scheduled-builds-in-jenkins-scripted-pipelines.html I want JobA to trigger JobB, but at a certain time. I do this now *Step in JobA to trigger JobB* build job: JobB, wait: true ...but I

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread Gianluca
>From what I know that's specific thing is not possible. And to be honest, it's quite strange as well. Maybe if you explain us why are you trying to do that, we could suggest alternatives that are possible in Jenkins. Cheers, Gianluca. Il giorno martedì 15 settembre 2020 alle 15:40:20 UTC+1 zi

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread Fabian Cenedese
>...but I wish I can do this (for illustration only, the cron option does not >exist of course) > >Step in JobA to trigger JobB to run around 9:00pm ET >build job: JobB, > cron: "H 21 * * 1", > wait: true How about JobB always runs at 9 (started from cron) and always checks first, whe

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread zil...@gmail.com
Thanks for responding Gianluca. So I have a Jenkins job that builds production code mid-day, but does NOT deploy it. We have a a separate deployment job that's cron'ed at "H 21 * * 1" to deploy the code built by the mid-day build job Part of the mid-day build is to check if certain microservice

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread zil...@gmail.com
Hi Fabi, Great idea. How can JobA set a flag for JobB that persists when JobB runs at 9:00pm ET? On Tuesday, September 15, 2020 at 10:56:48 AM UTC-4 fcenedese wrote: > > >...but I wish I can do this (for illustration only, the cron option does > not exist of course) > > > >Step in JobA to trig

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread zil...@gmail.com
Fabi, Using this trick? https://www.quora.com/How-can-I-pass-a-parameter-from-one-job-to-another-in-Jenkins-using-property-file On Tuesday, September 15, 2020 at 11:07:18 AM UTC-4 zil...@gmail.com wrote: > Hi Fabi, > > Great idea. How can JobA set a flag for JobB that persists when JobB runs

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread Fabian Cenedese
At 17:07 15.09.2020, zil...@gmail.com wrote: >Hi Fabi, > >Great idea. How can JobA set a flag for JobB that persists when JobB runs at >9:00pm ET? That depends on your system. I don't know if there's a Jenkins internal way to do this. But if the jobs run on the same machine then maybe you could

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread Gianluca
Yes, it explains. I would suggest to use intermediate artifacts / published files to use on the "Deploy" job to know what to do instead of trigger that from "Build" job. (I'm calling "Build" the one that runs on mid-day and "Deploy" the one that runs at "H 21 * * 1") So, in my suggestion the f

Re: How to trigger a job at a certain time in Jenkins pipeline?

2020-09-15 Thread zil...@gmail.com
Gianluca, Perfect. I'll look into this. Thanks, Chris On Tuesday, September 15, 2020 at 11:26:48 AM UTC-4 Gianluca wrote: > Yes, it explains. > > I would suggest to use intermediate artifacts / published files to use on > the "Deploy" job to know what to do instead of trigger that from "Build"

Bash Shell output as Jenkins Choice Parameter

2020-09-15 Thread Kenny Cason
I'm running Jenkins 2.251 on Ubuntu. I have a shell script (script.sh) that outputs a list: $ ./script.sh [item1,item2,item3] In my freestyle project I've added a build step that executes script.sh, and I see the output in the build log just like the above example. I don't care if the final pro

Push Jenkins-Job shell- and powershell code to git?

2020-09-15 Thread Michael Renner
Moin, we have many jobs with extensive shell- und powershell code in the build sections. Is there a chance to push the code to our internal GitLab server as soon as the code/job was modified and saved? That would be an easily accessible backup that would allow to recover a previous version if e.g.

Re: Bash Shell output as Jenkins Choice Parameter

2020-09-15 Thread Gianluca
Hi Kenny, I think you still need to get the output from shell script to groovy and then parse it. The "sh" command has a parameter to return the stdout of the script. So, starting from the Groovy script you mentioned ... then I would remove all code related to "cmd.execute" and I will change wit