Re: Is multiple triggers an option?

2022-02-25 Thread Gianluca
for, Cheers, Gianluca. On Friday, 25 February 2022 at 16:42:58 UTC rsap...@gmail.com wrote: > We have a huge pipeline that is currently set with a webhook trigger > defined in a pipelineTriggers section in the properties section. However, > sometimes we would like some of these jobs to

How to hide/remove some tags from Jenkins builds?

2021-09-16 Thread Gianluca
are old or irrelevant. Is there a way to set Jenkins to discover only certain tags based on a patter name, similar to branches? If not what are my alternatives to hide some tags from that tab? Thanks, Gianluca. -- You received this message because you are subscribed to the Google Groups "Je

Re: Fwd: How to run upstream and downstream jobs on same executor

2021-04-05 Thread Gianluca Massera
needs some processing power, hence you need an executor, hence is not occupied unnecessarily ... it's occupied to do what you asked for: "wait for something" ;-) Hope that helps. Cheers, Gianluca. On 05/04/2021 17:18, kamthe kirtee wrote: Hi, My question is if upstream job is r

Re: Fwd: How to run upstream and downstream jobs on same executor

2021-04-05 Thread Gianluca Massera
? Cheers, Gianluca. On 05/04/2021 12:36, kamthe kirtee wrote: -- Forwarded message - From: *kamthe kirtee* <mailto:kamthekirte...@gmail.com>> Date: Mon, 5 Apr, 2021, 4:36 pm Subject: How to run upstream and downstream jobs on same executor To: <mailto:jenkinsci-us

Re: Restart from stage

2021-03-23 Thread Gianluca Massera
is a pipeline node, but there are nodes that are not stages. So, you probably need to dig into internal code to find out how to identify only the stages. Cheers, Gianluca. On 23/03/2021 00:22, unlimh...@gmail.com wrote: Thanks, Gianluca. Your professional help, as always, is very operational

Re: Restart from stage

2021-03-22 Thread Gianluca Massera
Hi what-ever-is-your-name-:-) I use the "when" block to run only specific stages depending on the parameters: https://www.jenkins.io/doc/book/pipeline/syntax/#when I hope that fits your case too. Cheers, Gianluca. On 22/03/2021 22:47, unlimh...@gmail.com wrote: Are there an

Re: Execute a function from post actions in Jenkinsfile

2020-12-20 Thread Gianluca Massera
post {    always {    aFunction(BUILD_RESULT)    } } And then the function will do different things depending of the BUILD_RESULT value: if (BUILD_RESULT == "SUCCESS") {    message = "Pipeline failed" } else {    message = "Pipeline ... whatever" } I hope that helps.

Re: SSL native (self) Jenkins

2020-12-11 Thread Gianluca
certificate from a real valid certificate authority … if you can’t, then you can’t avoid the browser giving the CERT_AUTHORITY_INVALID error. I hope that’s clear. Cheers, Gianluca. P.S.: The fact Jenkins does not have access to the Internet, doesn’t prevent you to get a valid certificate from

Re: String interpolation in sh command with credentials and (shared lib) function call

2020-11-17 Thread Gianluca
proj.build.generatefromdb.user=${GEN_USR} ‘ + '-Dproj.build.generatefromdb.password=${GEN_PASSWD} ‘ + 'clean ${mvnBuildGoal} pmd:pmd pmd:cpd' Cheers, Gianluca. > On 17 Nov 2020, at 20:45, JonathanRRogers wrote: > > I don't think you've read the Jenkins pipeline documentatio

Re: Get build number of spawned job?

2020-09-16 Thread Gianluca
TREAM_ID, value: env.BUILD_ID], ... ] Cheers, Gianluca. Il giorno mercoledì 16 settembre 2020 alle 21:47:26 UTC+1 zil...@gmail.com ha scritto: > IOW, both Pipeline1 and Pipeline2 jobs have this > > String buildNum = > copyArtifacts projectName: 'CommonPipeline',

Re: Share files between pipelines?

2020-09-16 Thread Gianluca
The error is very verbose. So ... or the project name is incorrect ... or the user running Pipeline2 doesn't permission to see "Pipeline1". You can check the project name by looking at the Jenkins user interface for "Full project name: " See screenshot. Ah ... remember that you have to

