Re: id_rsa" is not a valid key file.

2023-10-11 Thread John Patrick
what about id_rsa.pub
I've got;
-rw---1 xx  xx    x id_rsa
-rw-r--r--1 xx  xxxxx x id_rsa.pub

have you tried doing ssh without gerrit, to see if ssh or the gerrit
config/setup.

On Wed, 11 Oct 2023 at 05:40, praveen@gmail.com <
praveen.mulim...@gmail.com> wrote:

> We are setting up gerrit trigger in jenkins & getting id_rsa" is not a
> valid key file error
> Verified the file permission
> drwx--   2 x xx 4.0K Oct 11 04:39 .ssh
> -rw---  1  x xx 2.6K Oct 11 04:23 id_rsa
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/19066da8-a2e8-4fc3-8edf-9c1a6af594cbn%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10mDBM1E0DM2oFpi%2BAPmce-pJHJEjeceBeWWFfaDd7KBOQ%40mail.gmail.com.


Re: 'mvn' is not recognized as an internal or external command, operable program or batch file.

2023-09-15 Thread John Patrick
Common issues I have to fix for people include;

Checking it's on the PATH, so for your example above it would be set
PATH=%PATH%;$MAVEN_BIN%

Checking it's executable

Most of my projects have moved to Maven Wrapper, and developers forgot to
check the exec bit is store in git, i.e. git update-index --chmod +x mvnw.
Using maven wrapper allows projects and branches to controller the maven
version used, so less setup/upgrade of developer machines or cicd hosts,
checking new maven version as part of cicd pipeline.

John


On Fri, 15 Sept 2023 at 11:26, sajith m p  wrote:

> Hello,
>
> I am using a basic maven command mvn -v in  a job unded execute batch
> command. I am getting an error while build "'mvn' is not recognized as an
> internal or external command,
> operable program or batch file."Please help me to resolve this error.
>
> I have completed maven installations in manage jenkins with name as MAVEN_HOME
> and path as C:\Users\sajit\Maven\apache-maven-3.9.4.
>
> Also, please find the environment variables:
> M2_HOME : C:\Users\sajit\Maven\apache-maven-3.9.4
> MAVEN_BIN: MAVEN_BIN : %M2_HOME%\bin
> MAVEN_HOME : %M2_HOME%
>
> Kindly help.
>
> Thanks,
> Sajith M P
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/653af6b1-55d9-479a-87c8-6dd6be58c849n%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10keju%3Dp6X1mrxioviwzVxDh%3D_v68w8hFhtYFY%2BEbhOaQA%40mail.gmail.com.


Re: Jenkins error when running the project on Mac but not on windows

2023-02-13 Thread John Patrick
Try installing gitbash on the windows machine, then in global
configurations define where git is located.
I've had similar, as it's trying to access /usr/bin/git which won't exist
at that location on windows.


On Mon, 13 Feb 2023 at 18:55, Andrei Suslov  wrote:

> I have two nodes: win and mac. On windows, my pipeline script runs fine,
> and on mac it gives me this error:
> java.io.IOException: CreateProcess error=2, The system cannot find the
> file specifiedat java.base/java.lang.ProcessImpl.create(Native Method)
>at java.base/java.lang.ProcessImpl.(ProcessImpl.java:494)at
> java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)at
> java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) Caused:
> java.io.IOException: Cannot run program "/usr/bin/git" (in directory
> "C:\Users\administrator.BSI\AppData\Local\Jenkins\.jenkins\caches\git-bde1e1064a79b70e5586f2d6a66af68e"):
> CreateProcess error=2, The system cannot find the file specified
>
> What can I do to run the pipeline script successfully on Mac?
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/cf990163-29bb-44e4-8004-a5b0a66c628bn%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10kSiQvU5XDO0ZhUDCJRt%2BmyX52OWwduA5URLtqK1m3x2w%40mail.gmail.com.


Re: substituting different credentials() in a multibranch pipeline depending on branch

2022-11-28 Thread John Patrick
Due to similar issues, I changed how I was doing it from a single
MultiBranch project.
I've now separate projects for each environment, also use
https://plugins.jenkins.io/cloudbees-folder to create prod and dev folders
which container the environment specific values.
Have a groovy script that creates all the MultiBranch projects, prod folder
and projects, dev folder and projects.

John


On Mon, 28 Nov 2022 at 06:04, Victor Sudakov  wrote:

> Dear Colleagues,
>
> Can you please suggest a way to use different credentials depending on the
> Git
> branch in a multi-branch pipeline? In other words, I would like to have
>
> pipeline {
>   environment {
> CLIENT_ID = credentials('PROD_CLIENT_ID')
>   }
> ...
> }
>
> if the Git branch is "main" and
>
> pipeline {
>   environment {
> CLIENT_ID = credentials('DEV_CLIENT_ID')
>   }
> ...
> }
>
> if the Git branch is "dev", or even "*".
>
> What would be the correct Groovy syntax to substitute "PROD_CLIENT_ID" or
> "DEV_CLIENT_ID" depending on the branch name?
>
> --
> Victor Sudakov
> Systems Administrator
> Streamline - Property Management Software
> Website: www.streamlinevrs.com
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/Y4ROJK3SmJsTTxhz%40vrs6.4vrs.com
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10%3DxZf5Z8Ucq95mHm81GWKTDofYa3UkaET%2BBc%2B5Pf%2BJgTQ%40mail.gmail.com.


