Re: "git submodule foreach" syntax error in Jenkins pipeline, but works on command line?

2023-07-13 Thread zil...@gmail.com
I can execute the following on a command line, where I just want to > checkout a feature/* branch, and if the sub module does not have it, I > want to checkout master. > $ git submodule foreach 'git checkout feature/test-new-scripts || git > checkout master' > > However, if I execut

"git submodule foreach" syntax error in Jenkins pipeline, but works on command line?

2023-07-12 Thread zil...@gmail.com
in a Jenkins pipeline, I get a syntax error. sh """ git submodule foreach \\'git checkout feature/test-new-scripts || git checkout master\\' """ I get the following error + git submodule foreach "git checkout feature/test-new-scripts Entering 'module1' "

In my Jenkins pipeline, why am I getting 2 different execution results with seemingly similar code, i.e. one job passes and the other one fails?

2023-06-19 Thread zil...@gmail.com
I'm writing Jenkins pipeline code and have two similar Groovy files with class definitions inside them. When I run a job using on Groovy file, the job runs fine. When I run a similar job using the other Groovy file I get an error. Please let me explain. I have the following file structure

Want to trigger scripted jenkins pipeline when PR approved

2023-06-12 Thread Shail Thacker
I was able to trigger jenkins pipeline when PR approved in *declarative syntax*. triggers { pullRequestReview(reviewStates: ['approved']) } I want to achieve the same with *scripted pipeline*. I tried as describe below, but that was not working. properties([ pipelineTriggers([pullRequestReview

Re: How to wait until artifact uploading is complete and available from Jenkins pipeline?

2023-03-03 Thread Baptiste Mathus
stream pipelines use the artifacts from that pipeline and > because the pipeline is completing successfully and not waiting until the > artifact is actually available through Jenkins, the downstream pipelines > are failing. > > TLDR: My question is how can we force this Jenkins pipeline to wait u

Re: How to wait until artifact uploading is complete and available from Jenkins pipeline?

2023-03-02 Thread 'christop...@googlemail.com' via Jenkins Users
I'd add something like a sleep to the loop BR, Christoph ian.bo...@interceptgames.com schrieb am Donnerstag, 2. März 2023 um 01:27:09 UTC+1: > For anyone else that stumbles across this question, I figured it out. I > used the following code snippet to ensure the Jenkins pipeline

Re: How to wait until artifact uploading is complete and available from Jenkins pipeline?

2023-03-01 Thread 'Ian Boudreaux' via Jenkins Users
For anyone else that stumbles across this question, I figured it out. I used the following code snippet to ensure the Jenkins pipeline waits until it sees the artifact before completing the pipeline run so that if any downstream jobs see the success, they can assume that the artifact

How to wait until artifact uploading is complete and available from Jenkins pipeline?

2023-03-01 Thread 'Ian Boudreaux' via Jenkins Users
the artifact is actually available through Jenkins, the downstream pipelines are failing. TLDR: My question is how can we force this Jenkins pipeline to wait until that artifact is actually visible and available through Jenkins before it completes as successful? Thanks! Ian -- You received this message

How to build Jenkins Pipeline with these step

2022-12-02 Thread Jarirr
agent any stages { stage ('Build') { steps { // 1.Git Pull pull request#1\ // 2.create container // 3.Build container echo 'Running Build Phase.' } } stage ('Unit Test') { steps { //1.Run Unit

Re: copy artificate slave server to master server in jenkins pipeline

2022-08-17 Thread 'Dirk Heinrichs' via Jenkins Users
Am Dienstag, dem 16.08.2022 um 04:34 -0700 schrieb Prasant singh: > can you please help how to cop artifacts on master server without > using cp orscp command on master Jenkins server? Depends on your use case. You can either use stash/unstash or archive artifacts/copy artifacts. The former is

Re: copy artificate slave server to master server in jenkins pipeline

2022-08-17 Thread Alex Earl
Please use the updated terminology master -> controller slave -> agent On Wed, Aug 17, 2022 at 8:32 AM Prasant singh wrote: > Hi All, > can you please help how to cop artifacts on master server without using cp > orscp command on master Jenkins server? > > -- > You received this message

copy artificate slave server to master server in jenkins pipeline

2022-08-17 Thread Prasant singh
Hi All, can you please help how to cop artifacts on master server without using cp orscp command on master Jenkins server? -- 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

Re: Jenkins pipeline : GitHub PR and Multibranch

2022-07-27 Thread Fahad Ijaz
try this link for more understanding.GitHub On Tue, Jul 26, 2022 at 11:51 AM Balaji Lalapeta wrote: > Please go through the below url# > https://www.youtube.com/watch?v=fo36b23cpIU > > On Tue, Jul

Re: Jenkins pipeline : GitHub PR and Multibranch

2022-07-26 Thread Balaji Lalapeta
Please go through the below url# https://www.youtube.com/watch?v=fo36b23cpIU On Tue, Jul 26, 2022 at 12:04 PM Albert Shamsiyan < albert.shamsi...@gmail.com> wrote: > Hi > > Trying to implement a hook between GitHub and Jenkinsfile which shall be > executed once created PR and will be a condition

Jenkins pipeline : GitHub PR and Multibranch

2022-07-26 Thread Albert Shamsiyan
Hi Trying to implement a hook between GitHub and Jenkinsfile which shall be executed once created PR and will be a condition to it's approval. >From what I've seen so far, I need to use gitHubPullRequestDiscovery. Yet, cant find a solid example. Any information will be acceptable ( using

Re: How to create web service health check using jenkins pipeline?

2022-03-31 Thread misteek
-and-mattermost-notification/ Thanks Misteek On Thursday, 31 March 2022 at 17:52:04 UTC+2 Mark Waite wrote: > On Thursday, March 31, 2022 at 9:37:40 AM UTC-6 misteek wrote: > >> Hi all, >> >> New to jenkinsfile/groovy world. >> >> Can someone please let me know how

Re: How to create web service health check using jenkins pipeline?

2022-03-31 Thread Mark Waite
On Thursday, March 31, 2022 at 9:37:40 AM UTC-6 misteek wrote: > Hi all, > > New to jenkinsfile/groovy world. > > Can someone please let me know how to create a jenkins pipeline health > check to check if multiple websites are running. > > If any of the sites are do

How to create web service health check using jenkins pipeline?

2022-03-31 Thread fedora_user
Hi all, New to jenkinsfile/groovy world. Can someone please let me know how to create a jenkins pipeline health check to check if multiple websites are running. If any of the sites are down or http response code is not 200 an email notification should be sent. For every website

Re: Deploy an artifact into a custom directory in jenkins pipeline job

2021-11-04 Thread Adharsha sri
mcity we mention like > Source => target > > > In the same way, how to mention it in jenkins pipeline job. Please help. > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and sto

Deploy an artifact into a custom directory in jenkins pipeline job

2021-11-02 Thread Adharsha sri
Hi Team, We want to deploy the artifacts in the custom directory. For freestyle job we are using Artifact Deployer plugin. But for pipeline job how to mention it . In teamcity we mention like Source => target In the same way, how to mention it in jenkins pipeline job. Please help. --

Need to adjust Jenkins pipeline logs using Groovy syntax at each stage

2021-11-01 Thread anilkumar panditi
Hi, I am working on below to suppress Jenkins pipeline logs using Groovy syntax at each stage, like for Initialization or Build stage we need to log only "ERROR" level. and for Deployment Stage we need to log DEBUG level logs.. And don't want to print each and every message in cons

Jenkins pipeline build not happening automatically upon code push to GitHub

2021-09-13 Thread 'Venkat' via Jenkins Users
Hi Team, Recently we have migrated from Bit bucket to Github and I am trying to update the existing Jenkins pipeline bitbucket web-book with the Github webhook and when we are trying to push the code pipeline build is not working.(Automatic trigger is not happening) When I try to trigger

Re: passing variable to bash script in a jenkins pipeline job

2021-09-01 Thread lawrence wang
20年3月12日星期四 UTC-7 上午7:11:04 写道: > There is an extra space between your (.) and your opt/setup.sh. > > If the variabel come from Jenkins pipeline script, you need double quote > (“) to get evaluate, single quote (‘) won’t. You should also pass the value > as a string and escape it for your argumen

Ansible ad-hoc inventory not working when executed in a shell command in a Jenkins pipeline?

2021-08-12 Thread zil...@gmail.com
Since my ansible-playbook command works in several places, I don't think this is an Ansible issue, so I posted here,. Please see my Stackoverflow question. https://stackoverflow.com/questions/68751100/ansible-ad-hoc-inventory-not-working-when-executed-in-a-shell-command-in-a-jenki Thanks,

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-15 Thread jesus fernandez
Yes I will do so El miércoles, 14 de abril de 2021 a las 21:00:34 UTC+2, ullrich...@gmail.com escribió: > Can you please file a bug report for the warnings plugin, it seems > something broken in my build... > > Am 14.04.2021 um 18:55 schrieb jesus fernandez : > > yes all the other plugins I

Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-15 Thread jesus fernandez
Thanks it is working now, I am also wondering what is the tool-id when trying to access the details of the analysis result, explained here https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md#summary-of-the-analysis-result I cannot find other reference to what tool

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-14 Thread Ullrich Hafner
Can you please file a bug report for the warnings plugin, it seems something broken in my build... > Am 14.04.2021 um 18:55 schrieb jesus fernandez : > > yes all the other plugins I have checked so far have a woeking javadoc > > El mié., 14 abr. 2021 18:20, Ullrich Hafner

Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-14 Thread Ullrich Hafner
You must wrap it into tm: see https://github.com/jenkinsci/warnings-ng-plugin/blob/master/ui-tests/src/test/java/io/jenkins/plugins/analysis/warnings/SmokeTests.java#L99 > Am 13.04.2021 um 16:17 schrieb jesus fernandez : > > How can I access those token macros? (sorry if this is a silly

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-14 Thread jesus fernandez
yes all the other plugins I have checked so far have a woeking javadoc El mié., 14 abr. 2021 18:20, Ullrich Hafner escribió: > I publish one, but never looked at the results. Does that work for other > plugins? > > Am 13.04.2021 um 13:32 schrieb jesus fernandez < >

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-14 Thread Ullrich Hafner
I publish one, but never looked at the results. Does that work for other plugins? > Am 13.04.2021 um 13:32 schrieb jesus fernandez : > > is there a javadoc for warnings-ng plugin? or just the github? I get a 404 > when accesing the warnings-ng javadoc > > El lunes, 12 de abril de 2021 a las

Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-13 Thread jesus fernandez
How can I access those token macros? (sorry if this is a silly question) I have never used them before, I tried to print the value with ```println ${ANALYSIS_ISSUES_COUNT, tool="cppcheck", type="NEW"}``` but I get an unexpected token error El viernes, 9 de abril de 2021 a las 14:03:39 UTC+2,

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-13 Thread jesus fernandez
is there a javadoc for warnings-ng plugin? or just the github? I get a 404 when accesing the warnings-ng javadoc El lunes, 12 de abril de 2021 a las 14:28:33 UTC+2, ullrich...@gmail.com escribió: > In the source code in GitHub? > > You can also look for methods annotated with ExportedBean. > >

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-12 Thread Ullrich Hafner
In the source code in GitHub? You can also look for methods annotated with ExportedBean. > Am 12.04.2021 um 10:16 schrieb jesus fernandez : > > > where can I see that? in the javadoc I do not see any method with that > annotation, thoug I could use the getResults() with no problems > El

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-12 Thread jesus fernandez
where can I see that? in the javadoc I do not see any method with that annotation, thoug I could use the getResults() with no problems El domingo, 11 de abril de 2021 a las 21:43:06 UTC+2, ullrich...@gmail.com escribió: > Due to security considerations only methods marked with @Whitelisted are

Re: how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-11 Thread Ullrich Hafner
Due to security considerations only methods marked with @Whitelisted are accessible in Groovy scripts. Does your getter have such an annotation? > Am 11.04.2021 um 19:02 schrieb jesus fernandez : > > I am a junior dev trying to lear about Jenkins, I have been learning on my > own for a couple

how to access all classes and methods of a plugin in jenkins pipeline?

2021-04-11 Thread jesus fernandez
I am a junior dev trying to lear about Jenkins, I have been learning on my own for a couple of months. Currently I have a pipeline (just for learning purposes) which runs static analysis on a folder, and then publish it, I have been able to send a report through email using jelly templates,

Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread Ullrich Hafner
https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md#token-macro-support > Am 09.04.2021 um 13:59 schrieb jesus fernandez : > > Thanks for replying, any documentation or link to guide me in the right > direction on how to do it? I am quite Junior and have been

Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread jesus fernandez
Thanks for replying, any documentation or link to guide me in the right direction on how to do it? I am quite Junior and have been learning Jenkins on my own El viernes, 9 de abril de 2021 a las 13:46:48 UTC+2, ullrich...@gmail.com escribió: > Exporting results from one plugin into another

Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread Ullrich Hafner
Exporting results from one plugin into another plugin is definitely possible. You typically have two steps: 1) Export the data from a producer plugin a) using Tokens b) using API methods of the plugin 2) Import the data (or reformat and aggregate it) into a consumer plugin For step 1 I can say

Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread jesus fernandez
I just started using cppcheck, and I was wondering if there is any way to access to the report values (for instance number of total errors) and send it to slack. I have been searching in the documentation and here in SO but I have found nothing, as I just have been using Jenkins for a couple of

Re: I cannot run Azure CLI commands from jenkins pipeline

2021-04-08 Thread jesus fernandez
schrieb am Dienstag, 6. April 2021 um 13:21:16 >> UTC+2: >> >>> I am trying to run some az commands from a Jenkins pipeline which >>> (running in Windows 10) I already used in my laptop´s Jenkins, but when >>> trying to use it on another computer (also run

Re: I cannot run Azure CLI commands from jenkins pipeline

2021-04-07 Thread jesus fernandez
rn...@gmail.com schrieb am Dienstag, 6. April 2021 um 13:21:16 > UTC+2: > >> I am trying to run some az commands from a Jenkins pipeline which >> (running in Windows 10) I already used in my laptop´s Jenkins, but when >> trying to use it on another computer (also runni

Re: I cannot run Azure CLI commands from jenkins pipeline

2021-04-06 Thread 'Martin Schmude' via Jenkins Users
susfern...@gmail.com schrieb am Dienstag, 6. April 2021 um 13:21:16 UTC+2: > I am trying to run some az commands from a Jenkins pipeline which (running > in Windows 10) I already used in my laptop´s Jenkins, but when trying to > use it on another computer (also running w10) I get t

I cannot run Azure CLI commands from jenkins pipeline

2021-04-06 Thread jesus fernandez
I am trying to run some az commands from a Jenkins pipeline which (running in Windows 10) I already used in my laptop´s Jenkins, but when trying to use it on another computer (also running w10) I get this error : ``` 11:12:47 powershell.exe : az : The term 'az' is not recognized as the name

Deploying Serverless with AWS SAM and Jenkins pipeline

2021-02-25 Thread Victor Lesau
Hi Everyone! We recently posted a tutorial <https://aws.amazon.com/blogs/compute/building-a-jenkins-pipeline-with-aws-sam/> on building a Jenkins pipeline to deploy Serverless applications via SAM CLI on AWS. I'd love to hear your feedback. Is this useful for the community? Do yo

Re: run jenkins pipeline fails "docker": error=2, No such file or directory

2021-01-28 Thread Mark Waite
; >> >> On Monday, 27 November 2017 at 01:21:50 UTC+5:30 lynn.x...@gmail.com >> wrote: >> >>> >>> Oleg Nenashev 于2017年11月26日 周日上午8:55写道: >>> >>>> Hi, >>>> >>>> Docker CLI tool needs to be installed on the machine

Re: run jenkins pipeline fails "docker": error=2, No such file or directory

2021-01-28 Thread Ivan Fernandez Calvo
ker tool installation to be used. >>> See the withTool() documentation if you need to specify a tool path: >>> https://github.com/jenkinsci/docker-workflow-plugin/blob/f32bca9148471ff7381f5404a747b0151305996e/src/main/resources/org/jenkinsci/plugins/docker/work

Re: run jenkins pipeline fails "docker": error=2, No such file or directory

2021-01-28 Thread anilkumar panditi
ee from the log that Docker pull already succeeded so > curious why Docker inspect fails > >> >> Best regards, >> Oleg Nenashev >> >> >> пятница, 24 ноября 2017 г., 11:27:02 UTC+3 пользователь Lynn Lin написал: >> >>> hi >>> >&g

Re: how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread jfern...@forgottenempires.net
> > HTH Reinhold > > > > > > *From:* jenkins...@googlegroups.com *On > Behalf Of *jfern...@forgottenempires.net > *Sent:* Mittwoch, 13. Jänner 2021 10:22 > *To:* Jenkins Users > *Subject:* how to avoid cps error using XmlSlurper() method in jenkins > pi

RE: how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread Reinhold Füreder
: Mittwoch, 13. Jänner 2021 10:22 To: Jenkins Users Subject: how to avoid cps error using XmlSlurper() method in jenkins pipeline I am using a simple test pipeline to get a username out of a xml file, I have written a simple function using the XmlSlurper method and I have included the @NonCPS

how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread jfern...@forgottenempires.net
I am using a simple test pipeline to get a username out of a xml file, I have written a simple function using the XmlSlurper method and I have included the @NonCPS annotation at the beginning of the function but I keep getting an error, even though the function seems to work as it prints out

Nvm in Jenkins pipeline

2020-12-21 Thread Manoj Chander
Hi I have installed nvm and have nvm.sh under /home/Jenkins/.nvm. Have configured NVM_DIR to Jenkins bashrc How to use nvm to use specific version npm in my pipeline. Stages { Stage { Sh """ Source~/.nvm /home/Jenkins/. nvm/nvm.sh use 12.16.3 """ } } Is not working . Regards , manoj -- You

Using Thread pool in Jenkins pipeline

2020-12-17 Thread ramesh pasham
Anyone tried the ThreadPool in jenkins pipeline? it is not executing as expected ? Please advise. import java.util.concurrent.* class MyRunnable implements Runnable{ Integer l MyRunnable(Integer l){ this.l = l } void run(){ try{ print l } catch(Exception e

Jenkins Pipeline - wait for non-job items (ComputedFolder, Multibranch Pipeline Project)

2020-12-08 Thread Amedee Van Gasse
I'm using multibranch pipelines projects in Jenkins. I let Jenkins index new branches. I need Jenkins to wait until indexing of a multibranch pipeline project is complete. This is my current code: def triggerScanMultibranchPipeline(projectDir, repo) { def multibranchProject =

Re: Jenkins pipeline hangs when pod deleted

2020-11-19 Thread Miquel Catany
``` def worker_pipeline(){ try{ node("") { stage('Checkout SCM'){ git branch: '', credentialsId: 'xxx', url: 'https://github.com/x/.git' } container(''){ stage('Run Builds'){ "base_image": { sh 'gcloud

Re: Jenkins pipeline hangs when pod deleted

2020-11-19 Thread Miquel Catany
Cannot contact ci-worker-dind-jsvbh: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@13b5e548:JNLP4-connect connection from 10.251.13.10/10.251.13.10:48846": Remote call on JNLP4-connect connection from 10.251.13.10/10.251.13.10:48846 failed. The channel is closing

Jenkins pipeline hangs when pod deleted

2020-11-18 Thread Miquel Catany
Hi, We are using GCP preemtible instances to deploy pod agents with Kubernetes Plugin. We want to be able to retry the pipeline if the node/pod is evicted, but our main problem is that when the pipeline is executing sh commands and the node/pod is evicted/deleted, the pipeline instead of

Re: how to get the last commiter in jenkins pipeline

2020-11-17 Thread JonathanRRogers
Have you tried using the Email Extension plugin? AFAICT, it should get committers from whatever SCM you use. https://plugins.jenkins.io/email-ext/ On Monday, November 16, 2020 at 11:52:03 AM UTC-5 jesusfern...@gmail.com wrote: > I have a Jenkins pipeline setup that it works with Perfo

Re: [EXTERNAL] - I get an error when trying to iterate a xml file in jenkins pipeline

2020-11-17 Thread 'Dirk Heinrichs' via Jenkins Users
Am Dienstag, den 17.11.2020, 03:42 -0800 schrieb jesus fernandez: > parseTest(xml) That should be parseText(), I guess. HTH... Dirk -- Dirk HeinrichsSenior Systems Engineer, Delivery PipelineOpenText ™ Discovery | RecommindPhone: +49 2226 15966 18Email: dheinric@opentext.comWebsite:

I get an error when trying to iterate a xml file in jenkins pipeline

2020-11-17 Thread jesus fernandez
I am trying to understand how to iterate a .xml file in Jenkins so I create a super simple .xml file: ``` hello bye ``` I just want to get acces to a tag value (i.e. tag3) and print it out. I have been reading a lot here on SO and I this is the cod I have: ``` import groovy.xml.*

how to get the last commiter in jenkins pipeline

2020-11-16 Thread jesus fernandez
I have a Jenkins pipeline setup that it works with Perforce as SCM I have been trying to find if it is possible to send a slack message(it is already connected to slack to send msgs to a channel on each build) / email to the person who commited in case the build fails, I have found information

Re: Cascaded choice parameters and parameter validations in Jenkins pipeline

2020-09-30 Thread Ven H
Can anyone please help with this? Regards, Venkatesh On Sun, Sep 27, 2020 at 11:51 PM Ven H wrote: > Hi, > > I have a Jenkins pipeline job. I need to define parameters with the > following requirements. > > 1. I have choice parameters which need to be populated from method

Cascaded choice parameters and parameter validations in Jenkins pipeline

2020-09-27 Thread Ven H
Hi, I have a Jenkins pipeline job. I need to define parameters with the following requirements. 1. I have choice parameters which need to be populated from method calls. 2. Some choice parameters need to be populated from method calls, but based on the selection of some other choice parameters

Re: Why Jenkins pipeline always being executed in second directory?

2020-09-18 Thread Jan Monterrubio
Check what is In those contents. There are @lib and @tmp folders that also get created for checked out libraries. On Fri, Sep 18, 2020 at 23:35 Gajanan Mahajan wrote: > I've a Jenkins pipeline with name say `TestPipeline` when build is > triggered workspace with name `TestPipeline@2` is c

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

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

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 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 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

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

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,

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

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: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread Jeremy Mordkoff
gust 21, 2020 1:54 PM To: jenkinsci-users@googlegroups.com Subject: Re: Ignore Post Build Job failure in Jenkins Pipeline Thanks a lot once again, Jeremy. Just curious. Are there any major functional differences between Declarative and Scripted? I thought there are only minor differences. So,

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread Ven H
l in a try/catch. >>> Or you could save currentBuild.result before calling job B and restore it >>> after >>> >>> >>> >>> On Friday, August 21, 2020 at 5:09:57 AM UTC-4 venh...@gmail.com wrote: >>> >>>> Hi, >>>> >>

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread jeremy mordkoff
job B and restore it >> after >> >> >> >> On Friday, August 21, 2020 at 5:09:57 AM UTC-4 venh...@gmail.com wrote: >> >>> Hi, >>> >>> I have a JobA defined in Jenkins Pipeline. When JobA builds >>> successfully, I trigger

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread Ven H
> Hi, >> >> I have a JobA defined in Jenkins Pipeline. When JobA builds successfully, >> I trigger JobB from the Post step. But, if JobB fails in some step, it >> marks JobA also as Failed. >> >> Is there a way (some setting or option) to ignore the fail

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread jeremy mordkoff
...@gmail.com wrote: > Hi, > > I have a JobA defined in Jenkins Pipeline. When JobA builds successfully, > I trigger JobB from the Post step. But, if JobB fails in some step, it > marks JobA also as Failed. > > Is there a way (some setting or option) to ignore t

Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread Ven H
Hi, I have a JobA defined in Jenkins Pipeline. When JobA builds successfully, I trigger JobB from the Post step. But, if JobB fails in some step, it marks JobA also as Failed. Is there a way (some setting or option) to ignore the failure in JobB so that it doesn't fail JobA (since it built

Why does Jenkins pipeline allows duplicate parameters?

2020-08-14 Thread Gajanan Mahajan
In Jenkins pipeline, one can create parameter with same name twice or more(also with same type). Let's say I've a String Parameter with name `Branch` and again I can create String Parameter with same name i.e. `Branch`. It is duplicated still I can save the pipeline. If you access

Running parallel kubernetes jobs in Jenkins pipeline

2020-08-03 Thread Alex Taran
I'm running *perfomance tests* on Jenkins. Test that may *include multiple instances of the same container* to generate necessary load. I can't hardcode number of instances as it varies based on params for tests. I've tried to use the following code: pipeline { agent any stages {

Re: How to identify exactly where exception occurred in Jenkins pipeline?

2020-08-02 Thread Ramanathan Muthaiah
> > But with Jenkins build output console, it does not show the line number > where the exception has occurred. > > In this case, based on method name ie `trim()` from log, I check wherever > `trim()` method is used. But as I've used it at multiple places in same > method, it becomes difficult

How to identify exactly where exception occurred in Jenkins pipeline?

2020-07-30 Thread Gajanan Mahajan
In Jenkins pipeline build, sometimes I've seen null pointer or other exceptions like - java.lang.NullPointerException: Cannot invoke method trim() on null object Generally if we run Java program through IDE or command line, if an exception occurs we see at which line number the exception

Re: How to edit xml files through Jenkins pipeline?

2020-06-23 Thread Ivan Fernandez Calvo
Hi, I'd not recommend processing the XML file inside the Jenkinsfile, all the Groovy code you put in a Jenkins file consumes resources in the Jenkins instance (not in the Agent) and process an XML file can be a heavy process. I recommend you call a command-line tool or a Python script to

Re: How to edit xml files through Jenkins pipeline?

2020-06-22 Thread Jan Monterrubio
Since a pipeline can support groovy, you can try some of the groovy classes: https://groovy-lang.org/processing-xml.html On Mon, Jun 22, 2020 at 23:10 Gajanan Mahajan wrote: > I've to update xml file as a part of pipeline. From following, I've to > replace `value` from `true` to false > >

How to edit xml files through Jenkins pipeline?

2020-06-22 Thread Gajanan Mahajan
I've to update xml file as a part of pipeline. From following, I've to replace `value` from `true` to false Also, following commented code, I've to uncomment - Both of above snippets can be anywhere in xml file. `sed` utility won't help much here. Could you please suggest

Re: Jenkins pipeline Dependency-Check Plugin v5 migration

2020-06-22 Thread Adam Horn
Did you figure out how to do this? I just updated to v5 and am running into the same issues. On Tuesday, August 6, 2019 at 8:01:48 AM UTC-7, ya wrote: > > Hi all. > We use jenkins pipelines and want start migrate to new version of OWASP > Dependency-Check plugin, but can't understand new

load Jenkins pipeline shared library failed

2020-05-29 Thread james
Hi, Can anyone please help me? I have a pipeline shared library in Groovy. When I tried to load and run it in Jenkins multibranch pipeline, then I got below error. Here are installed plugins. Pipeline: Groovy 2.80 Pipeline: Groovy HTTP 0.2.1 Pipeline: Shared Groovy Libraries 2.16

Re: Jenkins Pipeline Error

2020-05-08 Thread Gajanan Mahajan
when directive is to execute if stage should be executed or not. You might have when directive at wrong place. Please refer to document for more details - -https://www.jenkins.io/doc/book/pipeline/syntax/#when On Fri, May 8, 2020 at 5:40 PM MANISH JOSHI wrote: > Please help out > >

Jenkins Pipeline Error

2020-05-08 Thread MANISH JOSHI
Please help out java.lang.NoSuchMethodError: No such DSL method 'when' found among steps [archive, bat, build, catchError, checkout, deleteDir, dir, dockerFingerprintFrom, dockerFingerprintRun, echo, emailext, emailextrecipients, envVarsForTool, error, fileExists, findBuildScans,

Jenkins Pipeline: If job fails it will run again on next poll.

2020-05-08 Thread Sahil Arora
Team, I have a pipeline job where my Jenkinsfile is on SCM. I have enabled poll SCM on jenkins, but i'm facing issue that if no change done at git still my job triggering. It is happen in case my prious build is in failed state. When a job detected by polling fails, it will run again the next

Jenkins pipeline does not proceed even if Selenium execution finishes

2020-04-21 Thread Gajanan Mahajan
I have a pipeline with stage for Selenium execution where execution of Selenium tests takes around 5 hours. In 'Selenium Execution' stage, I've code to execute Selenium tests then taking backup of results. Here pipeline executes on say `ABC` machine and Selenium stage execution on say `XYZ`

How to analyze a Jenkins Pipeline code with "method code too large" problem

2020-04-09 Thread Liejun Tao
Hi, I see there are many discussions about the pipeline code hit the "method code too large" error. While the simple answer about how to resolve the problem is to "make the pipeline simple", I'm wondering if there is a way to analyze the code to get an understanding what kind of

Jenkins pipeline stuck for some of stages which run in parallel

2020-04-08 Thread Gajanan Mahajan
I have a Jenkins pipeline where around 25 stages run in parallel on different nodes. But when those run in parallel and suppose a stage has 10 statements to execute, then I can see only 5(or any number less than 10) statements are executed for some of the stages and stage icon show spinner

Re: How to check inside Jenkins pipeline script if Ansible play-book succeeded or failed.

2020-04-02 Thread Yeikel
ex() > >currentBuild.result = 'ABORTED' > >return} > > stage('stg_2'){} > > > On Wednesday, 1 April 2020 07:02:53 UTC+2, Shifa Shaikh wrote: >> >> Below is my Jenkins pipeline script. I wish to call ex("ansible-failed") >> function whenever

Re: How to check inside Jenkins pipeline script if Ansible play-book succeeded or failed.

2020-04-02 Thread kalkin powale
etVal". then in between two-stages execute following command stage('stg_1'){} if( retVal == 'Fail') { ex() currentBuild.result = 'ABORTED' return} stage('stg_2'){} On Wednesday, 1 April 2020 07:02:53 UTC+2, Shifa Shaikh wrote: > > Below is my Jenkins pipeline script. I wish to call ex

How to check inside Jenkins pipeline script if Ansible play-book succeeded or failed.

2020-03-31 Thread Shifa Shaikh
Below is my Jenkins pipeline script. I wish to call ex("ansible-failed") function whenever the ansible-playbook test.yml fails and thereby abort the pipeline. Below is my pipeline script. def ex(param) {echo "ABORT due to:" + param} pipe

Re: Re: Jenkins pipeline Testing

2020-03-24 Thread Jan Monterrubio
*To: *jenkinsci-users@googlegroups.com > *Subject: *Re: Jenkins pipeline Testing > > > > We unit test our pipelines with : > > > > https://github.com/jenkinsci/JenkinsPipelineUnit > > > > We have some integration tests for them that require the Jenkins Test Rul

RE: Re: Jenkins pipeline Testing

2020-03-24 Thread Jheison Rodriguez
Thanks for your response, Do you have any repo where I can find more examples?. Do you know if it’s possible to test declarative pipelines Best regardsJheison Rodriguez From: Jan MonterrubioSent: Tuesday, March 24, 2020 6:53 PMTo: jenkinsci-users@googlegroups.comSubject: Re: Jenkins pipeline

Re: Jenkins pipeline Testing

2020-03-24 Thread Jan Monterrubio
We unit test our pipelines with : https://github.com/jenkinsci/JenkinsPipelineUnit We have some integration tests for them that require the Jenkins Test Rule and a docker agent that we configure as an external resource (junit4) Overall the pipeline unit is super nice! We also use the Jenkins

  1   2   3   4   5   6   >