Re: Best approach for trigger build only new added branches when scan multi-branch pipeline

2020-09-16 Thread Gianluca
STChangePatterns.any{pattern -> sideCars.areFilesChanged(pattern)} } } I don't know other ways to achieve what you want but they may be there are. Cheers, Gianluca. Il giorno mercoledì 16 settembre 2020 alle 10:07:39 UTC+1 banthit...@gmail.com ha scritto: > Dear folks, > > I have a

Re: Bash Shell output as Jenkins Choice Parameter

2020-09-16 Thread Gianluca
t; and I will change with a line that call the sh command: sout = sh( script: "./script.sh", returnStdout: true ) I would make sure the script.sh returns a JSON ... and then continue from line 31 of the example script as it is. Cheers, Gianluca. Il giorno martedì 15 settembre

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

2020-09-15 Thread Gianluca
One that's part of the Jenkins core is archiveArtifacts: https://www.jenkins.io/doc/pipeline/steps/core/ So, "Build" job will archive, let's say a JSON listing all microservices that need to be deployed. Then "Deploy" job will look for that list and if it's not empty, it will

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 UT

Re: Starting mutiple process

2020-09-12 Thread Gianluca
We run dozens of processes from different folders in our pipeline. So, there should be something in our pipeline definition that prevents you from that. Can you please give us more details about your pipeline so we can help? Cheers, Gianluca. Il giorno sabato 12 settembre 2020 alle 06:28:47

Re: How to share (non-secret) variables between jobs

2020-09-10 Thread Gianluca
You could maybe use https://www.jenkins.io/doc/book/pipeline/shared-libraries/ and load those variable from a global shared library and used inside the pipelines. Il giorno giovedì 10 settembre 2020 alle 01:46:51 UTC+1 ashish...@gmail.com ha scritto: > Dear All, > > We have a bunch of jobs

Re: Webhook should ignore changes in specific directory

2020-09-08 Thread Gianluca
-only | grep '${grepPattern}'", returnStatus: true ) == 0 } Cheers, Gianluca. Il giorno martedì 8 settembre 2020 alle 10:01:21 UTC+1 yogesh...@gmail.com ha scritto: > Hi All, > > I am using webhook to trigger my declarative pipeline job. > I want to ignore the directory in my

Re: one downstream with multiple upstreams(all upstreams should be success)

2020-09-01 Thread Gianluca
"job C:" { build Job ... }, } stage("Run D") { steps { // this will run only if both Job B and C succeed buildJob } } Cheers, Gianluca. Il giorno martedì 1 settembre 2020 alle 19:52:49 UTC+1 chenna keshav ha scritto: > Hi, > > i have stuck with a small issue...

Re: Triggering builds from changes in sub-directories using Github Branch Source

2020-08-17 Thread Gianluca
Il giorno lunedì 17 agosto 2020 alle 16:54:26 UTC+1 j...@multani.info ha scritto: > On Tuesday, 11 August 2020 at 15:55:17 UTC+2 Gianluca wrote: > >> Hi, >> yes ... we do. >> >> We have various Jenkinsfile in sub-directories and different pipelines. >> &g

Re: Newbie questions about the declarative syntax

2020-08-14 Thread Gianluca
w you can call them. In the case of "bat" is you just pass one parameter is used as script, as you pass more than one you need to specify who is what: "bat script: "whatever", returnStout: true" I hope it helps to get you started on learning it. Cheers, Gianluca. Il

Re: Pipeline design question

2020-08-11 Thread Gianluca
that's point 1), then each "sh" command will have its own "circle" on BlueOcean pipeline view that becomes green or red based on the outcome 4. It's exactly as point 2, but probably much easier to maintain Cheers, Gianluca. On Tuesday, 11 August 2020 15:33:33 UTC+1, Sébast

Re: Triggering builds from changes in sub-directories using Github Branch Source

2020-08-11 Thread Gianluca
triple-dot are necessary to get the same diff result shown by GitHub PRs script: "git diff origin/${env.CHANGE_TARGET}...HEAD --name-only | grep '${grepPattern}'", returnStatus: true ) == 0 } and that's it. Cheers, Gianluca. On Tuesday, 11 August 2020 14:46:40 UTC+1, J