Re: checkout a GitHub PR banch on normal pipeline

2022-04-27 Thread John Patrick
So this might be useful to push back to the build status to the PR
https://plugins.jenkins.io/pipeline-gitstatuswrapper/

But regarding checking out, I think the standard git checkout would work,
but use the source branch url instead of the pr for that. So, something
like;
```
git branch: XXX
url: XXX,
credentialsId: XXX
```

As a PR is purely highlighting a specific source repo and branch
combination.

Not sure if that helps or not.

John


On Wed, 27 Apr 2022 at 19:49, Dan Tran  wrote:

> Hi John
>
> Thanks for responding
>
> I am looking for a snippet of Groovy code that can check out  a GH PR
> source. User will provide   repo url, credential, and PR#
>
> -D
>
>
> On Tuesday, April 26, 2022 at 9:47:47 AM UTC-7 nhoj.p...@gmail.com wrote:
>
>> To be clear, are you wanting;
>> 1) github to trigger the job to run for that PR
>> 2) jenkins job to detect PR and run job for that PR
>>
>> John
>>
>>
>> On Tue, 26 Apr 2022 at 00:34, Dan Tran  wrote:
>>
>>> Hi
>>>
>>> I have been searching for groovy solution to check out a GH PR to my
>>> Jenkins workspace,  so far none of the suggestions works [1].
>>>
>>> Have anyone able to get this scenario it working?
>>>
>>> Thanks
>>>
>>> -D
>>>
>>>
>>> [1]
>>> https://stackoverflow.com/questions/49114011/how-to-check-out-a-pull-request-with-jenkins-pipeline
>>>
>>>
>>> --
>>> 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 email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/984e6668-6422-4b95-9375-e4a74f2cc4f1n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/b3a1686f-a742-4bb5-ae4d-dcc4eec66f02n%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10nmB7e2yTmauNpd%2By0EbFv4W8T3W%3DOMghrHu1aU%3D-2m6Q%40mail.gmail.com.


Re: checkout a GitHub PR banch on normal pipeline

2022-04-26 Thread John Patrick
To be clear, are you wanting;
1) github to trigger the job to run for that PR
2) jenkins job to detect PR and run job for that PR

John


On Tue, 26 Apr 2022 at 00:34, Dan Tran  wrote:

> Hi
>
> I have been searching for groovy solution to check out a GH PR to my
> Jenkins workspace,  so far none of the suggestions works [1].
>
> Have anyone able to get this scenario it working?
>
> Thanks
>
> -D
>
>
> [1]
> https://stackoverflow.com/questions/49114011/how-to-check-out-a-pull-request-with-jenkins-pipeline
>
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/984e6668-6422-4b95-9375-e4a74f2cc4f1n%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10kijRJenxDpZ--KH7xx5zg0oz_0032tOAyZGEC1PvfJXw%40mail.gmail.com.


Re: Alternative for Multiple SCM plugin

2022-04-18 Thread John Patrick
Hi,
So using scripted Jenkinsfile. I've setup projects where it loads a file,
and checks out those repositories dependencies, if they have a matching
branch name then it builds them. The Jenkinsfile is used for
"multibranchPipelineJob", then other jenkins jobs for develop and release
use "pipelineJob", plus some environment variables so release knows it does
the release stage.

String prerequisiteProjectName = 'parent-project-example'
String prerequisiteDir = env.WORKSPACE + '/prerequisite/' +
prerequisiteProjectName
dir(prerequisiteDir) {
  try {
git branch: env.BRANCH_NAME,
url: scmUrlPull,
credentialsId: env.SCM_CREDENTIALS_ID,
changelog: false
  } catch (ex) {
deleteDir()
  }
}

But regarding your original question, about freestyle and multiple scm,
then I only use freestyle to execute groovy to create/maintain all the
other jobs/views.

John



On Mon, 18 Apr 2022 at 05:43, Adharsha sri 
wrote:

> Hi,
> Can anyone please suggest the alternative for multiple SCM plugin.
>
> On Thu, 14 Apr 2022, 7:07 pm Adharsha sri, 
> wrote:
>
>> Hi Team,
>> Is there  any alternative plugin for Multiple SCM plugin to checkout
>> multiple git repos in jenkins freestyle.
>>
>> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAJWGB6ppeh1Kdp2hRgarCONejtHUw3dp1qsRr%2BVQvM_h3iKD5w%40mail.gmail.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10nDwj1zzuQdF5TLVXOATnTaOAx-RMqnK_mW9a-Ti4znUQ%40mail.gmail.com.


Re: How to know when plugins were installed

2022-04-15 Thread John Patrick
>From the plugin ui, everything you can disable is usually a plugin you've
installed yourself.
A few plugins I've installed can't be disabled, usually where I installed a
subsequent plugin that uses that previous plugin.

