Re: Jenkins - Mutlibranch pipeline

2022-04-15 Thread Jeremy Mordkoff
If you use the GUI, the scan interval for new branches is under Scan Multibranch Pipeline Triggers and the orphan item setting is right after it. On Thursday, April 14, 2022 at 5:02:50 PM UTC-4 nhoj.p...@gmail.com wrote: > So I've changed mine to 7 days, which I've done using the groovy script

nested each

2022-02-04 Thread Jeremy Mordkoff
println("ignoring release change") } else { print("ignoring supermod change: ${pth}") } } } } } print("no interesting commits found.") return false } Jeremy Mordkoff Director, Engine

customizing poll SCM

2022-01-08 Thread Jeremy Mordkoff
We use git and submodules. I only want certain builds to kick off if there are commits in certain submodules. I have this as part of the pipeline now, but this means my build history is filling up with jobs that did nothing except figure out that they didn't need to run and that's pushing the

Re: java.io.IOException: Could not copy remoting.jar into ‘/export/build’ on agent

2021-12-23 Thread Jeremy Mordkoff
what are the perms on /export/build and /export/build/remoting.jar? One of them is not writable by user jenkins On Thursday, December 23, 2021 at 3:28:15 AM UTC-5 Harri wrote: > Hi folks, > > using Jenkins 2.326 (the Debian package) the agent cannot be redeployed. It > fails with > >

Re: Jenkins jobs not completing

2021-12-22 Thread Jeremy Mordkoff
I'm assuming then that there's no network activity at the end of the 30 minute window. What is the master doing? Perhaps cleaning up old builds? How many do you keep? FYI...I normally keep about 100 per pipeline & branch. Jeremy Mordkoff Director, Engineering Services [cid:d4bea858-87ac-

Re: Jenkins jobs not completing

2021-12-21 Thread Jeremy Mordkoff
30 minutes sounds like a TCP timeout. Are there any firewalls or NAT devices in the path? Sometimes they close the connection when the first FIN is sent but before the last FIN-ACK and that can cause SSH to hang up. A second possibility is asymetric routes where the replies come in on a

Layered builds

2021-12-17 Thread Jeremy Mordkoff
We are migrating from a single build pipeline to a pair of pipelines. The first will build our "platform" and then the second will build the application. This is because we will soon have multiple applications using the same platform. The applications should build if the platform changes OR

Re: Exclude Paths from Triggering Builds

2021-02-12 Thread Jeremy Mordkoff
Also interested in the answer. At the moment we scan the change log from the scm object and abort the pipeline (cleanly) if there is nothing of interest to that pipeline to build. I do not like this solution for multiple reasons. Our plan is to split our code into 3 repos .. one for each app

Permissions to see pipeline syntax

2021-02-09 Thread Jeremy Mordkoff
What permission(s) do I need to grant to a new user in order for them to see the pipeline syntax option? I am a full admin and I see it. They are authenticated but they only have rights to start and stop jobs right now. I created a job for them that invokes a JenkinsFile and they are busy

Re: loop over branches

2020-12-05 Thread Jeremy Mordkoff
gt; > Le mar. 1 déc. 2020 à 22:11, jeremy mordkoff a > écrit : > >> We have too many tests, so we have broken them up into three groups. One >> group that runs after each checkin and one group that runs once a day on >> any branch with changes and one group that I wo

loop over branches

2020-12-01 Thread jeremy mordkoff
We have too many tests, so we have broken them up into three groups. One group that runs after each checkin and one group that runs once a day on any branch with changes and one group that I would like to limit to one instance at a time but still test any active branch. What is the best way

Re: Can HTML submit button trigger a Jenkins job ?

2020-11-02 Thread jeremy mordkoff
simple answer is no. an href cannot include a headers directive or anything else) It can be done using ajax -- https://stackoverflow.com/questions/374885/can-i-change-the-headers-of-the-http-request-sent-by-the-browser or you could build a proxy that did nothing but add that header. But if

Re: Jenkins UI labels survey