Re: cannot get build causes

2020-07-30 Thread Gianluca
Hi, that is a confusing error in my point of view that you will learn to interpret :-) The pipeline you wrote is a declarative one and the usage of "def ... " is something you can do only in scripted pipelines ... hence, what the error really means is: "You forgot to open a script block".

Re: Jenkins and HTTPS

2020-07-24 Thread Gianluca
Trying to guess: " java.net.SocketException: Permission denied" this smells of Java not running with enough privileges to open ports below 1024 Usually on Linux systems only root can open such ports. On Friday, 24 July 2020 16:04:36 UTC+1, gaiseric.vandal wrote: > > I am setting up jenkins

Re: Calling writeFile for every entry of a map requires somewhat ugly code

2020-07-18 Thread Gianluca
I use a different approach ... but it may not fits your use case. In any case, usually when I have to perform operation on each element of a Map, I end up on transform the Map on steps that I can feed to parallel steps { stepsMap = [:] stepsMap = dataMap.collectEntries{[ "Name of step

Re: Reasons for job termination

2020-07-03 Thread Gianluca
Hi, what you describe seems something we experienced. The issue in our case was that the Jenkins agents were VMs running on an overloaded host with network issues. A combination of network errors, agents not responding and IP exhaustion made Jenkins terminating the jobs with SIGTERM when it was

Re: Download the git repo and use it for the downstream job

2020-07-01 Thread Gianluca
Hi, it's hard to help with so little context. For big what you mean? what is the actual size of the repository? Git .. exactly where is the remote? GitHub, Gitlab, other? The error is intermittent or constant? (i.e. could a simple retry do the trick?) On Wednesday, 1 July 2020 20:03:12 UTC+1,

Re: jenkins agent definition loaded from a jenkins library

2020-06-15 Thread Gianluca
PR number and other environment factors. Cheers, Gianluca. On Monday, 15 June 2020 13:20:05 UTC+1, Marco Sacchetto wrote: > > Hi, > > I'm currently using a Jenkins declarative pipeline (note: if my issue > would be solved with a scripted pipeline, I can switch). > The builds run insi

Re: how to use git commands inside a Multi Branch Project?

2020-05-29 Thread Gianluca
redentials. That works for me. Cheers, Gianluca. On Friday, 29 May 2020 10:50:29 UTC+1, Christian Baumann wrote: > > Hi all, > > I know this topic is rather old, but I´m facing the very same issue and > was not able to find a proper solution. > Has anything changed since t

Re: How to cleanup workspace built from docker

2020-05-12 Thread Gianluca
The best solution is not run any command as root inside docker. Use the environment variables UID and GID and run the docker with a user corresponding to the UID and GIU; something like "--user $UID:$GID" instead of root On Tuesday, 12 May 2020 08:51:43 UTC+1, Den wrote: > > Hi, > > I'm

Re: Hi friend i have 2 lockable resource while executing same job 2 times i want 2nd job will move 2nd lcokable resource how can i do it

2020-04-30 Thread Gianluca
It's not really clear what you want ... but nevertheless I think you have got the solution. You have an "if" ... you just need to figure it out what is the condition that makes you go to the else branch. So, why one job should lock "Resource 1" and another should "Resource 2"? On Thursday,

Re: Jenkinsfile integration with Azure AKS

2020-04-02 Thread Gianluca
It's difficult to answer your question because it's too much broad and generic. What you asked is: "Can we basically integrate on prem Jenkins with Azure aks " ... and even I've never used Azure AKS, I'm 100% sure that the answer is Yes ... but I'm also 100% sure that's not what you are asking

Re: Make vSphere plugin work

2020-04-01 Thread Gianluca
entity directly on the EXSi host and vCenter to workaround this issue. I don't have more details than that about this permission issues, sorry Cheers, Gianluca. On Wednesday, 1 April 2020 20:40:02 UTC+1, Christoph Fetzer wrote: > > Hi Gianluca, > > OK, the log was a good idea, thank y

Re: Jenkins HTML publishing on build level without copies

2020-04-01 Thread Gianluca
found out by looking at the reportDirs. So, I would suggest to rethink your strategy of building reports and avoid file names with build number into it. Cheers, Gianluca. On Wednesday, 1 April 2020 20:20:56 UTC+1, Filip Kosik wrote: > > Hi Gianluca, > > thank you for your answer.

Re: Jenkins HTML publishing on build level without copies

2020-04-01 Thread Gianluca
Hi, I have this in my pipeline publishHTML target: [ allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'out/python3-cov', reportFiles: '*/index.html', reportName: 'Python 3 Coverage' ] And I don't have old reports in builds. Each build has it

Re: Make vSphere plugin work

2020-04-01 Thread Gianluca
Hi, we use vSphere cloud plugin and some hints to help you debug: 1) go to the Jenkins log and check any error there Some errors we had in the past: - typo in the node label and the clone never started - clone started but it was failing due to permission errors in vSphere (the user is not able to

Re: Command line acccess to build actions in muti branch pipeline

2020-04-01 Thread Gianluca
> I can execute a scheduled curl program which triggers the “trunk” > successfully, but the “branches/2019/trunk” gives a http 404 error. > > > > Kind regards, > > Roel de Wildt > Software Engineer > > > > *Van:* jenkins...@googlegroups.com [mailto: >

Re: Command line acccess to build actions in muti branch pipeline

2020-04-01 Thread Gianluca
LockableResources and we created a resource that we lock in the stages of the pipeline we know we can't run at the same time because of constraints. https://jenkins.io/doc/pipeline/steps/lockable-resources/ So, a combination of both ... does the tricks for us and I think it should work as we

Re: Conditional pipeline not working

2020-03-31 Thread Gianluca
# timeout=10 >> > git checkout -f a57c28b1efb0749a9b89b72b540557e226b116bd # timeout=10 >> Commit message: "edit jenkinsfile" >> >> > Thanks > Kurusetra > > On Tue, Mar 31, 2020 at 9:37 PM Gianluca > > wrote: > >> Hi, >> we are usi

Re: Conditional pipeline not working

2020-03-31 Thread Gianluca
. > Yes i'm using github.com for codes repository... > > Thanks > Kurusetra > > On Tuesday, March 31, 2020 at 9:00:40 PM UTC+7, Gianluca wrote: >> >> We use similar conditionals ... and I think your error is in the branch >> name: >> >> env.BRANCH

Re: Conditional pipeline not working

2020-03-31 Thread Gianluca
We use similar conditionals ... and I think your error is in the branch name: env.BRANCH_NAME == 'origin/master' that should be instead: env.BRANCH_NAME == 'master' Because, if I'm guessing right, you are using Git ... and then the first part is the remote name, not the branch: / :-) So,

How can I fix "Unreadable data" errors?

2020-03-31 Thread Gianluca
obParameters/entry[2]/org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty/branch/scm/extensions/hudson.plugins.git.extensions.impl.CloneOption --- Thanks, Gianluca. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubs

Re: Security concern for Gitlab webhook token to Jenkins

2020-03-19 Thread Gianluca
In our case, we are using GitHub but we had similar concerns. Our solution was to create a little server with NGINX configured to forward the webhooks to our Jenkins masters. In this way, we could achieve the following: 1) Jenkins masters are not exposed at all to internet 2) The configuration

Re: Injecting environment variables into build

2020-03-13 Thread Gianluca
In my Jenkins setup I don't have "Inject environment variables" in the project configuration, so I'm assuming you are using a specific plugin to achieve that. It would be great to know which one. >From what I can guess you may using this one: https://plugins.jenkins.io/envinject/ If so, then

Pattern in vSphere cloud plugin node label?

2020-03-12 Thread Gianluca
s it something being considered in the past or in working for future releases? Thanks, Gianluca. -- 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 an emai

Maven 2/3 job don't expand variable in rootpom

2012-05-16 Thread Gianluca Chiodaroli
Even if i found a issue here https://issues.jenkins-ci.org/browse/JENKINS-5885 i still have the error: ERROR: No such file C:\Jenkins\jobs\MotFis-Test\workspace\test\$AMBIENTE\DOM\pom.xml The variable is defined because i use it in svn checkout Any advice? Thanks Gianluca

publish-over-ftp parametrized

2012-05-04 Thread Gianluca Chiodaroli
Anyone can post an example of configuration with Parameterized publishing enabled? Thanks!