The newer plugin ui is much easier to visualise that information. So
Jenkins LTS 2.332.x or Weekly 2.33x or newer. Not sure if you can find that
information out from the file system or an api.

John


On Fri, 15 Apr 2022 at 18:08, eric@gmail.com 
wrote:

> If you're in Unix, Go to $JENKINS_HOME/plugins:
>
> ls -ltr *.hpi *.jpi
>
> The most recently installed will be at the bottom and you'll see the date.
>
> On Friday, April 15, 2022 at 10:59:10 AM UTC-6 jf.la...@gmail.com wrote:
>
>> Hello,
>>
>> The Jenkins Plugin Manager gives us a long list of about 100 installed
>> plugins on our system.
>> Yet I'm sure that we've not installed more than a dozen beyond the
>> default ones suggested in the beginning.
>> Most of the plugins listed are probably just dependencies of the initial
>> ones, or of the ones we explicitly installed.
>>
>> To prepare a disaster recovery plan, I need to list exactly what plugins
>> we installed.
>> We've recorded some of then, but unfortunately not all. How to find the
>> others?
>>
>> Is there a way to list just the plugins requested, NOT the dependencies
>> installed automatically?
>>
>> Is there a way to list the plugins installations by date?
>> (This would allow us to recognize which one we installed in each burst of
>> installations!)
>>
>> Jean-François
>>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/a81a77f2-3948-46ca-89f8-cb01c2791a75n%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10mvcwu2nZzP-ra82k0UrLhdMoZOjsxniPev40Pp2a7Qmw%40mail.gmail.com.


Re: Jenkins - Mutlibranch pipeline

2022-04-14 Thread John Patrick
So I've changed mine to 7 days, which I've done using the groovy script
that created/configures the pipeline.
e.g.
multibranchPipelineJob(...) {
  ..
  orphanedItemStrategy {
discardOldItems {
  daysToKeep(7) // how long before dead branch build is deleted
}
  }
  ..
}

I think the default is 30 days.

Hope that helps.
John


On Thu, 14 Apr 2022 at 21:46, Madhu Muchukota  wrote:

> Hi Team - We are using a Multibranch pipeline with GIT branch source. When
> ever we delete a branch in the Project repository, we see that this branch
> is being showed as strike-through. How long it will be shown as
> strike-through and when it will get deleted completely from Jenkins UI?
>
> Also when ever we create a new branch in Project repository, we see that
> in Jenkins. What is notifying Jenkins about this new branch ? If it is any
> poller/scanner, how frequently it looks for these updates/creates
>
> Thanks
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/3422692a-49de-4c9b-80bf-9ab05b4ebe2en%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10%3DQc9SALOifk9CBoHobm6OiSkpfoatc7bHxPJ2W4y4zZg%40mail.gmail.com.


Re: Why jenkins doesn't assign jobs to an agent with more resources

2022-03-30 Thread John Patrick
Hi,
Some basic questions;
- what Jenkins version?
- has it ever work for you?
- you mention 8-9 dockers per agent, is that being controlled using "Number
of executors" being set for each agent?

John



On Sun, 27 Mar 2022 at 09:30, chencho m-a  wrote:

> Hi all,
>
> I have a cluster with 20 agents, all of them are able to run 8-9 dockers.
> In my understanding after installing "least load" plugin, it should take
> agent1-docker1 and then, agent2-docker1 but why i am seeing is that it is
> using agent1-docker1, agent1-docker2. So I have a node overloaded and 19
> more doing nothing.
>
> Any clue?
>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/49b2c7f4-139a-4c18-b03d-f2900dcc8717n%40googlegroups.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10k%3D%2B5C%3DEDMxXDhFDjh5z6pbEpP3bceYmDWaS5AKqt%2BjmA%40mail.gmail.com.


Re: Log4j CVE-2021-44228

2021-12-16 Thread John Patrick
I would exclude /opt/jenkins/.m2/repository from any scans, as already
mentioned that is the local maven cache.
Also if you don't maintain that, it will grow and grow.
Personally I update build jobs so they each have their own maven cache
using -Dmaven.repo.local=mvn-repo then delete that after your job
completes. You might need to tweak some of your process if they depending
upon one job installing and another job consuming. But the problem with
that is if you do builds pre branch they could conflict if using the same
version number.

Or, delete /opt/jenkins/.m2/repository/org/apache/logging/log4j/ and
rebuild all your projects. As maven will download it again if it still
needs it. If a pre 2.15.0/2.16.0 version appears, then it means one of your
jobs still has an older version as a dependency.



On Thu, 16 Dec 2021 at 18:59, Baptiste Mathus  wrote:

> That's unrelated to Jenkins per se. This directory is the maven cache,
> also called 'local repository'.
>
> My theory is that you have a job or more that uses maven with default
> values. I suspect you even run these on the controller itself...
>
> Some of your job(s) build(s) a software of yours that depends on a
> vulnerable version of log4j.
>
>
>
>
> Le jeu. 16 déc. 2021 à 19:15, eric@gmail.com 
> a écrit :
>
>> Hi all.  Getting popped by our security team for an old version of
>> log4j.  I've checked and we don't have any of the plugins installed
>> identified by the following issue:
>>
>> https://issues.jenkins.io/browse/JENKINS-67353
>>
>> Here's the info from the scan:
>>
>> Plugin Output:
>>   Path  :
>> /opt/jenkins/.m2/repository/org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.pom.sha1
>>   Installed version : 2.14.1
>>   Fixed version : 2.15.0
>>
>> Anyone have a clue on how I go about upgrading this?
>>
>> Thanks,
>> Eric
>>
>> --
>> 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
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/0e0194bf-3090-43e1-92d2-be3789365ae5n%40googlegroups.com
>> 
>> .
>>
> --
> 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
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS7PpCx6a9J__vv7G-oYC0ssUbZbW%2Ba8_bWsS0_Na-6dyw%40mail.gmail.com
> 
> .
>

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10nDi%2B%3DWxrWqJSHXA%3DmjCjPAxqhwJe%3DFsvaQ_c2027%2BsYQ%40mail.gmail.com.


Re: mvn not found on $JENKINS_HOME/workspace/@tmp

2021-03-24 Thread John Patrick
Personally I would switch to using maven wrapper as it have saved me
from a lot of issues like this.

But to your errors;

>From your first error, check if mvn is on the path, so I would expect
to see "/opt/maven/bin" within the PATH assuming "/opt/maven" is where
maven is installed. Doesn't matter what M2_HOME or JAVA_HOME are until
mvn is on the path.

The second error implies you've not told maven what to do, as that
looks like a maven output. So it has managed to do "mvn" without any
arguments, so you need to do "mvn clean install" or "mvn verify".

For the existing Wrapper see https://github.com/takari/maven-wrapper
>From the next Maven release see this wrapper
https://maven.apache.org/plugins/maven-wrapper-plugin/index.html

John

On Wed, 24 Mar 2021 at 12:00, Mallarapu Ananth
 wrote:
>
> Hi ,
>
> Have tried to print the M2_HOME and JAVA_HOME in the pipeline you are trying 
> to build . if they are empty it might be getting overwritten . try to put 
> then as environment variables in jenkins config .
>
> On Wednesday, March 24, 2021 at 4:53:13 PM UTC+5:30 banthit...@gmail.com 
> wrote:
>>
>> I've locally installed maven on both Master and Slave
>> and correctly set path for both JAVA_HOME and M2
>>
>> jenkins@jenkins-slave-02:~$ echo $M2_HOME
>> /opt/maven
>> jenkins@jenkins-slave-02:~$ echo $JAVA_HOME
>> /usr/lib/jvm/java-1.8.0-openjdk-amd64
>>
>> Once reach the stage involved mvn command, the error occurs
>>
>> /jenkins/workspace/simple_any_tests_master@tmp/durable-c32a56b1/script.sh: 
>> 1: mvn: not found
>>
>>
>> I notice that this @tmp dir was empty which means no pom.xml and when 
>> looking closely by reproduce the mvn compile in @tmp dir
>>
>> [INFO] Scanning for projects...
>> [INFO] 
>> 
>> [INFO] BUILD FAILURE
>> [INFO] 
>> 
>> [INFO] Total time:  0.117 s
>> [INFO] Finished at: 2021-03-24T12:09:50+01:00
>> [INFO] 
>> 
>> [ERROR] No goals have been specified for this build. You must specify a 
>> valid lifecycle phase or a goal in the format : or 
>> :[:]:. Available 
>> lifecycle phases are: validate, initialize, generate-sources, 
>> process-sources, generate-resources, process-resources, compile, 
>> process-classes, generate-test-sources, process-test-sources, 
>> generate-test-resources, process-test-resources, test-compile, 
>> process-test-classes, test, prepare-package, package, pre-integration-test, 
>> integration-test, post-integration-test, verify, install, deploy, pre-clean, 
>> clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
>> switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions, please 
>> read the following articles:
>> [ERROR] [Help 1] 
>> http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
>>
>> I'm not sure what is the root cause of this error whereas incorrect maven 
>> path or slave setting (permission, etc.)
>>
>> Any helps would be appreciated
>> Cheers
>
> --
> 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 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/efd1fb38-db5e-45dc-8ea6-437f9668c417n%40googlegroups.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10%3D8oFGxqJ9-0HKHVrEi9PmZ6X9UotQ7LiF9VH21Y%2BtMqA%40mail.gmail.com.


Re: Best Practice- to deploy into windows machine from jenkins hosted on linux.

2021-02-18 Thread John Patrick
What about using Ansible WinRM? for more info
https://docs.ansible.com/ansible/latest/user_guide/windows.html

Then Jenkins running on Linux just needs ansible installed.

John

On Thu, 18 Feb 2021 at 14:40, jyothibasu kalyanapu
 wrote:
>
> Hi,
>
> if the case is jenkins hosted on linux machine & has to deploy in windows 
> machine. [adding as slave/node is ruled out]
>
> what are other options available in jenkins and which can be better & robust.
>
>
> Thankyou
>
> --
> 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 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/42615a48-d734-464a-84a2-d6082d2384een%40googlegroups.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10ngcJyEmg8s6ukwCjEtUEtBtPSTo1w%2BNLghWYpEdXNcxw%40mail.gmail.com.