2020-10-29 Thread jeremy mordkoff
Hi Joe, Missing an option...I use the UI a lot but not exclusively. On Thursday, October 29, 2020 at 10:11:55 AM UTC-4 Joseph Brueggen wrote: > Hello everyone, > > My name is Joe—I'm a designer at CloudBees. I'm gathering some feedback > about the Jenkins user interface. > > This new survey

Re: variable within a variable

2020-10-26 Thread jeremy mordkoff
okay, take this with a grain of salt because this is purely a guess The ssh call is trying to serialize all of the local variables, but it can't serialize the simpleTemplate. So move all the code that touches simpletemplate into a function that's wrapped with the @NONCPS decorator. something

Re: variable within a variable

2020-10-26 Thread jeremy mordkoff
I think it is failing on this line: echo("MAL is ${MAL}") On Monday, October 26, 2020 at 11:51:19 AM UTC-4 cw wrote: > Also I'm confused why I'm getting a NotSerializableException related to > SimpleTemplateEngine$SimpleTemplate when I'm in a try/except block which is > running an

Re: variable within a variable

2020-10-26 Thread jeremy mordkoff
Are you running this in the main thread of the enkinsFile itself or in a function? I suspect that you are in a function and you may need to use the @NONCPS decorator On Friday, October 23, 2020 at 4:31:55 PM UTC-4 cw wrote: > That's great, thank you very much. I was able to take your code,

Re: variable within a variable

2020-10-23 Thread jeremy mordkoff
I stumbled on https://stackoverflow.com/questions/55423036/groovy-string-interpolation-when-string-is-defined-before-the-interpolated-varia and I found this snippet worked just fine after I approved the signature in jenkins import groovy.text.SimpleTemplateEngine node("docker") {

Re: variable within a variable

2020-10-23 Thread jeremy mordkoff
I think you need to do an "eval" or the equivalent to filepath in order to expand the inner variable. I believe the ssh command is executing "ls /srv/jboss/server/${MAL}/log/" but MAL on the far end is empty. So you need to complete the expansion before calling ssh. This might get you on the

Re: master to agent connection keeps breaking every 3-4 hours

2020-09-29 Thread jeremy mordkoff
We have a similar issue that only seems to occur during long running jobs (over 5 hours). The traceback is different but we also see the EOF exception. My client is Ubuntu linux I tried to trace the issue by running tcpdumps at both ends on the ssh session from the master to the slave but I

Re: Suppressing certain builds