Re: How to Hide findbug graphs

2021-02-09 Thread John Patrick
have you tried aggregatingResults

something like;
recordIssues enabledForFailure: true, aggregatingResults: true, tool: spotBugs()

John

On Tue, 9 Feb 2021 at 17:48, Ashok reddy  wrote:
>
> multiple empty findbug trend graphs are creating How to hide them from 
> summery?
>
>
> On Tuesday, February 9, 2021 at 10:48:07 PM UTC+5:30 Ashok reddy wrote:
>>
>> Hello Team
>>
>> I am working on maven pipeline project, below is the pipeline script. I am 
>> getting multiple find bug graphs How to Hide them
>>
>> stage('Build') {
>> options {
>> timeout(time: 30, unit: "MINUTES")
>> }
>> steps {
>>
>> withMaven(maven: 'Maven-3.5.2') {
>>
>> sh 'mvn clean install'
>> }
>> }
>> }
>> }
>> post {
>> always {
>>
>> junit testResults: '**/target/surefire-reports/TEST-*.xml'
>> recordIssues enabledForFailure: true, tool: checkStyle()
>> recordIssues enabledForFailure: true, tool: spotBugs()
>> recordIssues enabledForFailure: true, tool: pmdParser(pattern: 
>> '**/target/pmd.xml')
>>
>> jacoco(
>> exclusionPattern: '**/*Test*.class',
>> inclusionPattern: '**/*.class',
>> sourceInclusionPattern: '**/*.java'
>> )
>> }
>>
>>
>>
>>
>>
> --
> 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 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/40a80df4-3c39-47ac-a30f-d1d6f5c153fan%40googlegroups.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10kt%3Db9XsVm%2BywdXf7NE9oQ%2BA6_mQZDrvDUVM9mBPmf2EA%40mail.gmail.com.


Re: How to access jenkins using ip address remotely ?

2020-10-20 Thread John Patrick
So I've only access to a jenkins installed in a centos vagrant vm at
the moment and the value I need to change to control what listen
address is being is in this file /etc/sysconfig/jenkins

And the config is;
JENKINS_LISTEN_ADDRESS=""

Which causes jenkins to listen to every ip address the vm has access
to. So using netstat I see
$ netstat -an | grep 8080
tcp6   0  0 :::8080 :::*LISTEN
$

So depending on how you have installed and configured your jenkins
you'll need to find similar configuration and change it to either your
public/remote ip address or "" so it's listens to everything.

Then next issue might be what Danny highlighted as you have not
confirmed by what you mean by remote? I'm using the term for any
machine that is not localhost. If your wanting it remote over the
internet or company network, then you might need to change your
router... you might need to setup dynamic ip routing or port
forwarding so it is expired to your isp wan ip address.

John

On Tue, 20 Oct 2020 at 18:34, John Patrick  wrote:
>
> From the command line do;
> $ netstat -an | grep 8080
>
> That will show you what ip address as listening on the port 8080, e.g.
> your jenkins instance. If it's only listening to local addresses then
> it will never work remotely.
>
> Don't have access to a jenkins at the moment, but within Jenkins
> configuration you should be able to select what addresses jenkins
> should bind to and listen to. It might require a manual change in the
> configuration then restart.
>
> John
>
>
> On Tue, 20 Oct 2020 at 15:41, Danny Trunk  wrote:
> >
> > Hello Vaibhav,
> >
> > what does "remotely" mean? Inside your network or outside from the internet?
> > Inside of your network this should work out of the box.
> > Outside from the internet you need to open port 8080 to access it.
> > Please refer to the documentation of your router on how to open a port.
> > Keep in mind this might be a security issue.
> >
> > And in addition: If you have 24h reconnect in order to get a new ip address 
> > you can get and run a so called DynDNS address.
> > There are several providers out there.
> > Some (or most?) routers support configuring a DynDNS address as well - so 
> > you don't have to run a service on your computer.
> >
> > Am Mo, 19. Okt, 2020 um 10:22 NACHMITTAGS schrieb Vaibhav Khachane 
> > :
> >
> > Hello Team,
> >
> > I am trying to access jenkins using ip address but it is not working . I am 
> > using macOS.
> >
> > Following jenkins url working fine
> > http://localhost:8080/
> > http://127.0.0.1:8080/
> > http://0.0.0.0:8080/
> >
> > but while using ip adress of my machine it is not working
> > http://(ip address of my. machine ):8080/
> >
> >
> > --
> > 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 
> > email to jenkinsci-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/jenkinsci-users/0a2be992-d850-41d8-a0eb-6959888f0cb0n%40googlegroups.com.
> >
> > --
> > 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 
> > email to jenkinsci-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/jenkinsci-users/JS8IIQ.Z02SEYIZGNFU2%40gmail.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10%3DpezGKnAa%3D9N_9X2N2gixoeyRXodATZuCpbq8_Ri_GRA%40mail.gmail.com.


Re: How to access jenkins using ip address remotely ?

2020-10-20 Thread John Patrick
>From the command line do;
$ netstat -an | grep 8080

That will show you what ip address as listening on the port 8080, e.g.
your jenkins instance. If it's only listening to local addresses then
it will never work remotely.

Don't have access to a jenkins at the moment, but within Jenkins
configuration you should be able to select what addresses jenkins
should bind to and listen to. It might require a manual change in the
configuration then restart.

John


On Tue, 20 Oct 2020 at 15:41, Danny Trunk  wrote:
>
> Hello Vaibhav,
>
> what does "remotely" mean? Inside your network or outside from the internet?
> Inside of your network this should work out of the box.
> Outside from the internet you need to open port 8080 to access it.
> Please refer to the documentation of your router on how to open a port.
> Keep in mind this might be a security issue.
>
> And in addition: If you have 24h reconnect in order to get a new ip address 
> you can get and run a so called DynDNS address.
> There are several providers out there.
> Some (or most?) routers support configuring a DynDNS address as well - so you 
> don't have to run a service on your computer.
>
> Am Mo, 19. Okt, 2020 um 10:22 NACHMITTAGS schrieb Vaibhav Khachane 
> :
>
> Hello Team,
>
> I am trying to access jenkins using ip address but it is not working . I am 
> using macOS.
>
> Following jenkins url working fine
> http://localhost:8080/
> http://127.0.0.1:8080/
> http://0.0.0.0:8080/
>
> but while using ip adress of my machine it is not working
> http://(ip address of my. machine ):8080/
>
>
> --
> 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 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/0a2be992-d850-41d8-a0eb-6959888f0cb0n%40googlegroups.com.
>
> --
> 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 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/JS8IIQ.Z02SEYIZGNFU2%40gmail.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10kMndHMSk6E%3DYKWyUdY2ibDYUSVgdZrYGY13EyTGOeBNQ%40mail.gmail.com.


Re: Git Additional Behaviors potential bug

2020-08-25 Thread John Patrick
Okay so it does look like a bug then ,raised 3 years ago and it's not
just me doing something stupid with my setup, configuration or
Jenkinsfile.

I was already doing the hardcoded workaround in the Jenkinsfile, but
then spotted the "Custom user name/e-mail address" option so wanted to
switch to that so it was no longer hard coded in the Jenkinsfile but
controlled by the Jenkins job.

I was even fine with having to add this to each Jenkinsfile to work
around it not setting local git config.

sh '''
git config user.email "${GIT_COMMITTER_EMAIL}"
git config user.name "${GIT_COMMITTER_NAME}"
'''

John

On Tue, 25 Aug 2020 at 23:52, Mark Waite  wrote:
>
> It looks as though the environment variables that the git plugin is trying to 
> set are not visible to later shell steps.  See  
> https://issues.jenkins-ci.org/browse/JENKINS-46052 for a work around using a 
> shell command to define the user name and email address for the git committer.
>
> On Tue, Aug 25, 2020 at 4:22 PM John Patrick  wrote:
>>
>> So adding sh 'printenv' I don't see any GIT_ environment variables and
>> in the config.xml I've got it set as;
>>
>> 
>> 
>> aName
>> aem...@example.tld
>> 
>> 
>>
>> Anything else I should check, or anything else I need to configure to
>> get this working?
>>
>> John
>>
>> On Tue, 25 Aug 2020 at 10:43, John Patrick  wrote:
>> >
>> > On Tue, 25 Aug 2020 at 00:56, Mark Waite  wrote:
>> > >
>> > >
>> > >
>> > > On Mon, Aug 24, 2020 at 5:29 PM John Patrick  
>> > > wrote:
>> > >>
>> > >> Might be a question for developers or a bug ticket.
>> > >>
>> > >> I've got a multibranchPipelineJob project which runs a Jenkinsfile. The 
>> > >> job executes as expected apart form one part.
>> > >>
>> > >> If I select "Configure remote name" and change it to "origin1". When I 
>> > >> do "sh 'git remote -v'". I see as expected;
>> > >>
>> > >> [Pipeline] sh +
>> > >> git remote -v
>> > >> origin1 REPO (fetch)
>> > >> origin1 REPO (push)
>> > >> [Pipeline] sh
>> > >>
>> > >> But If I do "Custom user name/e-mail address" and enter say "aName" and 
>> > >> "aem...@example.tld". When I do "sh 'git config --list'". I don't see 
>> > >> user.name or user.email set, I just see;
>> > >>
>> > >> [Pipeline] sh +
>> > >> git config --list
>> > >> core.repositoryformatversion=0
>> > >> core.filemode=true
>> > >> core.bare=false
>> > >> core.logallrefupdates=true
>> > >> remote.origin1.url=REPO
>> > >> remote.origin1.fetch=+refs/heads/*:refs/remotes/origin1/*
>> > >> [Pipeline] sh
>> > >>
>> > >> According to the documentation I should be seeing user.name and 
>> > >> user.email set here. Just wondering if it's a bug, a bug with 
>> > >> multibranch pipeline job, or I'm missing a step in my Jenkinsfile.
>> > >>
>> > >
>> > > It is a bug in the documentation.  The documentation say one thing (sets 
>> > > config) while the code does something better (sets the environment 
>> > > variable GIT_COMMITTER_NAME and GIT_AUTHOR_NAME).  Documentation fix was 
>> > > merged today and should be visible within the next 24 hours at 
>> > > https://plugins.jenkins.io/git/#custom-user-name-e-mail-address
>> > >
>> >
>> > Thanks for the reply, I can see the documentation talking about
>> > GIT_COMMITTER_NAME and GIT_AUTHOR_NAME. Might seem a silly question
>> > but how should I be accessing these environment variables from a
>> > Jenkinsfile?
>> >
>> > As I can echo BUILD_ID but not GIT_COMMITTER_NAME, e.g.
>> >
>> > sh ' echo "BUILD_ID=${BUILD_ID}"'
>> >
>> > give me;
>> > [Pipeline] sh
>> > + echo BUILD_ID=22
>> > BUILD_ID=22
>> >
>> > but;
>> > sh ' echo "GIT_COMMITTER_NAME=${GIT_COMMITTER_NAME}"'
>> >
>> > give me;
>> > [Pipeline] sh (hide)
>> > + echo GIT_COMMITTER_NAME=
>> > GIT_COMMITTER_NAME=
>> >
>> > I've tried ${env.GIT_COMMITTER_NAME} but that give "bad substitution"
>> >
>> > I've tried;
>> > sh ' echo 

Re: Git Additional Behaviors potential bug

2020-08-25 Thread John Patrick
So adding sh 'printenv' I don't see any GIT_ environment variables and
in the config.xml I've got it set as;



aName
aem...@example.tld



Anything else I should check, or anything else I need to configure to
get this working?

John

On Tue, 25 Aug 2020 at 10:43, John Patrick  wrote:
>
> On Tue, 25 Aug 2020 at 00:56, Mark Waite  wrote:
> >
> >
> >
> > On Mon, Aug 24, 2020 at 5:29 PM John Patrick  wrote:
> >>
> >> Might be a question for developers or a bug ticket.
> >>
> >> I've got a multibranchPipelineJob project which runs a Jenkinsfile. The 
> >> job executes as expected apart form one part.
> >>
> >> If I select "Configure remote name" and change it to "origin1". When I do 
> >> "sh 'git remote -v'". I see as expected;
> >>
> >> [Pipeline] sh +
> >> git remote -v
> >> origin1 REPO (fetch)
> >> origin1 REPO (push)
> >> [Pipeline] sh
> >>
> >> But If I do "Custom user name/e-mail address" and enter say "aName" and 
> >> "aem...@example.tld". When I do "sh 'git config --list'". I don't see 
> >> user.name or user.email set, I just see;
> >>
> >> [Pipeline] sh +
> >> git config --list
> >> core.repositoryformatversion=0
> >> core.filemode=true
> >> core.bare=false
> >> core.logallrefupdates=true
> >> remote.origin1.url=REPO
> >> remote.origin1.fetch=+refs/heads/*:refs/remotes/origin1/*
> >> [Pipeline] sh
> >>
> >> According to the documentation I should be seeing user.name and user.email 
> >> set here. Just wondering if it's a bug, a bug with multibranch pipeline 
> >> job, or I'm missing a step in my Jenkinsfile.
> >>
> >
> > It is a bug in the documentation.  The documentation say one thing (sets 
> > config) while the code does something better (sets the environment variable 
> > GIT_COMMITTER_NAME and GIT_AUTHOR_NAME).  Documentation fix was merged 
> > today and should be visible within the next 24 hours at 
> > https://plugins.jenkins.io/git/#custom-user-name-e-mail-address
> >
>
> Thanks for the reply, I can see the documentation talking about
> GIT_COMMITTER_NAME and GIT_AUTHOR_NAME. Might seem a silly question
> but how should I be accessing these environment variables from a
> Jenkinsfile?
>
> As I can echo BUILD_ID but not GIT_COMMITTER_NAME, e.g.
>
> sh ' echo "BUILD_ID=${BUILD_ID}"'
>
> give me;
> [Pipeline] sh
> + echo BUILD_ID=22
> BUILD_ID=22
>
> but;
> sh ' echo "GIT_COMMITTER_NAME=${GIT_COMMITTER_NAME}"'
>
> give me;
> [Pipeline] sh (hide)
> + echo GIT_COMMITTER_NAME=
> GIT_COMMITTER_NAME=
>
> I've tried ${env.GIT_COMMITTER_NAME} but that give "bad substitution"
>
> I've tried;
> sh ' echo "GIT_COMMITTER_NAME="' + GIT_COMMITTER_NAME
>
> But that gives;
> [Pipeline] End of Pipeline
> groovy.lang.MissingPropertyException: No such property:
> GIT_COMMITTER_NAME for class: groovy.lang.Binding
> at groovy.lang.Binding.getVariable(Binding.java:63)
>
> Do I have to wait for another jenkins release as your reply implied I
> didn't as it was just a documentation issue and I was using the
> wrong...
>
> Or am I simply using the wrong syntax to access these environment
> variables or missed some setup for the Jenkinsfile.
>
> cheers,
> John
>
> >
> > Mark Waite
> >
> >
> > --
> > 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 
> > email to jenkinsci-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGUPhbQd0O%3D%2B9TYU-Vy5jr7QqquMQWu2vorgX15MG8kjw%40mail.gmail.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10nhOb42mNaC6g-Vk6SoE4a9kGohXuaHa0HDHjHhihNP2Q%40mail.gmail.com.


Re: Git Additional Behaviors potential bug

2020-08-25 Thread John Patrick
On Tue, 25 Aug 2020 at 00:56, Mark Waite  wrote:
>
>
>
> On Mon, Aug 24, 2020 at 5:29 PM John Patrick  wrote:
>>
>> Might be a question for developers or a bug ticket.
>>
>> I've got a multibranchPipelineJob project which runs a Jenkinsfile. The job 
>> executes as expected apart form one part.
>>
>> If I select "Configure remote name" and change it to "origin1". When I do 
>> "sh 'git remote -v'". I see as expected;
>>
>> [Pipeline] sh +
>> git remote -v
>> origin1 REPO (fetch)
>> origin1 REPO (push)
>> [Pipeline] sh
>>
>> But If I do "Custom user name/e-mail address" and enter say "aName" and 
>> "aem...@example.tld". When I do "sh 'git config --list'". I don't see 
>> user.name or user.email set, I just see;
>>
>> [Pipeline] sh +
>> git config --list
>> core.repositoryformatversion=0
>> core.filemode=true
>> core.bare=false
>> core.logallrefupdates=true
>> remote.origin1.url=REPO
>> remote.origin1.fetch=+refs/heads/*:refs/remotes/origin1/*
>> [Pipeline] sh
>>
>> According to the documentation I should be seeing user.name and user.email 
>> set here. Just wondering if it's a bug, a bug with multibranch pipeline job, 
>> or I'm missing a step in my Jenkinsfile.
>>
>
> It is a bug in the documentation.  The documentation say one thing (sets 
> config) while the code does something better (sets the environment variable 
> GIT_COMMITTER_NAME and GIT_AUTHOR_NAME).  Documentation fix was merged today 
> and should be visible within the next 24 hours at 
> https://plugins.jenkins.io/git/#custom-user-name-e-mail-address
>

Thanks for the reply, I can see the documentation talking about
GIT_COMMITTER_NAME and GIT_AUTHOR_NAME. Might seem a silly question
but how should I be accessing these environment variables from a
Jenkinsfile?

As I can echo BUILD_ID but not GIT_COMMITTER_NAME, e.g.

sh ' echo "BUILD_ID=${BUILD_ID}"'

give me;
[Pipeline] sh
+ echo BUILD_ID=22
BUILD_ID=22

but;
sh ' echo "GIT_COMMITTER_NAME=${GIT_COMMITTER_NAME}"'

give me;
[Pipeline] sh (hide)
+ echo GIT_COMMITTER_NAME=
GIT_COMMITTER_NAME=

I've tried ${env.GIT_COMMITTER_NAME} but that give "bad substitution"

I've tried;
sh ' echo "GIT_COMMITTER_NAME="' + GIT_COMMITTER_NAME

But that gives;
[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property:
GIT_COMMITTER_NAME for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)

Do I have to wait for another jenkins release as your reply implied I
didn't as it was just a documentation issue and I was using the
wrong...

Or am I simply using the wrong syntax to access these environment
variables or missed some setup for the Jenkinsfile.

cheers,
John

>
> Mark Waite
>
>
> --
> 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 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGUPhbQd0O%3D%2B9TYU-Vy5jr7QqquMQWu2vorgX15MG8kjw%40mail.gmail.com.

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10ks38FQx%2BA2gXD-8sC84n78MOtLG-Lz-GrCK8CYb6h5ow%40mail.gmail.com.


Git Additional Behaviors potential bug

2020-08-24 Thread John Patrick
Might be a question for developers or a bug ticket.

I've got a multibranchPipelineJob project which runs a Jenkinsfile. The job 
executes as expected apart form one part.

If I select "Configure remote name" and change it to "origin1". When I do 
"sh 'git remote -v'". I see as expected;

[Pipeline] sh 
 +
git remote -v
origin1 REPO (fetch)
origin1 REPO (push)
[Pipeline] sh

But If I do "Custom user name/e-mail address" and enter say "aName" and 
"aem...@example.tld". When I do "sh 'git config --list'". I don't see 
user.name or user.email set, I just see;

[Pipeline] sh 
 +
git config --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin1.url=REPO
remote.origin1.fetch=+refs/heads/*:refs/remotes/origin1/*
[Pipeline] sh

According to the documentation I should be seeing user.name and user.email 
set here. Just wondering if it's a bug, a bug with multibranch pipeline 
job, or I'm missing a step in my Jenkinsfile.

I'm using a Scripts Pipeline Jenkinsfile and am checking out the code using 
"checkout scm". And I've checked user.name and user.email before and after 
checkout.

Anyone else using multibranchPipelineJob and Custom name and email?

I've tested on v2.204.6, v2.222.4 and v.235.5, and the latest plugins which 
install on each of those versions.

Cheers,
John

-- 
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 email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a632cc2f-c586-42ca-9f36-b6699631a9dfn%40googlegroups.com.