2020-09-17 Thread jeremy mordkoff
node { stage("checkout") { checkout scm result = sh (script: "git log -1 | grep bump", returnStatus: true) if (result == 0) { println("CI bump commit...skipping build") currentBuild.result = 'NOT_BUILT' # can I just return here ? exit 0? } } stage("build") {

Suppressing certain builds

2020-09-17 Thread jeremy mordkoff
I use scripted pipelines I would like certain builds to abort early. (1) if it is just a branch creation event, (2) if the commit message is "bump" and (3) if the only change was in certain submodules. I think I know all the pieces to make this work -- I can write a tool that could determine

Re: how to build on branch creation but not build on other scm event/commit?

2020-09-17 Thread jeremy mordkoff
You could leave the Automatic triggering suppressed and write a tool to scan your GIT repo looking for new branches and trigger the build via an API call when a new branch is found. Sounds like you might need such a tool anyway so that developers could schedule builds. On Thursday, September

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread Jeremy Mordkoff
if you don't wait, then propagate is meaningless .. it can't be done. I find scripted is more flexible, but any time a system gives you more rope, you have to be careful not to hang yourself. --- Jeremy Mordkoff Director of Engineering Services [cid:b0edc09c-0e90-4f2f-a1f2-715660acd801]<ht

Re: Jenkins Integration with LDAP - Testing Connection Fails

2020-08-21 Thread jeremy mordkoff
sounds like the user is valid but not a member of any groups. Is that possible? On Thursday, August 20, 2020 at 1:28:21 PM UTC-4 Mk wrote: > Hi Team, > > I am trying to configure LDAP(AD) Authentication in our Jenkins, Below is > my configuration settings, But test LDAP connection is

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread jeremy mordkoff
But if JobB fails, it marks JobA also as failed even though JobA ran > successfully. I want JobA to trigger JobB on Post success condition and > then not fail JobA, if JobB fails, preferably without try/catch blocks. > > Regards, > Venkatesh > > > On Fri, Aug 21, 2020 at 9:31

occasional exception from junit call

2020-08-21 Thread jeremy mordkoff
I use scripted pipelines with a library. The master and the slaves are running in ubuntu 16.04 docker containers. About a week ago we started getting occasional failures from this call: junit testResults: ".build/ub18_debug/artifacts/systemtest/*xml" There are about 60 junit xml files in

Re: Ignore Post Build Job failure in Jenkins Pipeline

2020-08-21 Thread jeremy mordkoff
Are you using scripted or declarative? I will assume scripted since that's all I know :) There's a don't wait option. Or you could wrap the call 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

Re: Piple line for multiple projects sharing the same SVN repository

2020-08-19 Thread jeremy mordkoff
. But the expansion in a script. Like I said, the build doesn't have to use the workspace created by jenkins. On Wednesday, August 19, 2020 at 6:47:23 PM UTC-4 Anton Shepelev wrote: > jeremy mordkoff: > > > I'm having a little trouble understanding exactly what you > > are aski

Re: Piple line for multiple projects sharing the same SVN repository

2020-08-17 Thread jeremy mordkoff
I'm having a little trouble understanding exactly what you are asking. I think you are asking if it is possible to trigger multiple builds in a single workspace. If you use a single pipeline, this is trivial. So perhaps you should consider writing a single pipeline that iterates over all

Re: Pipeline design question

2020-08-14 Thread jeremy mordkoff
How do you maintain and verify backwards compatibility with older releases if you keep your devops code in a separate repo? I keep my devops code in the same repo as the product code so that I know I can always go back and rebuild an older release and get exactly the same results. The only

Re: Pipeline design question

2020-08-11 Thread jeremy mordkoff
I try to make the calls in my top level jenkinsfile atomic and complete, i.e. each one performs a single function. By using long, descriptive names I can avoid the need for lots of comments. It also makes building new pipelines easy and encourages reuse across files, stages and steps. If I see

Re: Separation of JUnit results by TestSuite

2020-08-06 Thread jeremy mordkoff
yes, exactly. I post process mine to remove the hostname from the class because my tooling generates the class based on the path. On Thursday, August 6, 2020 at 9:27:32 AM UTC-4, christop...@googlemail.com wrote: > > You mean postprocessing the result files to fake different class names to >

Re: Separation of JUnit results by TestSuite

2020-08-05 Thread jeremy mordkoff
I believe this construct in the junit xml files can be safely modified to force jenkins to see the test results as two separate tests > Hi, > > I found a strange phenomenon in test result display of jenkins. I had two > tests with very instable test results, good, bad, bad, good, good, good

Re: Help required: jenkins SSH connectivity issue

2020-08-04 Thread jeremy mordkoff
4321.key > crt filename is test2-harbor54321.crt > core: test2-harbor.tank.local > notary: test2-harbor.tank.local > secretName: test2-harbor54321 > values.yaml is updated > secret/test2-harbor54321 created > > NAME: harbor > LAST DEPLOYED: Tue Aug 4 14:58:39 2020 > NAMESPACE:

Re: Help required: jenkins SSH connectivity issue

2020-08-03 Thread jeremy mordkoff
nkins console i am still getting cant connect to the server : >> >> [image: image.png] >> >> >> [image: image.png] >> >> and still from my local system to host i cant ssh directly: >> >> sakshi_rathore@MCN234 MINGW64 ~/.ssh (master) >> $ ss

Re: How to throw an error if a parameter is empty?

2020-07-31 Thread jeremy mordkoff
@Haibinh is that a bash answer? @chencho -- are you looking for a solution in bash, or groovy? Declarative or scripted? On Friday, July 31, 2020 at 9:16:52 AM UTC-4, Haibinh Nguyen wrote: > > Hi, > How about this: > > env.FIELD1 = params.FIELD1 > switch(FIELD1) { > case "ABCD": >

Re: Help required: jenkins SSH connectivity issue

2020-07-31 Thread jeremy mordkoff
rver >>> i also tried simple ssh to the server in build step but it is not >>> working. Please advise where I am wrong. >>> >>> On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore >>> wrote: >>> >> I tried a lot of things but my ssh connection is n

Re: Need help - build "Execute Shell"

2020-07-29 Thread jeremy mordkoff
Normally a SSH keypair is created on the client (in your case the jenkins server) and then the public key is copied to the server. This is more secure because the private key is created on the client and is never copied anywhere else. This level of security is rarely needed or enforced in a

Re: Help required: jenkins SSH connectivity issue

2020-07-29 Thread jeremy mordkoff
. >> >> One more thing my Jenkins and ssh server is hosting on same IP address is >> there anyway i can resolve this issue? >> >> On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, > > wrote: >> >>> thanks , i tried this as well but while getting connectio

Re: Help required: jenkins SSH connectivity issue

2020-07-23 Thread jeremy mordkoff
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts Try copying/appending your .ssh/known_hosts file to jenkins' On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote: > > 0I have a bash script

Re: Do multibranch jobs lead to code duplication?

2020-07-22 Thread jeremy mordkoff
How do you normally handle branches and merging? I use the same tools and branching and merging rules as the rest of the team, i.e. development and QA. In our case, the teams are required to merge from master to their project branches on a regular basis, so they will eventually get my changes

Re: Help required: jenkins SSH connectivity issue

2020-07-22 Thread jeremy mordkoff
ouch. I always keep one window open ssh'd in as root when I play with sshd_config. Hopefully you have console access and a username/password with sudo rights. On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote: > > 0I have a bash script which connects and exexutes programs from

Re: SSH Agent, z/OS USS, and git authentication problems

2020-07-21 Thread jeremy mordkoff
CI and passphrases never mix :) You're going to need some password-less keys even if they have limited access. On Monday, July 20, 2020 at 4:48:23 PM UTC-4, Randall Becker wrote: > > Turns out, you cannot use a key-pair with a passphrase in this situation. > SSH key-pairs without a passphrase

Re: Help required: jenkins SSH connectivity issue

2020-07-21 Thread jeremy mordkoff
Where is that file referenced? In your .ssh/config file? It sounds like a simple path issue -- the config file is referencing a location that is not available to jenkins. You can override this on the command line, e.g. something like -i /c/Users/jenkins/ssh/id_rsa On Monday, July 20, 2020 at

Re: Cant connect to the remote server from jenkins using ssh key

2020-07-21 Thread jeremy mordkoff
You are positive the key works and that jenkns is ssh'ing as the right user? If so, can you check that the key is the only one offered? Finally, enable debug logs on the target's SSH server and look for the cause. On Tuesday, July 21, 2020 at 3:03:10 AM UTC-4, sakshira...@gmail.com wrote: > >

Re: Splitting/Merging/Clustering JUnit test results?

2020-05-13 Thread jeremy mordkoff
Hi, I am heading down this path. My plan is build a web app that can accept test results in various formats, and can aggregate them by build and identify them by type. It will track sources and link back to them It will have the ability to normalize the xml paths, e.g.

aborting builds based on checkin comment

2020-05-07 Thread jeremy mordkoff
We use git and SCM polling to trigger builds. There are two situations where I do not want a commit to cause a build. One is when we bump the release number and the other is when I initially create a branch. Does anyone have a groovy snippet that returns all of the commit messages since the

Re: The pipeline emailextrecipients step takes too long time

2020-04-26 Thread Jeremy Mordkoff
sending email always involves a forward lookup and many mail servers do a reverse lookup on the sender's IP. --- Jeremy Mordkoff Director of Engineering Services [cid:7231f95f-ee20-460d-bb39-189076c048ad]<https://www.riftio.com> RIFT, inc 900 Chelmsford Street, 4th floor, tower 3 Lowe

Re: The pipeline emailextrecipients step takes too long time

2020-04-26 Thread jeremy mordkoff
check that DNS is working. I've seen huge delays on basic ops when DNS lookups are timing out. Check forward and reverse lookups. On Sunday, April 26, 2020 at 12:30:59 PM UTC-4, slide wrote: > > Can you add timestamps? It's hard to tell from what you posted when things > are occurring. > >

Re: See pipeline properties in dashboard

2020-04-23 Thread jeremy mordkoff
I did stumble on the setting showing up in the UI when I 'view configuration' for the job. But I would prefer to see it in a column if possible. On Thursday, April 23, 2020 at 10:17:26 AM UTC-4, jeremy mordkoff wrote: > > If I use this syntax > > properties([ > pipelineTr

See pipeline properties in dashboard

2020-04-23 Thread jeremy mordkoff
If I use this syntax properties([ pipelineTriggers([cron('0 21 * * *')]) ]) Then the cron spec shows up under "periodic build trigger' in my list views. But it does not show up if I use this syntax properties([ pipelineTriggers([ [$class: "SCMTrigger", scmpoll_spec: 'H 22 *

Re: job is sucess but am not reciving mails please help

2020-04-18 Thread jeremy mordkoff
Check the mail queue on the jenkins master node (usually "sudo mailq"). Or try "echo test | mail -s test "jafargmail.com" on the master node. gmail is very picky about whom they will accept mail from. Where are you sending from? Does it have SPF and/or DKIM ? On Friday, April 17, 2020 at

Re: Splitting/Merging/Clustering JUnit test results?

2020-04-15 Thread jeremy mordkoff
I have a similar issue, except my test results some from multiple jobs my basic build pipeline runs unit tests then invokes the systemtest pipeline. These run 10 to 30 times a day. I also have a nightly pipeline that runs a lot of additional tests, like coverage, interop, stress, load, upgrade.

Re: a lot of jobs

2020-04-15 Thread jeremy mordkoff
I was thinking about this the other day. My plan is to create a simple jenkins job that manages all of my other jenkins jobs. Some of the other suggestions might feed into this. My goal is to able to bootstrap a new jenkins server in minutes for disaster recovery and for bringing up new

Re: Job Inheritance Plugin

2020-04-15 Thread jeremy mordkoff
I went back and forth on this. In the end, I put everything in code. I decided I wanted the minimum amount of stuff configured in jenkins. I started out with a wrapper pipeline that loaded the "guts" of the job. This was extremely restrictive in that each job had to conform at some level to

Re: Anyway to programatically update a Jenkinsfile?

2019-10-01 Thread jeremy mordkoff
I use a templating tool (m4) so I can build up a groovy script using macros. In the first stage of my Jenklinsfiie, I call a bash script that generates a groovy script, which I then load and execute. The loaded script has N stages. Note that if the ordering of your stages changes, jenkins will

Re: Generate stage from script stdout

2019-08-19 Thread jeremy mordkoff
yes. You can generate groovy code using any tool you want and then use load to import it, e.g. node('docker') { checkout scm // this step generates Jenkinsfile.do_merge sh script: './bin/git/needs_merging -j' pipeline = load 'Jenkinsfile.do_merge' pipeline.execute() } and

Re: Converting to pipeline questions

2019-07-29 Thread jeremy mordkoff
My personal advice is to pick declarative or scripted pipelines and stick to that everywhere. Switching back and forth always leads to mistakes. And so keeping the Jenkinsfiles in source control is huge plus and I would never go back to putting any logic inside my jenkins job config. Why are

Re: Build jobs take 10 minute long pause on final "exit 0"

2019-07-23 Thread jeremy mordkoff
I had noticed this and I had assumed that it was writing out the layers to disk. I will also check for background tasks per Rob's comment On Friday, June 21, 2019 at 5:01:17 PM UTC-4, Manny DaSilva wrote: > > Actually, it looks like the "exit 0" has nothing to do with it, but the > long pause

Re: How does one get the basic jenkins mailer to send raw console?

2014-10-30 Thread jeremy mordkoff
I have the same question. The conversion of pathnames in the mailed out logs makes them unreadable on smartphones. I would like to mail out the log as is, with no conversion. Does anyone know where (approximately) the code that makes this change would live? I don't mind a little hacking JLM