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
> <https://groups.google.com/d/msgid/jenkinsci-users/653af6b1-55d9-479a-87c8-6dd6be58c849n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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: HTTPS - works okay, but 2 problems

2022-10-03 Thread John Horne
Thanks for the replies. We have removed the keystore, and are now using the 
reverse proxy method.

John.

On Wednesday, 28 September 2022 at 12:37:46 UTC+1 db...@cloudbees.com wrote:

> On Wed, Sep 28, 2022 at 12:00 PM James Nord  wrote:
>
>> jenkins (winstone) can load arguments from a config file in addition to 
>> the command line (--config). 
>> https://github.com/jenkinsci/winstone#configuration-file
>>
>> so you can (should be able) to put the password in that file.
>>
>> Now if you put the password in that file and make it read only by the 
>> jenkins user you have not really gained anything over using a passwordless 
>> key/certificate file that is read only by the jenkins user...
>>
>> (allthough I guess you could hack the systemd command to write the file 
>> before startup, pass the argument and then wait until Jenkins has started 
>> and remove the file, then only root has access normally to the password in 
>> the systemd configuration)
>>
>
>  There's also --paramsFromStdIn as documented at 
> https://github.com/jenkinsci/extras-executable-war#parameters-from-stdin
>

-- 
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/5820a5ac-b46b-481c-8b04-659dbb34687fn%40googlegroups.com.


Re: HTTPS - works okay, but 2 problems

2022-09-14 Thread John Horne
Thanks for that. I looked through bug reports and found someone else saying 
that port 8080 remained open. It was you (I think) that replied to him/her 
that the RPM version does not use the sysconfig file. Creating a systemd 
override to disable port 8080 worked fine.

As to the second problem - it's still a problem. I remembered from other 
work that multiple 'ExecStart's are not allowed for certain types. So need 
to use 'ExecStart=' and then on the following line put the actual ExecStart 
I wanted. However, this invokes /usr/bin/jenkins which ultimately runs java 
with all the options passed to it. So no matter what I do in the systemd 
override file for ExecStart, it always ends up with a java command being 
run with the keystore password as one of the options being shown.
I need to think about this a bit more.

John.
On Wednesday, 14 September 2022 at 03:33:17 UTC+1 Mark Waite wrote:

> On Tuesday, September 13, 2022 at 7:26:12 PM UTC-6 John wrote:
>
>> Hello,
>>
>> We are running Jenkins 2.368 on a Rocky 8 Linux server. I was asked to 
>> implement SSL onto our Jenkins service, and have done that using a 
>> keystore. (I only deal with the server itself as a sysadmin, I do not use 
>> Jenkins myself for CI purposes.)
>> This all seems to work okay, but I have noticed two issues:
>>
>> 1) Despite changing the '/etc/sysconfig/jenkins' file setting the 
>> JENKINS_PORT to -1 and setting the JENKINS_HTTPS_PORT to 8443, port 8080 is 
>> still listened upon by Jenkins. Using the 'lsof' command from a console 
>> shows that both ports 8080 and 8443 are listening. The 'System Information' 
>> page within Jenkins shows that it is also present on the supplied java 
>> command-line (as the --httpPort option). How do we fully disable the use of 
>> port 8080?
>>
>>
> If you installed Jenkins 2.368 on Rocky 8 Linux with the yum command, then 
> Jenkins should be configured with "systemctl edit jenkins" instead of 
> editing the '/etc/sysconfig/jenkins' file.  
>
> The "Managing systemd services 
> <https://www.jenkins.io/doc/book/system-administration/systemd-services/> 
> page provides more details.
>  
>
>> 2) The keystore password is exposed in the 'ps' command output, and in 
>> the 'System Information' page found when I log into Jenkins and look under 
>> the 'Manage Jenkins' page. This is obviously not secure. Perhaps the 
>> password should be stored as part of the Jenkins configuration rather than 
>> just passed onto the command-line from the sysconfig file?
>>  Is there another way to hide the password?
>>
>>
> I'm not sure on that one.  You may need to replace the ExecStart with the 
> specific command line arguments that you want to use.
>
> 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/6ac178e4-4b63-470f-90ce-8e96568c9629n%40googlegroups.com.


HTTPS - works okay, but 2 problems

2022-09-13 Thread John Horne
Hello,

We are running Jenkins 2.368 on a Rocky 8 Linux server. I was asked to 
implement SSL onto our Jenkins service, and have done that using a 
keystore. (I only deal with the server itself as a sysadmin, I do not use 
Jenkins myself for CI purposes.)
This all seems to work okay, but I have noticed two issues:

1) Despite changing the '/etc/sysconfig/jenkins' file setting the 
JENKINS_PORT to -1 and setting the JENKINS_HTTPS_PORT to 8443, port 8080 is 
still listened upon by Jenkins. Using the 'lsof' command from a console 
shows that both ports 8080 and 8443 are listening. The 'System Information' 
page within Jenkins shows that it is also present on the supplied java 
command-line (as the --httpPort option). How do we fully disable the use of 
port 8080?

2) The keystore password is exposed in the 'ps' command output, and in the 
'System Information' page found when I log into Jenkins and look under the 
'Manage Jenkins' page. This is obviously not secure. Perhaps the password 
should be stored as part of the Jenkins configuration rather than just 
passed onto the command-line from the sysconfig file?
 Is there another way to hide the password?


Thanks,

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/d1358dfb-9ff8-4214-9745-69bd2ef43ac1n%40googlegroups.com.


Groovy to list Url of Repository from Pipeline script from SCM (Git)

2022-06-23 Thread John Ward


I have a Groovy Script that I am using in the Script Console, but it is not 
working properly. The getUserRemoteConfigs()[0].getUrl() is not returning 
the correct Repository URL. I don't know where it is getting the value, but 
it does not match the value shown in the Pipeline configure GUI.

To summary, I am trying to create a report that list the job name and the 
Repository URL for jobs that use a Pipeline script from SCM, and where the 
SCM selected is Git.

Any help would be appreciated.

Thanks in advance!

-- 
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/29a37637-f942-49a6-96bc-e960ece0e35fn%40googlegroups.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
>>> <https://groups.google.com/d/msgid/jenkinsci-users/984e6668-6422-4b95-9375-e4a74f2cc4f1n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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
> <https://groups.google.com/d/msgid/jenkinsci-users/b3a1686f-a742-4bb5-ae4d-dcc4eec66f02n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/jenkinsci-users/984e6668-6422-4b95-9375-e4a74f2cc4f1n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/jenkinsci-users/CAJWGB6ppeh1Kdp2hRgarCONejtHUw3dp1qsRr%2BVQvM_h3iKD5w%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/jenkinsci-users/a81a77f2-3948-46ca-89f8-cb01c2791a75n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/jenkinsci-users/3422692a-49de-4c9b-80bf-9ab05b4ebe2en%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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
> <https://groups.google.com/d/msgid/jenkinsci-users/49b2c7f4-139a-4c18-b03d-f2900dcc8717n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

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


Getting WebEx room ID for sparkSend

2021-04-01 Thread John Pfuntner
My team has some Jenkins Groovy code that calls sparkSend 
 to send 
messages to a Cisco WebEx messaging room.  The code always writes to the 
same room and the room ID is expressed as a UUID (8-4-4-4-12 format 
string).  I think this code has been around in WebEx's previous incarnation 
known as Spark.  When I use the WebEx API to get the IDs of all rooms I use 
(and potentially write Jenkins code to send a message to another room), the 
IDs are always a 76 character long string ([a-zA-Z0-9]{76}).

sparkSend seems to require a UUID and won't use the 76 character string.  
Is there a way to take the 76 character string and derive the UUID that 
sparkSend likes?

-- 
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/a72aaf65-dfef-4d8e-821b-9929451f3a99n%40googlegroups.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: Simultaneous pipelines deadlocked "waiting for next available executor"

2020-12-17 Thread John Girvin

I've since found that removing the node{} wrapping the custom buildDeployMaven 
step seems to solve the deadlock.

I'm guessing node{} was allocating an executor for the step, which then 
immediately requested another executor for it's internal pipeline{} ?

On Thursday, 17 December 2020 at 15:50:23 UTC John Girvin wrote:

> I'm trying to understand a problem with our Jenkins, where it seems 
> piplines get deadlocked waiting for an executor if we run many of them 
> simultaneously.
>
> Jenkins 2.271 on Linux x64. We have one master node configured with 4 
> executors. Running a job singly shows it taking 2 slots in the Build 
> Executor Status panel and works fine. However, if we run a number of jobs 
> simultaneously they all get stuck "waiting for next available executor" and 
> not progressing, seemingly indefinitely.
>
> The Console Output in each shows the pipeline library being checked out, 
> then:
>
> *[Pipeline] Start of Pipeline*
>
>
> *[Pipeline] nodeStill waiting to schedule taskWaiting for next available 
> executor *
>
> It's as if the script flyweights are consuming all the executors, leaving 
> none available to run the steps, but that doesn't really make sense to me 
> given what I've read about flyweights (they are unlimited?).
>
> It's not a machine capacity issue either. I wondered if it was how the 
> pipelines are structured?
>
> The pipelines are all scripted not declarative, and look like this:
> @Library('jenkins-pipelines@master') _
> node {
> buildDeployMaven([
> ...parameters...
> ])
> }
>
> buildDeployMaven is a groovy method structured like so, with each stage 
> being a script step:
> def call(params) {
> agent any
> tools {
> ...
> }
> pipeline {
> stages {
> stage('Checkout') {
> steps {
> script {
> ...
> }
> }
> }
>
> [further stages omitted but similar]
> }
> }
> }
>
> Any ideas appreciated!
>
>

-- 
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/34e325c1-e959-4572-8302-a4325d427793n%40googlegroups.com.


Simultaneous pipelines deadlocked "waiting for next available executor"

2020-12-17 Thread John Girvin
I'm trying to understand a problem with our Jenkins, where it seems 
piplines get deadlocked waiting for an executor if we run many of them 
simultaneously.

Jenkins 2.271 on Linux x64. We have one master node configured with 4 
executors. Running a job singly shows it taking 2 slots in the Build 
Executor Status panel and works fine. However, if we run a number of jobs 
simultaneously they all get stuck "waiting for next available executor" and 
not progressing, seemingly indefinitely.

The Console Output in each shows the pipeline library being checked out, 
then:

*[Pipeline] Start of Pipeline*


*[Pipeline] nodeStill waiting to schedule taskWaiting for next available 
executor *

It's as if the script flyweights are consuming all the executors, leaving 
none available to run the steps, but that doesn't really make sense to me 
given what I've read about flyweights (they are unlimited?).

It's not a machine capacity issue either. I wondered if it was how the 
pipelines are structured?

The pipelines are all scripted not declarative, and look like this:
@Library('jenkins-pipelines@master') _
node {
buildDeployMaven([
...parameters...
])
}

buildDeployMaven is a groovy method structured like so, with each stage 
being a script step:
def call(params) {
agent any
tools {
...
}
pipeline {
stages {
stage('Checkout') {
steps {
script {
...
}
}
}

[further stages omitted but similar]
}
}
}

Any ideas appreciated!

-- 
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/ab156be5-94bd-4f94-9de1-3650ff9a898fn%40googlegroups.com.


Re: Pipeline with multiple Git repositories - how to checkout and Skip particular Repo

2020-11-22 Thread john levin
You should use git submodules to handle multiple repositories.

Check the submodule documentation for more info.

/John

On Mon, 23 Nov, 2020, 2:15 am Sravya Kancherla, 
wrote:

>
> Hi,
>
> I have Pipeline for multiple Git repositories to checkout and i want to
> skip one repo at particular branch
>
> eg: repo1,repo2,repo3,repo4.
>
> i want to skip repo3 when branch is re-5.1
> On Tuesday, May 28, 2019 at 5:53:09 PM UTC+5:30 Mark Waite wrote:
>
>>
>>
>> Git takes full control of the directory for each checkout.  Thus, the
>> last checkout "wins" by containing the content of only that checkout.
>>
>> Perform a checkout command for each repository in a separate directory.
>> Create the directory for each checkout with the dir() step or the ws()
>> step, and place the checkout inside the block from that step.  Something
>> like this:
>>
>> dir('dir-1-for-repo-1') {
>>   checkout([$class: 'GitSCM', branches: [[name: gitBranch]], extensions:
>> [[$class: 'CloneOption', timeout: 120]],
>>   userRemoteConfigs: [[credentialsId: "${credentialsId}", url:
>> mainProjectGITURL ]  ]])
>> }
>> dir('dir-2-for-repo-2') {
>>   checkout([$class: 'GitSCM', branches: [[name: gitBranch]], extensions:
>> [[$class: 'CloneOption', timeout: 120]],
>>   userRemoteConfigs: [[credentialsId: "${credentialsId}", url:
>> list[0] ]  ]])
>> }
>>
>> On Tue, May 28, 2019 at 4:14 AM Jacques van der Merwe 
>> wrote:
>>
>>> I know this is fairly old thread but I have an issue
>>> when using the multi repo checkout it seems to remove the previous repo
>>> checkout before doing the new one.
>>> I have tried checking all the repos required for my build using the
>>> Jenkins Declarative "checkout" command
>>> checkout([$class: 'GitSCM', branches: [[name: "${gitBranch}"]],
>>> doGenerateSubmoduleConfigurations: false, extensions: [[$class:
>>> 'CloneOption', timeout: 120]], submoduleCfg: [], userRemoteConfigs: [
>>>  [credentialsId: "${credentialsId}", url: "${mainProjectGITURL}"],
>>>  [credentialsId: "${credentialsId}", url: "${list[0]}"],
>>>  [credentialsId: "${credentialsId}", url: "${list[1]}"],
>>>  [credentialsId: "${credentialsId}", url: "${list[2]}"],
>>>  [credentialsId: "${credentialsId}", url: "${list[3]}"]
>>>  ]])
>>> With this config I can see on my build server each project are being
>>> checked out but only the last project is availbale after this checkout.
>>>
>>>
>> Multiple userRemoteConfigs in a single checkout command will perform a
>> single checkout of one of the remote configs.  It won't iterate over the
>> list of remote configs and definitely won't create the separate
>> subdirectories that would be needed to retain a checkout of multiple
>> repositories.
>>
>> Multiple userRemoteConfigs in a single checkout are allowed as a
>> historical use that was allowed for those rare cases where multiple
>> locations contained the same repository and any one of the repositories
>> could be used.  Multiple userRemoteConfigs won't help in this case and they
>> don't help in almost all cases.
>>
>>
>>> I also tried doing in a loop using "git" only
>>>def list = "${includedProjectsGITURLS}".split("\n")
>>> echo "Number of repos : " + list.size()
>>> echo "Checking out main project (${gitBranch}) :  " +
>>> mainProjectGITURL + "\n";
>>> git credentialsId: 'blablabla', url: "${mainProjectGITURL}"
>>> for (String gitSubURL:list)
>>>  {
>>> echo "Checking out sub project (${gitBranch}) :  " + gitSubURL +
>>> "\n";
>>> git credentialsId: 'blablabla', url: "${gitSubURL}"
>>>  }
>>> The result is the same, making me think "checkout" is just wrapper for
>>> GIT
>>>
>>>
>> The git step is a simplified form of the checkout step.  If your case
>> does not need the full capability of the checkout step, you are welcome to
>> use the git step.  I find that I almost always want the checkout step
>> because it allows me to control things more precisely.
>>
>>
>>> I also tried checking each repo into its own sub folder but the result
>>> is the same
>>>
>>>
>> We'll need more explan

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.


Declarative Pipeline to trigger Job in Post-build actions if condition satisfies

2020-10-07 Thread john levin
Hello Team,

Shall we put a if condition in post build actions to trigger other jobs if
condition matches.

Say for example

If date matches Wednesday, trigger the other job in post build actions.

/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/CAGJXh7rapeQOcK_NuW1UYpre%3DM5kE%3DKaG0bX47LsTwBz_M_WNg%40mail.gmail.com.


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

2020-09-09 Thread john levin
Oh.. in that case I guess you have to handle it in your scripts only, if
the values are dynamically created in one job and you have to pass to
another which is not dependant.

May be you can check the job status and check if its running and then get
some values from logs.


On Thu, 10 Sep, 2020, 7:59 am Ashish Sharma, 
wrote:

> Hi John,
>
> We don't have dependent (upstream-downstream) pipelines, these pipeline
> are in same hierarchy and triggered separately.
> But since these are microservice for same project, we want to share some
> variables among these.
>
> On Thursday, September 10, 2020 at 9:59:54 AM UTC+8 smart...@gmail.com
> wrote:
>
>> Simply parsing the required variables while triggering the downstream job.
>>
>>
>> stage ('Invoke_pipelineA') {
>> steps {
>> build job: 'pipelineA', parameters: [
>> string(name: 'param1', value: "value1")
>> ]
>> }
>> }
>>
>>
>>
>> /BR
>> John
>>
>> On Thu, 10 Sep, 2020, 6:17 am Ashish Sharma,  wrote:
>>
>>> Dear All,
>>>
>>> We have a bunch of jobs which will use some common variables like user
>>> names, urls etc (which are not secrets or credentials). Is there a way (or
>>> plugin maybe) to share these variables between jobs (something like
>>> credentials plugin for secrets).
>>>
>>> TIA,
>>> Ashish
>>>
>>> --
>>> 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/cb539948-33ce-4233-b5bc-965bbfd0d265n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/cb539948-33ce-4233-b5bc-965bbfd0d265n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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/5c42ac0f-7461-4d4a-ac78-ff53589f5181n%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/5c42ac0f-7461-4d4a-ac78-ff53589f5181n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGJXh7q4cfv99m1MjA1Y5Ry%3D7Fn9G4t__tDhWxpRXQ1anm9orw%40mail.gmail.com.


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

2020-09-09 Thread john levin
Simply parsing the required variables while triggering the downstream job.


stage ('Invoke_pipelineA') {
steps {
build job: 'pipelineA', parameters: [
string(name: 'param1', value: "value1")
]
}
    }



/BR
John

On Thu, 10 Sep, 2020, 6:17 am Ashish Sharma, 
wrote:

> Dear All,
>
> We have a bunch of jobs which will use some common variables like user
> names, urls etc (which are not secrets or credentials). Is there a way (or
> plugin maybe) to share these variables between jobs (something like
> credentials plugin for secrets).
>
> TIA,
> Ashish
>
> --
> 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/cb539948-33ce-4233-b5bc-965bbfd0d265n%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/cb539948-33ce-4233-b5bc-965bbfd0d265n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGJXh7qekzsg0oBFYmLP0yyP4HLoDHBLWT0Kz1N5E5RWnp-yDQ%40mail.gmail.com.


Re: Declarative pipeline to use agent as both docker & slave machines with label

2020-08-26 Thread john levin
Hello,

The answer is straight forward, I missed somehow.

Under agent just include label options


pipeline {
agent {
docker { image 'node:14-alpine'

 label '' }

}


Thank you


On Wed, 26 Aug, 2020, 6:23 pm john levin,  wrote:

>
> Hello Everyone
>
> I have a scenario like i need to run my CI builds in a container and this
> container should run on slave machines accordingly (i have same image in
> all my slave machines). But pipeline is accepting either agent as docker or
> slave machines.
>
>
> --
> 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/a425f6c3-b16f-435d-91a6-66fadf18e05cn%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/a425f6c3-b16f-435d-91a6-66fadf18e05cn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGJXh7rhEfTrpyUOLQHxcL8J%2BkE7JHzTHdrpspwm%3D4tXbQbgXg%40mail.gmail.com.


Declarative pipeline to use agent as both docker & slave machines with label

2020-08-26 Thread john levin

Hello Everyone

I have a scenario like i need to run my CI builds in a container and this 
container should run on slave machines accordingly (i have same image in 
all my slave machines). But pipeline is accepting either agent as docker or 
slave machines. 


-- 
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/a425f6c3-b16f-435d-91a6-66fadf18e05cn%40googlegroups.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 
<http://localhost:8181/job/parent_build-branches/job/develop/2/console#> +
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 
<http://localhost:8181/job/parent_build-branches/job/develop/2/console#> +
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.


Re: Authentication issue with Gerrit Code Review plugin 0.4.1

2020-05-26 Thread John Shield
Hi Luca,

I want to say I've greatly appreciated your help with finding out what was 
wrong.

The problem was because we were using the ssh credentials. When I got our 
IT department to make the https credentials and switched our build pipeline 
over to that, it all started working.

Can't thank you enough for helping me find it. The issue had been on my 
mind for the last 6 months.

Best Regards,

John Shield

-- 
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/ec38d915-444b-42aa-9aea-459faf7bb422%40googlegroups.com.


Re: Authentication issue with Gerrit Code Review plugin 0.4.1

2020-05-26 Thread John Shield
Hi Luca,

I took a look into these suggestions. It seems like I'll need to get back 
to you after asking for assistance from my work colleagues.

1. I switched to the https URL and got authentication failures in the 
Jenkins interface. I'm assuming that credentials weren't enabled for https, 
so I raised a query with our IT department.
2. We don't seem to have a Gerrit SCM source configured. Git is the only 
option available in that dropdown. I'll need to ask around on that one 
again and see what I can find out.
3. I attempted to switch the Trigger to Default. However, the build stopped 
working as the SCM pipeline didn't know which patch to download. I will 
have to look into this more after the first two issues are resolved.

Thanks for the pointers. I will spend some time chasing these up.

Best Regards,

John Shield

On Wednesday, May 27, 2020 at 9:11:57 AM UTC+9:30, Luca Milanesio wrote:
>
>
>
> On 27 May 2020, at 00:34, John Shield > 
> wrote:
>
> Thanks Luca,
>
> I had a look at the SCM credentials we're using for the pipeline and the 
> "Repository URL" in the SCM. As far as I can tell it is setup correctly. 
> The URL is the one for the authenticated access, and the credentials 
> provided are being used by the SCM checkout.
>
> The plugin still seems to think there are no credentials.
>
>
> A few things:
>
> 1. The Gerrit Code Review plugin supports only Git/HTTP URLs at the moment
> 2. You should select “Gerrit” as SCM source (you have a “Git” SCM source 
> at the moment)
> 3. Do not use any Gerrit Trigger strategy, as this plugin doesn’t use 
> Gerrit stream events.
>
> HTH
>
> Luca.
>
>
> I've included a screenshot of the SCM definition.
>
> 
>
> It would be great to finally get the Gerrit Code Review plugin working, as 
> we want to separate regression builds into a separate tag. To be honest, 
> we've been ignoring the problem for 6 months as we've focusing on the 
> project work instead.
>
> Best Regards,
>
> John Shield
>
> On Wednesday, May 27, 2020 at 7:30:41 AM UTC+9:30, Luca Milanesio wrote:
>>
>>
>>
>> On 26 May 2020, at 17:10, John Shield  wrote:
>>
>> Dear All,
>>
>> Looking for some help understanding how to assign credentials for the Gerrit 
>> Code Review Plugin to work.
>>
>> Aside from that specific plugin, we're able to build and get verification 
>> tags just fine. The git successfully checks out from gerrit using the 
>> credentials defined for the checkout SCM in a declarative pipeline, and 
>> Jenkins successfully posts the normal build verification.
>>
>> When attempting to use commands from Gerrit Code Review Plugin 
>> "gerritComment" or "gerritReview labels", we get the following error message.
>> "Gerrit Review requires authentication, however there are no credentials 
>> defined or are empty."
>>
>> It's unclear for me how the Gerrit Code Review Plugin accepts credentials. 
>>
>>
>> You need to define the SCM credentials in the Gerrit SCM source of the 
>> pipeline, otherwise Jenkins won’t know what’s the credentials-id to use.
>>
>> Please note that Gerrit repos have two URLs: one anonymous and one for 
>> authenticated access (prefixed by ‘/a/‘). You need to use the authenticated 
>> one for being able to post reviews.
>>
>> I haven't been able to find out any documentation about a special 
>> credentials id variable, or example for the plugin needing declaration of 
>> credentials.
>>
>> I would be grateful for any help in understanding this problem.
>>
>>
>> Let me know if the above guidance is enough.
>>
>> HTH
>>
>> Luca.
>>
>>
>> Best Regards,
>>
>> John Shield
>>
>>
>> -- 
>> 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 jenkins...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/56812aa6-41f6-4434-837e-7ff54a4a276f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/56812aa6-41f6-4434-837e-7ff54a4a276f%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>>
>>
> -- 
> 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 jenkins...@googlegroups.com .
> To view this discussion on the web visit 
> https:

Re: Authentication issue with Gerrit Code Review plugin 0.4.1

2020-05-26 Thread John Shield
Thanks Luca,

I had a look at the SCM credentials we're using for the pipeline and the 
"Repository URL" in the SCM. As far as I can tell it is setup correctly. 
The URL is the one for the authenticated access, and the credentials 
provided are being used by the SCM checkout.

The plugin still seems to think there are no credentials.

I've included a screenshot of the SCM definition.

[image: SCM Settings.png]

It would be great to finally get the Gerrit Code Review plugin working, as 
we want to separate regression builds into a separate tag. To be honest, 
we've been ignoring the problem for 6 months as we've focusing on the 
project work instead.

Best Regards,

John Shield

On Wednesday, May 27, 2020 at 7:30:41 AM UTC+9:30, Luca Milanesio wrote:
>
>
>
> On 26 May 2020, at 17:10, John Shield > 
> wrote:
>
> Dear All,
>
> Looking for some help understanding how to assign credentials for the Gerrit 
> Code Review Plugin to work.
>
> Aside from that specific plugin, we're able to build and get verification 
> tags just fine. The git successfully checks out from gerrit using the 
> credentials defined for the checkout SCM in a declarative pipeline, and 
> Jenkins successfully posts the normal build verification.
>
> When attempting to use commands from Gerrit Code Review Plugin 
> "gerritComment" or "gerritReview labels", we get the following error message.
> "Gerrit Review requires authentication, however there are no credentials 
> defined or are empty."
>
> It's unclear for me how the Gerrit Code Review Plugin accepts credentials. 
>
>
> You need to define the SCM credentials in the Gerrit SCM source of the 
> pipeline, otherwise Jenkins won’t know what’s the credentials-id to use.
>
> Please note that Gerrit repos have two URLs: one anonymous and one for 
> authenticated access (prefixed by ‘/a/‘). You need to use the authenticated 
> one for being able to post reviews.
>
> I haven't been able to find out any documentation about a special credentials 
> id variable, or example for the plugin needing declaration of credentials.
>
> I would be grateful for any help in understanding this problem.
>
>
> Let me know if the above guidance is enough.
>
> HTH
>
> Luca.
>
>
> Best Regards,
>
> John Shield
>
>
> -- 
> 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 jenkins...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/56812aa6-41f6-4434-837e-7ff54a4a276f%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/56812aa6-41f6-4434-837e-7ff54a4a276f%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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/994bd305-6a04-4c1b-bc53-9ac9bc234b7f%40googlegroups.com.


Authentication issue with Gerrit Code Review plugin 0.4.1

2020-05-26 Thread John Shield


Dear All,

Looking for some help understanding how to assign credentials for the Gerrit 
Code Review Plugin to work.

Aside from that specific plugin, we're able to build and get verification tags 
just fine. The git successfully checks out from gerrit using the credentials 
defined for the checkout SCM in a declarative pipeline, and Jenkins 
successfully posts the normal build verification.

When attempting to use commands from Gerrit Code Review Plugin "gerritComment" 
or "gerritReview labels", we get the following error message.
"Gerrit Review requires authentication, however there are no credentials 
defined or are empty."

It's unclear for me how the Gerrit Code Review Plugin accepts credentials. I 
haven't been able to find out any documentation about a special credentials id 
variable, or example for the plugin needing declaration of credentials.

I would be grateful for any help in understanding this problem.

Best Regards,

John Shield

-- 
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/56812aa6-41f6-4434-837e-7ff54a4a276f%40googlegroups.com.


Re: withMaven step not working with altDeploymentRepository when jenkins job parameters are specified?

2020-01-05 Thread John Citizen
On Saturday, 4 January 2020 21:58:59 UTC+10, James Nord wrote:
>
> 'OS' is an environment variable on windows.
> the maven scripts are likely looking at it and expecting one that is 
> defined for Windows to set some parameters.  the job parameter gets set in 
> the environment for the process in the bat step if I recall correctly and 
> this is likely messing with the script.  
>
> try changing 'os' to 'agent-os' and see how you get on.
>
> /James
>

Yes, that was the solution: I replaced the job parameter 'os' with 
'agent_os' and the deploy step now works.

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/3ebaad68-41a5-4c5d-97a3-aa08074edef9%40googlegroups.com.


withMaven step not working with altDeploymentRepository when jenkins job parameters are specified?

2020-01-02 Thread John Citizen
I am trying to use the the withMaven step in a jenkins pipeline to deploy 
to a specified repository but I get some errors when using jenkins job 
parameters.


The pipeline script is simple checkout + deploy strategy. Initially I 
specified the OS (used to specify the jenkins agent label) as a variable:

def os = 'windows'

pipeline {
agent { label "jenkins-agent-${os}" }
stages {
stage('Checkout') {
steps {
checkout(...)
}
}
stage('Deploy') {
steps {
script {
def deploymentRepository = 
"my-server-id::default::https://my.server.url/libs-snapshots-local'
withMaven(maven:'maven-3.0.5', jdk:'jdk-8u152', 
mavenSettingsConfig:'maven-settings') {
bat "mvn -V -U 
-DaltDeploymentRepository=${deploymentRepository}"
}
}
}
}
}
}



This works as expected.

I decided to replace the "os" variable in the pipeline script with a 
jenkins job parameter (a string parameter with name 'os' and default value 
of 'windows'):

pipeline {
agent { label "jenkins-agent-${params.os}" }
...



But running this now gives the following error:

c:\Jenkins\workspace\deployer>mvn -V -U 
-DaltDeploymentRepository=my-server-id::default::https://my.server.url/libs-snapshots-local
 clean deploy 

- withMaven Wrapper script -

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 
23:51:28+1000)

Java version: 1.8.0_152, vendor: Oracle Corporation

OS name: "windows server 2012 r2", version: "6.3", arch: "amd64", family: "dos"

[INFO] Scanning for projects...

Downloading: 
https://my.server.url/libs-snapshots-local/plugins-releases/my-server-id/default/https/default-https.pom
 


Downloading: *https://* 


my.server.url/libs-snapshots-local/ 


plugins-snapshots/my-server-id/default/https/default-https.pom 


[WARNING] The POM for connectedworksite-maven-repo:default:jar:https is 
missing, no dependency information available



Note that maven is now trying to download a plugin artifact with 
groupId=my-server-id, artifactId=default, and version=https/default-https.

I tried removing the layout from the deployment repository (e.g. to 
-DaltDeploymentRepository=my-server-id::
https://my.server.url/libs-snapshots-local) but got a similar error of 
maven attempting to download a non-existent plugin:

[ERROR] Error resolving version for plugin 'my-server-id:https' from the 
repositories


However if I bump the maven version from 3.0.5 to 3.3.9 (for example) then 
the deployment works as expected.

So there seems to be an issue with the maven version and using jenkins job 
parameters (fails with maven 3.0.5, works with maven 3.3.9) and I'm 
wondering whether this is an issue with maven 3.0.5 (doubtful, as 
specifying the os as a variable works), or with the maven integration 
plugin (perhaps it uses a 'params' variable), or something else (a jenkins 
internal issue). 

I have old projects that are required to use maven 3.0.5 for compatibility 
reasons and I'd really like to parameterize my jenkins jobs if possible.

Any help appreciated.

Using:
- jenkins version 2.190.1
- pipeline maven integration plugin version 3.8.2

-- 
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/0041f9f3-0c07-4f64-8e43-a0e4f70853e8%40googlegroups.com.


Why does my pipeline have 2 workspaces?

2019-08-21 Thread John Lussmyer
I've noticed that my single pipeline ends up with 2 separate workspaces
each time it runs.
What is the one ending in @script for?

-- 
--
CasaDelGato Sensible Email package:
https://sourceforge.net/projects/sensibleemail/

-- 
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/CADFKdfRTZ38Omxq_gZYb8grttSz8KtfdO6qQ7U7hvxxUCqMYdQ%40mail.gmail.com.


How to change Workspace Folder?

2019-04-05 Thread John Farmer
Jenkins CI ver 2.167 installed on Windows 10 PC, running as a Windows 
service.  The Jenkins application was installed via the Windows installer.

When I ran Jenkins as a console app, it created the workspace folder inside 
the logged-in user account.  When run as a service, the workspace folder 
was created inside the "Program Files (x86)" folder (C:\Program Files 
(x86)\Jenkins\workspace).  

How can I change the location of the workspace folder outside of the 
program files path?

-- 
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/32803ae1-975a-4d6b-82c3-a81cedd3af97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What should be used instead of the various Deprecated plugins?

2019-02-06 Thread John Lussmyer
I've noticed that our builds now have a list of Deprecated plugins:

   - [Deprecated] Publish Findbugs Analysis results
   - [Deprecated] Scan for Compiler warnings
   - [Deprecated] Publish combined static analysis results


What are the replacements for those?

-- 
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/e03a7353-5c31-4713-816f-ae0727fc71ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running jobs via VMware Workstation (15)

2019-01-28 Thread John E Peterson
Cool.  I'm going to talk to myself here.  :-)

If I say "launch by running an command on the master", does that mean that 
Jenkins will launch a "command" on the PC it is running on (MyJenkins)?  
 And if that command launches the VM on another system, and once that 
system comes up and the javaws on the VM would connect as though it was 
launched via a vSphere cloud and work as it always did?  Documentation is 
not totally clear on any of this.

If that is the case, this is precisely what I need.

Thanks



On Monday, January 28, 2019 at 11:10:06 AM UTC-5, John E Peterson wrote:
>
> Ok.  We have to run some jobs using VM's controlled on a real PC (Well, a 
> VM on a real PC, not a VMware ESXi vCenter/vSphere host server setup).  All 
> the bits and pieces seem to be there to do this, but no method (and no 
> plugins) to put it all together.
>
> We have Jenkins running on "*MyJenkins*".
> We have VMware Workstation running on "*MyVMWorkstation*"
> We have VM's as *MyVM1* and *MyVM2* (controlled by VMware Workstation on "
> *MyVMWorkstation*")
>
> I'm guessing that maybe this becomes a pipeline thing?  But not sure how 
> to do it?  I know that several years back, VMware removed the ability of 
> vSphere to connect to and control Workstation via the Gateway app.  :-(
>
> We can launch a VM on *MyVMWorkstation* with a vmrun command line (and do 
> it remotely!).  Such as *PsExec \\MyVMWorksation vmrun start MyVM1*  
> Works a charm.  (Well, actually some credential mess to deal with, but I've 
> got that handled).
> When the VM launches, it will connect to Jenkins 
>
> What I need Jenkins to do when it detects a job is ready to run:
>
> Send the command as above to *MyVMWorkstation* to launch *MyVM1*
> Wait for *MyVM1* to launch (ie: javaws says "Hey, I'm connected and 
> ready")
> Run the job on* MyVM1* - just like a normal vSphere setup
> When the job is done, execute the original command with "stop" instead of 
> "start" (and actually a restore snapshot command as well)
>
> How do I chain all this together?  It involves sending commands to 
> essentially two "computers" in sequence to make this work.
>

-- 
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/5dfbf028-1d7b-44f5-a184-1ee4ec615db5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Running jobs via VMware Workstation (15)

2019-01-28 Thread John E Peterson
Ok.  We have to run some jobs using VM's controlled on a real PC (Well, a 
VM on a real PC, not a VMware ESXi vCenter/vSphere host server setup).  All 
the bits and pieces seem to be there to do this, but no method (and no 
plugins) to put it all together.

We have Jenkins running on "*MyJenkins*".
We have VMware Workstation running on "*MyVMWorkstation*"
We have VM's as *MyVM1* and *MyVM2* (controlled by VMware Workstation on "
*MyVMWorkstation*")

I'm guessing that maybe this becomes a pipeline thing?  But not sure how to 
do it?  I know that several years back, VMware removed the ability of 
vSphere to connect to and control Workstation via the Gateway app.  :-(

We can launch a VM on *MyVMWorkstation* with a vmrun command line (and do 
it remotely!).  Such as *PsExec \\MyVMWorksation vmrun start MyVM1*  Works 
a charm.  (Well, actually some credential mess to deal with, but I've got 
that handled).
When the VM launches, it will connect to Jenkins 

What I need Jenkins to do when it detects a job is ready to run:

Send the command as above to *MyVMWorkstation* to launch *MyVM1*
Wait for *MyVM1* to launch (ie: javaws says "Hey, I'm connected and ready")
Run the job on* MyVM1* - just like a normal vSphere setup
When the job is done, execute the original command with "stop" instead of 
"start" (and actually a restore snapshot command as well)

How do I chain all this together?  It involves sending commands to 
essentially two "computers" in sequence to make this work.

-- 
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/3e50f5ec-99b4-4a5d-a39e-a3ee49e7d21a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ASK] google-login-plugin: Does Google+ API termination impacting the google login plugin?

2019-01-17 Thread Virtual John
Hi guys, i just want to make sure are google+ API termination going to 
disrupt or impact google login plugin for jenkins? maybe prevent us to 
login, or get user information? https://developers.google.com/+/api-shutdown
I have tried to take a look at the 
code https://github.com/jenkinsci/google-login-plugin, but found there is 
no api call made to google+ endpoint "googleapis.com/plus".
I just wanted to make sure if my assumption is correct, sorry if this is a 
stupid question.

Thank you

-- 
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/c305f49e-8a6f-4ccc-9e96-73533daaf63a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Backup and Restore

2018-11-26 Thread John Mellor
I have had restore issues with *ALL* of the backup plugins that I have
tried.  The problem is that they are using stupid mechanisms to copy
the filesystem that cannot correctly copy a symlink.  This breaks the
LastSuccessfulBuild and LastUnsuccessfulBuild and LastFailedBuild
symlinks, causing lots of secondary issues.

Doing my own using cpio or rsync in a cronjob only messes up copying
very large files that exceed the archive limits (4GB for cpio for
instance).


On Mon, 2018-11-26 at 21:12 +, Artur Szostak wrote:
> Just my opinion: but I would forget about the backup plugins in
> Jenkins for full production backups. They all do a poor job when it
> comes to a full backup for a production system that also needs high
> availability. The best that can be done at the moment is to run
> Jenkins on a file system or data store that is able to perform copy-
> on-write snapshots. From within Jenkins you will want to setup a
> simple job that triggers the copy-on-write snapshot when no other job
> is running. Then use your normal production backup solutions to
> backup the snapshot in the background.
> 
> Cheers
> 
> Artur
> 
> 
> From: jenkinsci-users@googlegroups.com <
> jenkinsci-users@googlegroups.com> on behalf of gotviser...@gmail.com
> 
> Sent: 01 November 2018 21:36
> To: Jenkins Users
> Subject: Jenkins Backup and Restore
> 
> We have a Jenkins instance running and we are trying to setup a
> backup and restore mechanism in case of any mishaps.  We are looking
> for a full backup of the Jenkins and so decided to go with
> PeriodicBackup plugin.  With this plugin, the backup works
> fine.  But, we are trying to restore it in a completely new Jenkins
> setup and not able to restore.  When we pick the backup file that we
> want to restore from, it says restoring, but nothing happens.  Even
> after waiting out for over 30 mins, nothing is restored.  As a work
> around, I stopped the Jenkins service, renamed the 'JENKINS_HOME'
> (/var/lib/jenkins) folder to 'jenkins_backup' and created another
> folder called 'jenkins' in the same location.  In this folder, I
> copied all the files from the backup and then started Jenkins (NOTE:
> I didn't change the .owner file.  I'm using the .owner file of the
> new Jenkins only).  Jenkins came up and I was able to see all the
> configurations from the old one.  Everything was fine.  I let it like
> that overnight and in the morning when I came and tried to access it,
> Jenkins was way too slow and I was not able to save any new
> configuration.  When I try I'm getting
> java.io.ioexception: too many open files jenkins
> error.  I restarted the jenkins and it's taking too long for the UI
> to come up.  Am I doing anything wrong here?  Any suggestions for my
> requirement?
> 
> P.S. - I tried SCMSync plugin and ThinBackup.  But, problem with
> these are that they don't do full backup.  But, with ThinBackup both
> backup and restore works fine.
> 
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/0c58b4fa-4e8b-4c53-9ca9-b99397078fae%40googlegroups.com
> ;.
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
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/0e5a17f5dc808937b44f25f634cc6eeb76fb907a.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins service going down on Windows Slave

2018-11-26 Thread John Mellor
Hi Slide,

We run our worker nodes mostly on sometimes-overloaded VMware hosts. We also 
interrupt the undersized network fairly routinely, for other reasons. Can you 
try hooking in a network degradation service, so that you see network outages, 
for instance.

JNLP connections fail in these circumstances, while ssh connections do not. 
Unfortunately, Windows essentially requires JNLP-only connections.



On Mon, 2018-11-26 at 08:23 -0700, Slide wrote:
Weird, I have had ZERO issues with JNLP agents. It works flawlessly for me.

On Mon, Nov 26, 2018 at 8:21 AM John Mellor 
mailto:john.mel...@esentire.com>> wrote:
We have that problem all the time. IMHO the JNLP connectivity to the master is 
not robust enough to be used.

I have tried setting up the agent connection as a service per the Jenkins doc, 
but it still cannot survive momentary network or performance outages. The only 
way that I have managed to get this machine consistent, is to reboot the 
Windows machine and the service will shortly re-establish connectivity. JNLP 
connections are just-plain defective.



On Mon, 2018-11-26 at 07:06 -0800, 
gotviser...@gmail.com<mailto:gotviser...@gmail.com> wrote:
Hello,

We have a Windows Server 2016 Jenkins Slave.  The Jenkins service in this slave 
goes down at times.  We then go back and start it manually though the service 
is set to start automatically.  Need help figuring out what's causing it to go 
down and why it isn't coming back online on its own.

--
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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0643151142ab642b3a0117ea0b42ab1e41ccfda3.camel%40esentire.com<https://groups.google.com/d/msgid/jenkinsci-users/0643151142ab642b3a0117ea0b42ab1e41ccfda3.camel%40esentire.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
Website: http://earl-of-code.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/94638a861184c792de1d164a7b17eef0fa402b41.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins service going down on Windows Slave

2018-11-26 Thread John Mellor
We have that problem all the time. IMHO the JNLP connectivity to the master is 
not robust enough to be used.

I have tried setting up the agent connection as a service per the Jenkins doc, 
but it still cannot survive momentary network or performance outages. The only 
way that I have managed to get this machine consistent, is to reboot the 
Windows machine and the service will shortly re-establish connectivity. JNLP 
connections are just-plain defective.



On Mon, 2018-11-26 at 07:06 -0800, gotviser...@gmail.com wrote:
Hello,

We have a Windows Server 2016 Jenkins Slave.  The Jenkins service in this slave 
goes down at times.  We then go back and start it manually though the service 
is set to start automatically.  Need help figuring out what's causing it to go 
down and why it isn't coming back online on its own.

-- 
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/0643151142ab642b3a0117ea0b42ab1e41ccfda3.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Re: deploy non-Java (C++ DLL) to artifactory

2018-10-22 Thread John Mellor
On Mon, 2018-10-22 at 12:00 +0200, Jonathan Bergh wrote:
We have a problem where we are trying to deploy non-Java artifacts to 
Artifactory for inclusion in a Java application install.

We are using Jenkins and Gradle for the CI system, and the gradle 'cpp' plugin 
to build the C++ libraries for the project.

Having gotten the following message (and not DLL's deployed), we have included 
the Maven gradle plugin (and are also manually creating a POM) but we think the 
Maven 'install' task is missing because we are running this together with the 
'cpp' plugin.

Does anyone know if this is the correct dianogsis and if so, whether there is a 
workaround for this? Or perhaps we are doing it entirely incorrectly?

You do not specify which version of Artifactory you are using. The free version 
does not store anything other than jars and tars. Artifactory wants big $$ for 
more than that.

-- 
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/9bf93cdab7602c91bfe6c7e11ef3440674b43f56.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


RE: Shutting down a Jenkins instance that was still starting up

2018-08-16 Thread 'Burrows, John' via Jenkins Users
A couple more things to check:


1)  Check where the Jenkins Service is pointing to, should be a Jenkins.exe 
file located in folder where Jenkins is installed. Listed under Path to 
executable in Service properties:
For example, this is my entry - D:\SCM\Apps\Jenkins\jenkins.exe

In same folder as listed in Service, check your Jenkins.xml file to ensure it 
only has one  key line in  the xml file, also make sure that you 
have your  key in the xml file and it points to a valid Java 1.8 
version of Java. Include the path in this key, if Java is not in the system 
path, then you need to point directly at it.


jenkins
Jenkins
This service runs Jenkins continuous integration 
system.


D:\SCM\Apps\Java\Ora_jdk1.8.0_144x64\bin\java


  -Xrs -Xms2048m -Xmx8192m 
-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar 
"%BASE%\jenkins.war" --httpPort=8080

rotate




2)  Make sure there are no other applications using port 8080 (80), if you 
have something like Apache Tomcat, or IIS, it could be using the same port and 
you could have a conflict. You can always change your httpPort in your 
Jenkins.xml file to 8082 or 8090, etc.

Hope this helps.

Thanks,
John

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Steve K
Sent: Thursday, August 16, 2018 9:53 AM
To: Jenkins Users 
Subject: Re: Shutting down a Jenkins instance that was still starting up


Thanks for your ideas John.
I have attempted what you suggested multiple times, but it does not go smoothly.

  *   I shut down Jenkins if necessary (often, it is already down).
  *   Via task manager, I see that Java is running.
  *   I attempt to kill the Java process, but, even though I am an 
administrator, I get "Access Denied".
  *   I attempt to start Jenkins, but that fails (I believe that's when the 
subject of this thread is generated "Shutting down a Jenkins instance that was 
still starting up".
  *   I resort to -- Disabling the Jenkins service.
  *   Reboot the machine (seems to be the only way to get rid of the Java 
process).
  *   After the machine completes the reboot, I enable the service and start 
Jenkins.
  *   Again, I'll see two two "Starting D:\Jenkins\jre\bin\java..." commands in 
the jenkins.wrapper.log  I don't know where the second command comes from.


On Thursday, August 16, 2018 at 6:55:59 AM UTC-4, Burrows, John wrote:
Steve,

Shut down Jenkins, then using Task Manager, check for any rogue Jenkins or Java 
processes running on that machine and if any found, kill those processes.


Start Jenkins back up.

You should only have one Jenkins and one Java process running on the Jenkins 
Master, unless you are also running jobs on that server.
See if that helps.

John

On Aug 15, 2018, at 12:02 PM, Steve K > 
wrote:
Hello,

We have been experiencing periodic crashes of the Jenkins server (almost one 
per week).
It's bad enough that the system goes down, but bringing it back up has been 
problematic as well.

We are running Jenkins version 2.89.2 on Windows Server 2008 R2 Standard.

Here's a look at my jenkins.err.log:

Aug 15, 2018 9:20:20 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file 
C:\Users\lx00057\AppData\Local\Temp\winstone\jenkins.war
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @669ms to org.eclipse.jetty.util.log.JavaUtilLog
Aug 15, 2018 9:20:20 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.handler.ContextHandler 
setContextPath
WARNING: Empty contextPath
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor 
visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
startScavenging
INFO: Scavenging every 60ms
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started 
w.@3cbe{/,file:///D:/Jenkins/war/,AVAILABLE}{D:\Jenkins\war}<mailto:w.@3cbe%7b/,file:///D:/Jenkins/war/,AVAILABLE%7d%7bD:\Jenkins\war%7d>
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.AbstractConnector doStop
INFO: Stopped 
ServerConnector@172e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080<http://0.0.0.0:8080>}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
stopScavenging
INFO: Stopped scavenging
Aug 15, 2018 9:20:21 AM hudson.WebAppMain contextDestroyed
INFO: Shutting down a Jenkins instance

Re: Shutting down a Jenkins instance that was still starting up

2018-08-16 Thread 'Burrows, John' via Jenkins Users
Steve,

Shut down Jenkins, then using Task Manager, check for any rogue Jenkins or Java 
processes running on that machine and if any found, kill those processes.

Start Jenkins back up.

You should only have one Jenkins and one Java process running on the Jenkins 
Master, unless you are also running jobs on that server.

See if that helps.

John

On Aug 15, 2018, at 12:02 PM, Steve K 
mailto:steve.kerxha...@carestream.com>> wrote:

Hello,

We have been experiencing periodic crashes of the Jenkins server (almost one 
per week).
It's bad enough that the system goes down, but bringing it back up has been 
problematic as well.

We are running Jenkins version 2.89.2 on Windows Server 2008 R2 Standard.

Here's a look at my jenkins.err.log:

Aug 15, 2018 9:20:20 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file 
C:\Users\lx00057\AppData\Local\Temp\winstone\jenkins.war
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @669ms to org.eclipse.jetty.util.log.JavaUtilLog
Aug 15, 2018 9:20:20 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.handler.ContextHandler 
setContextPath
WARNING: Empty contextPath
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor 
visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
startScavenging
INFO: Scavenging every 60ms
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@3cbe{/,file:///D:/Jenkins/war/,AVAILABLE}{D:\Jenkins\war}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.AbstractConnector doStop
INFO: Stopped ServerConnector@172e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
stopScavenging
INFO: Stopped scavenging
Aug 15, 2018 9:20:21 AM hudson.WebAppMain contextDestroyed
INFO: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
at hudson.WebAppMain.contextDestroyed(WebAppMain.java:388)
at 
org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:898)
at 
org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:545)
at 
org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:873)
at 
org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:355)
at 
org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1507)
at 
org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1471)
at 
org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:927)
at 
org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:271)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
at 
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at 
org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
at 
org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
at org.eclipse.jetty.server.Server.doStop(Server.java:523)
at 
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at winstone.Launcher.shutdown(Launcher.java:307)
at winstone.Launcher.(Launcher.java:167)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:294)
at Main.main(Main.java:132)

Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.handler.ContextHandler doStop
INFO: Stopped w.@3cbe{/,null,UNAVAILABLE}{D:\Jenkins\war}
Exception in thread "Jenkins initialization thread" 
java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClas

How to create a pipeline job from inside a jenkinsfile?

2018-05-18 Thread John Lonergan
Is it possible to create a multiranch pipeline job from a script in another 
pipeline job.
All driven by Jenkinsfiles?

-- 
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/4507106a-64c5-454b-bcfc-fcbe65a1992b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Project with several Git repositories

2018-05-03 Thread John Mellor
On Thu, 2018-05-03 at 16:26 +, Mark Waite wrote:
. . .It seems like you're describing a very good use case for a Pipeline shared 
library.  Each repository and each branch then has a very simple Jenkinsfile 
which loads the shared library and calls it.  That's the technique used for 
Jenkins plugin 
development

Correct me if I am mistaken, but that would imply that I would still need to 
insert an identical Jenkinsfile into 155 projects in order to actually use the 
@library. That's not improving anything. I want to specify the Jenkinsfile from 
a different git repo and not alter all the other 155 repos, and there is no 
means of doing this as the pipeline plugins are currently written. That should 
be a base use-case, and it seems to have been missed. As a result, every 
project build that is changed over to pipelines needs to be modified for very 
questionable reasons.

-- 
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/1525371033.24903.14.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Re: Project with several Git repositories

2018-05-03 Thread John Mellor
On Thu, 2018-05-03 at 15:38 +0200, Sébastien Hinderer wrote:
> . . .
> 
> So just to make sure we are talking about the same thing, that means
> checking the "None" radio button in the souce code managemnet area,
> then
> check the "run builds remotely (from scripts)" checkbox and then,
> finally, in the commands used to build, clone all the required
> repositories.

I have a bit of a different situation, where I want to use a common
Jenkinsfile across a large number of git repos.  Duplicating the
Jenkinsfile everywhere is a very poor solution, so I checkout the
project containing the Jenkinsfile, delete the .git directory in the
WORKSPACE, and then use the scm directives in the Jenkinsfile to
checkout the real project on top.  Its far from ideal, but for some
reason it looks like this very common scenario is not supported.

If you have a better way to do this...

-- 
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/1525357081.24903.6.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


RE: Alert if master gets disconnected or if any shared slave goes offline.

2018-04-17 Thread 'Burrows, John' via Jenkins Users
n’t send anything out
 } else {
   //Send out an email notification for each Node that is OffLine/Down
   sendMail(computer.name, slave.getComputer().getOfflineCause().toString())
 }
 if (slave.getComputer().isTemporarilyOffline()) {
  if 
(!slave.getComputer().getOfflineCause().toString().contains("Disconnected by")) 
{
 computer.setTemporarilyOffline(false, 
slave.getComputer().getOfflineCause())
  }
 } else {
 computer.connect(true)
 }
   }
}
println ("Number of Offline Nodes: " + numberOfflineNodes)
println ("Number of Nodes: " + numberNodes)
--Script End

I hope this helps.

Thanks,
John

---
John Burrows


From: bmat...@gmail.com [mailto:bmat...@gmail.com] On Behalf Of Baptiste Mathus
Sent: Tuesday, April 17, 2018 5:26 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Alert if master gets disconnected or if any shared slave goes 
offline.

Hello,

This question is specific to CloudBees products. Please open a ticket on the 
usual commercial support https://support.cloudbees.com/hc/en-us/requests/new

Thanks

2018-04-17 11:02 GMT+02:00 Sunshine 
<saranya.nag...@gmail.com<mailto:saranya.nag...@gmail.com>>:
Hi all ,

Is there a way via groovy scipt to check if a master gets disconnected from the 
JOC ?

Also ,

To check for any offline shared slave that's connected at JOC level ,
I used com.cloudbees.opscenter.server.model.Sharedslaves to display offline 
slaves ,
But it doesn't seem to work.

--
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<mailto:jenkinsci-users%2bunsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a38c93b2-57bd-475c-8d17-f02cc67c89e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4M-fxAS6%3D%3DwMGCVRPczzHTWYsK7S8wiS%3DMY0LNs_cx6w%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4M-fxAS6%3D%3DwMGCVRPczzHTWYsK7S8wiS%3DMY0LNs_cx6w%40mail.gmail.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.

[https://www.aciworldwide.com/-/media/aci-footer]<http://www.aciworldwide.com>
This email message and any attachments may contain confidential, proprietary or 
non-public information. The information is intended solely for the designated 
recipient(s). If an addressing or transmission error has misdirected this 
email, please notify the sender immediately and destroy this email. Any review, 
dissemination, use or reliance upon this information by unintended recipients 
is prohibited. Any opinions expressed in this email are those of the author 
personally.

-- 
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/DM2PR0801MB074787C751346A97A6EA46E8F2B70%40DM2PR0801MB0747.namprd08.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Solutions for publishing AMI's from Jenkins

2018-04-17 Thread John
Hello,

I'm using Jenkins to build and deploy large variety of projects.  Most are 
written in Python, Groovy, Java or Javascript (Node).  

For a long list of irrelevant reasons, I'd like to start deploying my 
projects as AMI's as well as docker images.  Basically, if all goes well, 
we'd be able to grab an AMI, spin up an EC2 instance with it, and have a 
running instance of the app.

Is there a standard way to go about constructing AMI's with Jenkins?

I see that Packer seems fairly popular:  https://www.packer.io

Thanks,

-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/70d8b1eb-dfff-430c-8e6c-b0e9a105391d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Pipeline - loop over multi string variable with groovy

2018-04-04 Thread John
I'm trying to loop over a var that contains multiple strings (file paths), 
and then run a shell script against each one. But for some reason 
everything i try loops over every single letter of the string. Here is my 
code:

def call(Map config) {

  node('terraform-slave') {
cleanWs()
checkout scm

stage('Plan') {
  commitChangeset = sh(returnStdout: true, script: 'git diff-tree 
--no-commit-id --name-only -r HEAD').trim()
}
stage('EchoToVerify') {
  tfvars = commitChangeset.replaceAll("terraform.tfvars", "")
  echo tfvars
}
stage('Loop') {
  loop(tfvars)
}
  }
}

def loop(list) {
  list.each {
sh "(cd ${it}; cat terraform.tfvars)"
  }
}



If you see the EchoToVerify stage, that works fine. Multiple file paths are 
echo'ed, like so:

/file/to/dir1
/file/to/dir2
/file/to/dir3

But when the Loop starts, it loops against each letter.. f, i, l, e, etc

The only way I have been able to get it work is is by doing this:

def loop(list) {
  for (dir in [list]) {
sh "(cd ${it}; cat terraform.tfvars)"
  }
}

However it only works when there is one value in the variable. It seems to 
want to iterate over ${it} immediately, before going to the next shell 
command (cat terraform.tfvars). It seems like it tries to "cd" to the next 
directory immediately.

Thanks for the help!




-- 
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/3b411f4a-56f4-4c04-a9a4-6fde13f2239e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade Path for Jenkins/Hudson

2018-04-02 Thread John Mellor
On Fri, 2018-03-30 at 11:01 -0700, Thomas Dunlap wrote:
I have inherited an AccuRev Jankins/Hudson CI.  Jenkins version 1.472.  The 
previous developer stopped programming in 2012.  I am trying to
determine the best way to upgrade the software. Since the development is old I 
thought it would be best to see if I can get the 2 applications to talk.
I have updated the licensing for Accurev and can access the CI development 
platform through the AccurRev WebGUI.  So half the problem is functioning.

We are operating in the Windows OS environment.  I tried to execute Jenkins 
with  no luck.

I checked the Hudson services and the Event Viewer and have determined that the 
service will not start. From the Services.cpl I start the Hudson services and 
it immediately crashes. Whether run as a location system account or an admin 
account.

Can it be fixed by replacing the Hudson WAR file with the same version WAR file.

Any help would be appreciated.

I sympathize with you. I have one Jenkins instance in the same scenario, stuck 
back at Jenkins 1.656 release. I cannot move it forward without breaking 300+ 
mission-critical jobs.


One of the most serious problems with Jenkins today is that API breakage is 
routine, making it very difficult to even do minor upgrades without breaking 
your builds. The root cause appears to be the team not checking that a change 
works against all 2000+ plugins. Test cases are usually inadequate or 
nonexistant, which does not help. Virtually every upgrade breaks something 
unexpectedly. Backward compatibility seems to be a new concept for some reason. 
E.g. the decision to change a blacklist into a whitelist without fixing the 
2000+ dependent plugins is clearly irresponsible. Or git or gerrit or github 
breakage because someone does not understand it. Or the repeated security 
"cleanups" that break selected builds without fixup changes. IMHO, its a bunch 
of amateurs driving the bus.

Another part of the problem is probably the language that Jenkins is written 
in.   Bugs per kloc is essentially fixed, independent of the language, so it is 
clear that Java is not the correct choice, resulting in far too much code to 
get the job done correctly.


Realistically, in order to move up to current, you are going to have to revisit 
every one of your workflows and redesign them as either the underlying 
assumptions have been broken, or the API no longer works the same way. Many 
will port forward easily, while others will need a complete redesign. Keeping 
on top of updates is a full-time dedicated job here for one person, which tells 
youjust how bad the issue is. If there was a better-managed orchestration 
engine, we would have moved there a long time ago in order to fix the 
complacency about the routine breakages.

-- 
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/1522678461.3049.113.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Slaves: How to configure

2018-03-23 Thread 'Burrows, John' via Jenkins Users
Ana,

You need to ensure that the credentials you are choosing in the server 
configuration page are valid. It looks like you are not using a valid User ID 
and Password that allows the connection via SSH.

John

On Mar 23, 2018, at 3:54 AM, Ana MB 
<amar...@bufetedemarketing.com<mailto:amar...@bufetedemarketing.com>> wrote:

Hi!

I did it and now, there's a new error:


[https://lh3.googleusercontent.com/-g7mozSU3-98/WrSxu8ObT0I/AOs/nYnf1KZlwPQY1U_UCkf_E4apxwGrGXWBwCLcBGAs/s400/5.jpg]<https://lh3.googleusercontent.com/-g7mozSU3-98/WrSxu8ObT0I/AOs/nYnf1KZlwPQY1U_UCkf_E4apxwGrGXWBwCLcBGAs/s1600/5.jpg>

And 3 minutes later the error is:


[https://lh3.googleusercontent.com/-pjITKIzRoik/WrSyfU2K1LI/AO0/sHqQLk3j6l4Xv4b00H2w2duKbOohC3tSgCLcBGAs/s400/6.jpg]<https://lh3.googleusercontent.com/-pjITKIzRoik/WrSyfU2K1LI/AO0/sHqQLk3j6l4Xv4b00H2w2duKbOohC3tSgCLcBGAs/s1600/6.jpg>


How could I solve it?

Thanks s much!



El jueves, 22 de marzo de 2018, 13:00:47 (UTC+1), Ana MB escribió:
Hi guys!

I'm fighting to configure slaves in my Jenkins, but I am not able to do it
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...


[https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s400/1.jpg]<https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s1600/1.jpg>

[https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s400/2.jpg]<https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s1600/2.jpg>

I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!

--
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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4380fddb-b851-404c-aed0-c16e5b287cc9%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/4380fddb-b851-404c-aed0-c16e5b287cc9%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.

[https://www.aciworldwide.com/-/media/aci-footer]<http://www.aciworldwide.com>
This email message and any attachments may contain confidential, proprietary or 
non-public information. The information is intended solely for the designated 
recipient(s). If an addressing or transmission error has misdirected this 
email, please notify the sender immediately and destroy this email. Any review, 
dissemination, use or reliance upon this information by unintended recipients 
is prohibited. Any opinions expressed in this email are those of the author 
personally.

-- 
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/0E23C6A9-B5D9-4591-8D03-6B8E4DBAD356%40aciworldwide.com.
For more options, visit https://groups.google.com/d/optout.


RE: Help with Slaves: How to configure

2018-03-22 Thread 'Burrows, John' via Jenkins Users
I agree with Mark 100%, and have found the best way for Windows Jenkins Nodes, 
is to launch the JNLP Jenkins Agent using Windows Task Scheduler set on System 
Startup.

We (my company) uses SSH to launch non-Windows Agents and JNLP for Windows 
Agents. We have more than a dozen Jenkins Masters and close to 100 Jenkins 
Agents.

Thanks,
John


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Mark Waite
Sent: Thursday, March 22, 2018 11:15 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Help with Slaves: How to configure

The picture says "unable to access agent.jar".  I think that means you need to 
download the agent.jar file into the directory where you are running the 
command which launches that agent.

I continue to believe that you may be making a more fundamental mistake than 
the command line arguments.

If you want to run an agent, and that agent is a Linux agent (or FreeBSD or 
macOS or Solaris or Raspbian or ...), then my first preference is to use the 
"ssh based" technique to start the agent, instead of using the JNLP based 
technique to start the agent.

If you want to run an agent and that agent is Windows, then you'll need to use 
the JNLP based method.  In my small environments, I've preferred to configure 
Windows agents to launch themselves from a command line on the Windows agent 
computer, rather than trying to make the Jenkins master start the agent.

Mark Waite

On Thu, Mar 22, 2018 at 9:07 AM Ana MB 
<amar...@bufetedemarketing.com<mailto:amar...@bufetedemarketing.com>> wrote:
This is what I've done and I tried writing:
 $ java -jar agent.jar -jnlpUrl 
http://yourserver:port/computer/agent-name/slave-agent.jnlp

But it's still showing:


[https://lh3.googleusercontent.com/-9To2O1zHHbU/WrPDgCzQikI/AOc/Wn4AIHmGbNkMVuOFyFxwdPKNaC-ixPAjwCLcBGAs/s400/3.jpg]<https://lh3.googleusercontent.com/-9To2O1zHHbU/WrPDgCzQikI/AOc/Wn4AIHmGbNkMVuOFyFxwdPKNaC-ixPAjwCLcBGAs/s1600/3.jpg>

And I don't know to resolve it...

Thanks so much.

El jueves, 22 de marzo de 2018, 14:46:31 (UTC+1), Mark Waite escribió:

On Thu, Mar 22, 2018 at 6:57 AM Ana MB 
<ama...@bufetedemarketing.com<mailto:ama...@bufetedemarketing.com>> wrote:
I'm pretty new in this field, so I don't know what I'm doing clearly. I 
read about it but I don't know how to do it works.

What argument is needed for -jnlpURL?


 the JNLP URL of the Jenkins master .

Please read the wiki page 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds .

Mark Waite

Thanks so much!!!



El jueves, 22 de marzo de 2018, 13:48:22 (UTC+1), Mark Waite escribió:
It appears that you're launching a JNLP based agent from the master without 
providing the JNLP URL of the Jenkins master.  The -jnlpURL argument needs a 
value.

It also appears that you're using an outdated name for the jar file.  I believe 
it is now called "agent.jar" instead of "slave.jar".

I'm not sure why you'd launch an agent from the master without having that 
agent run somewhere else (on another machine, for example).  Is this an 
experiment, or intentional?

Refer to 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Launchagentheadlessly
 .
On Thu, Mar 22, 2018 at 6:01 AM Ana MB 
<ama...@bufetedemarketing.com<mailto:ama...@bufetedemarketing.com>> wrote:
Hi guys!

I'm fighting to configure slaves in my Jenkins, but I am not able to do it
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...


[https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s400/1.jpg]<https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s1600/1.jpg>

[https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s400/2.jpg]<https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s1600/2.jpg>
I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!
--
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<mailto:jenkinsci-use...@googlegroups.com>.

To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ffa2e08a-e931-401a-8447-6fe44cd840ab%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/ffa2e08a-e931-401a-8447-6fe44cd840ab%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google

RE: Help with Slaves: How to configure

2018-03-22 Thread 'Burrows, John' via Jenkins Users
Make sure the agent.jar file is located in the location where you are running 
the java command from.

You can manually download the agent.jar file from 
http://YOURSERVERNAME/jnlpJars/agent.jar

Thanks,
John


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Ana MB
Sent: Thursday, March 22, 2018 11:07 AM
To: Jenkins Users <jenkinsci-users@googlegroups.com>
Subject: Re: Help with Slaves: How to configure

This is what I've done and I tried writing:
 $ java -jar agent.jar -jnlpUrl 
http://yourserver:port/computer/agent-name/slave-agent.jnlp

But it's still showing:


[https://lh3.googleusercontent.com/-9To2O1zHHbU/WrPDgCzQikI/AOc/Wn4AIHmGbNkMVuOFyFxwdPKNaC-ixPAjwCLcBGAs/s400/3.jpg]<https://lh3.googleusercontent.com/-9To2O1zHHbU/WrPDgCzQikI/AOc/Wn4AIHmGbNkMVuOFyFxwdPKNaC-ixPAjwCLcBGAs/s1600/3.jpg>

And I don't know to resolve it...

Thanks so much.

El jueves, 22 de marzo de 2018, 14:46:31 (UTC+1), Mark Waite escribió:

On Thu, Mar 22, 2018 at 6:57 AM Ana MB 
<ama...@bufetedemarketing.com> wrote:
I'm pretty new in this field, so I don't know what I'm doing clearly. I 
read about it but I don't know how to do it works.

What argument is needed for -jnlpURL?


 the JNLP URL of the Jenkins master .

Please read the wiki page 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds .

Mark Waite

Thanks so much!!!



El jueves, 22 de marzo de 2018, 13:48:22 (UTC+1), Mark Waite escribió:
It appears that you're launching a JNLP based agent from the master without 
providing the JNLP URL of the Jenkins master.  The -jnlpURL argument needs a 
value.

It also appears that you're using an outdated name for the jar file.  I believe 
it is now called "agent.jar" instead of "slave.jar".

I'm not sure why you'd launch an agent from the master without having that 
agent run somewhere else (on another machine, for example).  Is this an 
experiment, or intentional?

Refer to 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Launchagentheadlessly
 .
On Thu, Mar 22, 2018 at 6:01 AM Ana MB 
<ama...@bufetedemarketing.com<mailto:ama...@bufetedemarketing.com>> wrote:
Hi guys!

I'm fighting to configure slaves in my Jenkins, but I am not able to do it
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...


[https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s400/1.jpg]<https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s1600/1.jpg>

[https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s400/2.jpg]<https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s1600/2.jpg>
I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!
--
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<mailto:jenkinsci-use...@googlegroups.com>.

To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ffa2e08a-e931-401a-8447-6fe44cd840ab%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/ffa2e08a-e931-401a-8447-6fe44cd840ab%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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/04f37c3e-722b-43c7-9d9f-e26ca81da3b6%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/04f37c3e-722b-43c7-9d9f-e26ca81da3b6%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1282e395-435b-4774-a9e3-3ae421a9a7b7%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/1282e395-435b-4774-a9e3-3ae421a9a7b7%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.
___

Re: Git Plugin Issues

2018-03-04 Thread 'Burrows, John' via Jenkins Users
Hi Ram,

Yes, cloning from the command line works fine in all the instances.

We can also get around the issue by creating a credential in Jenkins using the 
private key of the user, but for some reason the Public Key no longer works.

Thanks,
John

On Mar 4, 2018, at 1:31 AM, Ramanathan Muthaiah 
<rus.cah...@gmail.com<mailto:rus.cah...@gmail.com>> wrote:

Have you tried running, manually from command line, 'git clone' using the creds 
in the problematic nodes ?

/Ram

[https://www.aciworldwide.com/-/media/aci-footer]<http://www.aciworldwide.com>
This email message and any attachments may contain confidential, proprietary or 
non-public information. The information is intended solely for the designated 
recipient(s). If an addressing or transmission error has misdirected this 
email, please notify the sender immediately and destroy this email. Any review, 
dissemination, use or reliance upon this information by unintended recipients 
is prohibited. Any opinions expressed in this email are those of the author 
personally.

-- 
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/0F3A6A17-DC54-48D0-B2A7-5E8E7C333771%40aciworldwide.com.
For more options, visit https://groups.google.com/d/optout.


Git Plugin Issues

2018-02-27 Thread 'Burrows, John' via Jenkins Users
Hi All,

I have seen a few write-ups about this and just want to get some clarification, 
as I have not been able to solve this as of yet in our environments.

We are using Jenkins Master v2.89.4 on Windows 2008 R2 Servers. We have the 
latest Git (3.8.0) & Git Client (2.7.1) plugins installed.

We have multiple Jenkins Nodes/Slave Servers setup, using Windows, Linux, AIX, 
Solaris as the OS. The Agent Remoting version is v3.14, Java version matches 
between the Jenkins Masters (v1.8.0) and all of the Jenkins Nodes/Slaves.

We launch the Jenkins Node/Slave Agents using Java Web Start (Windows OS) or 
via SSH (Linux, AIX, Solaris). The Windows JNLP Agents run using a Service ID 
that has Administration privileges on the Windows Server. The SSH agents have a 
local id (same name as the Service ID) with the privileges necessary as well.

BitBucket is setup to utilize SSH for communications.

When we require the use of Git to interact with our BitBucket/Git Projects and 
Repositories, we set the following up to ensure proper communication between 
the Jenkins Nodes/Slave Servers and BitBucket/Git:


1)  We ensure that the Java version in use has the certificates in the 
cacerts for the BitBucket server we interact with for source code

2)  We create ssh keys for the above mentioned Service ID and ensure that 
they are in the .ssh folder under the Users Profile and Home directories.

3)  We copy the same rsa_id.pub ssh key to BitBucket and add the key to the 
Service ID account SSH Keys listings under the Service ID's Profile.

4)  We have credentials created on each Jenkins Master (Network ID and 
Password) for the Service Account, as the BitBucket server utilizes LDAP to 
authenticate as well as the Windows Servers and on the Linux, AIX and Solaris 
machines, we setup the local user with the same password. These credentials are 
chosen in the SCM Section of the Jenkins Job for the Git Repository 
configuration section.

Recently, we have come across the issue where the interaction with Git fails on 
some Windows Servers and some Linux or AIX servers. While we can have one 
Windows server failing and another working just fine on the same Jenkins 
Master. Same with the other OS based Nodes/Slaves. This was working fine 
earlier this year, but in the last 6-8 weeks, it has started to fail for some 
existing servers that worked fine before, and for some servers that have been 
Jenkins Nodes, but we recently added the interaction to Git.

We have 10 Jenkins Masters all set up identically, and as stated above, follow 
the same setup of every Jenkins Node/Slave as well.

Here are the errors we are running into (Credentials Unix BitBucket Groovy are 
the name of the credentials commonly used across all platforms):


Building remotely on XXXJENKINSNODEXXX in workspace d:\scm\checkout\John-Test

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe rev-parse --is-inside-work-tree # 
 > timeout=10

Fetching changes from the remote Git repository

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe config remote.origin.url 
 > ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git # timeout=10

Fetching upstream changes from 
ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe --version # timeout=10

using GIT_ASKPASS to set credentials Unix Bitbucket Groovy

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe fetch --tags --progress 
 > ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git 
 > +refs/heads/*:refs/remotes/origin/*

ERROR: Error fetching remote repo 'origin'

hudson.plugins.git.GitException: Failed to fetch from 
ssh://g...@bitbucket..com:7999/projectname/reponame.git

at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)

at hudson.scm.SCM.checkout(SCM.java:495)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)

at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)

at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)

at hudson.model.Run.execute(Run.java:1724)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

at hudson.model.ResourceController.execute(ResourceController.java:97)

at hudson.model.Executor.run(Executor.java:429)

Caused by: hudson.plugins.git.GitException: Command 
"D:\SCM\Apps\Git\2.8.2\bin\git.exe fetch --tags --progress 
ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git 
+refs/heads/*:refs/remotes/origin/*" returned status code 128:

stdout:

stderr: Permission denied (publickey).

fatal: Could not read from remote repository.



Please make sure you have the correct ac

Re: Blue Ocean not loading

2018-01-19 Thread John
I opened up the error console and there are a lot of css errors, declaration 
dropped. Such as: error parsing background image, display, flex wrap, align 
items. I am running on a locked down system with Firefox 10. I am wondering if 
that's the problem.

-- 
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/0da4bb8f-3e51-49f9-96f6-78461c10e456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Blue Ocean not loading

2018-01-19 Thread John
My current work environment is Centos with no network connection. I had to 
install Jenkins on a separate Windows machine to pull all the plugins and 
dependencies. Blue Ocean starts up fine in Windows so I copied the entire 
plugins folder into the Linux system. 

Jenkins installs everything with no errors but Blue Ocean won't load. Clicking 
on the link just takes me to a white page with a blue progress bar above. It 
stops at around 90%. I don't see any errors in the "All Jenkins Logs". What 
other logs or resource can I look at to troubleshoot this?

Jenkins 2.89.2
Blue Ocean 1.4.0

-- 
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/1a886ee8-d937-45df-9398-74529b5d235f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Email When Slave Goes Offline?

2017-12-11 Thread John Bobinyec
Is there some way to send an admin an email when the master notices that a 
slave has gone offline?

Thanks,
John Bobinyec

-- 
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/d7a7ea39-779a-4209-aad5-dcd40f9c2e02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Setting up security

2017-12-06 Thread John E Peterson
Before I break anything, I need to clarify something about setting up 
Active Directory authentication.

Actually setting up the domain seems straight forward.  But...

It asks for a backup user (Jenkins Own Directory), so I type in jpeterson.  
Ok?  I have been using NO security.  So, how does it know who I am or what 
my password would be for this?

I also don't want ALL domain users to be able to access this.  Only a 
"group".  I assume this is configured under the matrix area?  I get two 
long sections - unauthorized user (if I require authentication, why does 
this even show?) and administrator.  I assume I want ALL checksmarks for 
administrator.  But, how does it KNOW me@mydomain is an admin?  Where is 
that configured if nothing has ever been configured before?

It also asks for a group.  Is this an AD authentication group?  Such as 
Jenkins_Users and Jenkins_Admins?  And then it determines by which AD group 
people are in which permissions they get?

There needs to be a clear instruction manual on step-by-step for this as 
this is such a critical function and if you screw up, you can't get back in 
and have to restore a backup.

Bottom line:
I want to (first time) setup security.
I want me (jpeterson) to be the backup user in Jenkins Own Directory (which 
I have never added anybody)
I want to be able to have two AD authenticated sets of users - 
Jenkins_Users and Jenkins_Admins so I can limit permissions for the Users.  
But not clear if this is setup intneral to Jenkins or via AD groups.

Thanks

Note - I assume that:
Domain Name, Domain Controller are as expected
Site is an arbitrary name I give?
Bind ID and Bind PWD are the authorized domain admin credentials?

Once again, there is no real instructional setup help even on the plugin 
page.

-- 
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/f329a188-10af-4501-8d3b-e4519e5ccd7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Scripting in Jenkins

2017-10-17 Thread John Mellor
On Tue, 2017-10-17 at 10:03 -0700, Thor Waway wrote:
Hello,

This is a bit of newbie question so I apologize in advance.


  *   I have 2 nodes currently set up; a MASTER and a WORKER node.


  *   One of the steps in my declarative pipeline points to deploy-script.sh. 
The contents of  deploy-script.sh:
  *
#!/bin/sh

whoami


While ssh'ed into WORKER node, from the workspace directory, I am able to run

  *
sh ./deploy-script.sh

and get the username of the current user (meaning no permission denied errors). 
Yet when this same command runs (in the content of steps defined in a 
JenkinsFile) I get a Permission Denied error


Two things I noticed while trying to work through this issue
1). When I call sh and pass it a command directly, for example:
stage("Trial){
  steps{
   sh "whoami"
   sh  "pwd"
  }
}


I get:
[feature-jenkinsfile] Running shell script
+ whoami
worker-agent
[Pipeline] sh
[feature-jenkinsfile] Running shell script
+ pwd
/home/worker-agent/jenkins/workspace/feature-jenkinsfile




2). Yet when I call 'sh' and pass it a path to a file to run, as I do here:
stage('Trial2'){
  steps{
   sh "pwd"
   sh "./deploy-script.sh"
  }
}


  It appears that Jenkins creates a new temporary folder from within 
which it runs the script as can be seen by here:

[Pipeline] sh
[feature-jenkinsfile] Running shell script
+ pwd
/home/worker-agent/jenkins/workspace/feature-jenkinsfile
[Pipeline] sh
[feature-jenkinsfile] Running shell script
+ ./deploy-staging.sh
/home/worker-agent/jenkins/workspace/feature-jenkinsfile@tmp/durable-7e1f206b/script.sh:
 2: 
/home/worker-agent/jenkins/workspace/feature-jenkinsfile@tmp/durable-7e1f206b/script.sh:
 ./deploy-staging.sh: Permission denied

When I run `ls -l` from

What am I missing? What am I failing to take into account?  Would appreciate 
any feedback/explanations. Thanks

You are attempting to run a .sh file that does not have execute permission.

-- 
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/1508260756.6919.5.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Extended Email publisher sending multiple copies

2017-09-29 Thread John Lussmyer
I think some of the help for the "Recipients" list needs to be clariefied.
I hadn't realized that the general "Recipients" list was used in ADDITION
to any recipients for specific trigger emails.


--
CasaDelGato Sensible Email package:
https://sourceforge.net/projects/sensibleemail/

-- 
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/CADFKdfTvXSmW51f9q1d3TpGP04KEXgyi8_ML_RKr-u8g%2BJzPSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Native Linux memory leak in Jenkins master running in Docker?

2017-08-04 Thread John Hovell
For the last few weeks we've been experiencing container restarts due to 
Jenkins running out of memory in Docker. We allocated 3GB for the container 
and heap usage is quite low (a few hundred MB, limited to 512 MB) but after 
12-24 hours overall container usage grows to 3GB.

We're using the jenkins/jenkins:lts image from 
here https://hub.docker.com/r/jenkins/jenkins/ (version 2.60.2)

Jstat shows low memory usage and top shows that the Java process overall is 
taking up 1.3 GB (uptime is misleading because this is for the host not 
container). The other 1.7 GB of memory seems to be unaccounted for and 
thinking it is a memory leak in the Docker container, either from Jenkins 
or some forked process.

Has anyone seen this behavior or know what other tools I can use to try to 
figure out where the extra memory is getting eaten up? 

Thanks!

$ jstat -gc 7

 S0CS1CS0US1U  EC   EUOC OU   MC   
  MUCCSC   CCSU   YGC YGCTFGCFGCT GCT   

2048.0 2048.0  0.0   2047.0 166400.0 44755.3   341504.0   186831.1  157516.0 
135388.1 18816.0 14700.4   3841   31.287   8  1.827   33.114


$java -version

openjdk version "1.8.0_141"

OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15)

OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)


$ docker --version

Docker version 17.03.1-ce, build 7392c3b/17.03.1-ce


top - 19:09:38 up 8 days, 12:29,  0 users,  load average: 0.49, 0.57, 0.74

Tasks:   5 total,   1 running,   4 sleeping,   0 stopped,   0 zombie

%Cpu(s):  1.0 us,  0.5 sy,  0.0 ni, 98.4 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 
st

KiB Mem : 15402128 total,  2567768 free,  8970084 used,  3864276 buff/cache

KiB Swap:0 total,0 free,0 used.  5957332 avail Mem 


  PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND  
   

7 jenkins   20   0 6350548 1.320g  35608 S   0.7  9.0  41:18.58 java   
 

1 jenkins   20   01104  4  0 S   0.0  0.0   0:01.28 tini   
 

  560 jenkins   20   0   19956   3600   3036 S   0.0  0.0   0:00.03 bash   
 

15235 jenkins   20   0   19960   3532   3080 S   0.0  0.0   0:00.02 bash   
 

15240 jenkins   20   0   42792   3580   3092 R   0.0  0.0   0:00.00 top
 



-- 
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/b94f8313-a867-4349-b177-3fd329dd711f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Health Check URL

2017-08-01 Thread John Hovell


>From the docs:


https://wiki.jenkins.io/display/JENKINS/Metrics+Plugin


"The Healthcheck servlet runs the healthchecks defined against the Metrics 
API and returns the detailed status in JSON (or JSONP) format, while the 
high level status is reported by the HTTP status code.

These servlets are protected by security controls in order to ensure that 
they are not abused"


So, not sure how to configure it for use with a load balancer / reverse 
proxy. Typically I've seen healthchecks that will not respond to a request 
that has an x-forwarded-for header. This allows the load balancer (or 
anyone with direct access to the server port) to call the healthcheck but 
not for any entity in front of a load balancer.


On Monday, June 5, 2017 at 2:36:51 AM UTC-7, Light Stark wrote:
>
>
> Hey Daniel, After performing the check where does this plugin report the 
> result of the check?
> I am writing a http liveness probe and i need an endpoint url.  
> On Monday, September 5, 2016 at 3:10:28 AM UTC+5:30, Daniel Beck wrote:
>>
>> A real health check is provided by 
>> https://wiki.jenkins-ci.org/display/JENKINS/Metrics+Plugin 
>>
>>
>>

-- 
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/05768419-78e9-47bc-9259-6b5510a69924%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Credential read in pipelines

2017-07-17 Thread John Doe
Hey,

 is it possible to read credentials which are set by plugins while in 
pipeline mode ? For example credentials set by Publish Over CIFS plugin ?

My last question was ignored, hope for more luck this time ;)

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/a67a8d90-4648-41eb-9b97-0b230a39e5ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing / maintaining Jenkins on a Linux host machine

2017-07-11 Thread John Mellor
There are competing update philosophies to consider:
Ubuntu ships the latest (unstable) release of Jenkins all the time, while 
RedHat/CentOS/etc ships the stable version. I host on a Ubuntu VM, but 
definitely wish it was better tested. If stability is key, then Ubuntu may not 
be your best choice.


On Tue, 2017-07-11 at 16:44 +, Jason LeMauk wrote:

We are currently provisioning a physical server as our automation server. We 
are making considerations as far as what our native operating system should be 
on this physical machine.

We are going to use a Linux OS as our operating system. From the Jenkins 
download page, I can see that Jenkins’ package 
distribution is available to Red Hat / Fedora / CentOS (which we will not be 
using), as well as Ubuntu / Debian. I also notice that a Generic Java package 
(WAR) distribution is available.
·Am I correct in assuming that if we use a non-Ubuntu / non-Debian 
operating system, we can still install Jenkins via the WAR distribution without 
issue?
·If we are not able to install via WAR without issue, are we relegated 
to using Debian / Ubuntu if we’re going to install Jenkins on a Linux machine 
(with the possibility of Red Hat / Fedora / CentOS ruled out)?

It should probably be noted that we will likely install / upgrade on the 
Jenkins LTS release schedule.

Thanks for any guidance from anybody who may have experience installing / 
maintaining a Jenkins instance on a Linux machine!
Jason

-- 
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/1499792036.3165.5.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Problem when using Jenkins NodeJs pipeline plugin

2017-07-08 Thread John Doe
Hey,

I'm trying to get nodejs plugin working in pipeline, here is example code:
pipeline {
agent any
environment {
TESTGLOBALVARIABLE = 'TEST'
}
tools {
nodejs '7.7.3'
}


jenkins gives me this error:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 7: Invalid tool type "nodejs". Valid tool types: [ant, 
hudson.tasks.Ant$AntInstallation, 
org.jenkinsci.plugins.docker.commons.tools.DockerTool, git, 
hudson.plugins.git.GitTool, go, 
org.jenkinsci.plugins.golang.GolangInstallation, gradle, 
hudson.plugins.gradle.GradleInstallation, jdk, hudson.model.JDK, jgit, 
org.jenkinsci.plugins.gitclient.JGitTool, jgitapache, 
org.jenkinsci.plugins.gitclient.JGitApacheTool, 
hudson.plugins.msbuild.MsBuildInstallation, 
org.jenkinsci.plugins.MsTestInstallation, maven, 
hudson.tasks.Maven$MavenInstallation, 
jenkins.plugins.nodejs.tools.NodeJSInstallation, 
org.jenkinsci.plugins.vs_code_metrics.VsCodeMetricsInstallation] @ line 7, 
column 9.
   nodejs '7.7.3'
   ^


According to stacktrace nodejs is not recognized and output suggests me to use 
jenkins.plugins.nodejs.tools.NodeJSInstallation instead, so here is new attempt:


pipeline {
agent any
environment {
TESTGLOBALVARIABLE = 'TEST'
}
tools {
jenkins.plugins.nodejs.tools.NodeJSInstallation '7.7.3'
}


gives me this:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 7: unexpected token: 7.7.3 @ line 7, column 57.
   dejs.tools.NodeJSInstallation '7.7.3'
 ^



Any idea how to get this plugin working in pipeline mode ?


Thank you for any help or suggestions!

-- 
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/f8fabcb6-1749-4181-96c2-4e92968f171d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: vSphere Cloud Plugin - does it work ?

2017-07-04 Thread John Mellor
I take a snapshot as the pristine image, and for convenience make it the same 
name on all nodes. Then I configure a build cloud for the vsphere cloud 
instance (I use 3 for various purposes) and then configure a new node running 
as a slave computer running under your new vsphere cloud (instead of as a dumb 
slave for instance). Run the tests provided by the plugins, as it needs good 
vcenter and vsphere connectivity, and it just works. One caveat, I usually set 
the nodes up to snap back to the snapshot at the start of a job, which extends 
the job by 2 - 3 minutes. This allows me to debug after a job has failed, by 
locking the node offline and then digging into what was left. Doing it at the 
and of a job speeds things up, by makes it nearly impossible to diagnose a 
build problem.



On Mon, 2017-07-03 at 04:07 -0700, P wrote:
Hi John,

thanks for sharing your experience with this kind of "issues". Based on what 
you have sent I am giving up (at least for now) with creating new VMs and 
follow your steps.
How do you use vsphere plugin to reset the slave back ? Are you using VM 
snapshots ?

I would be grateful if you could send me your config changes :-)

Best regards
P.


On Tuesday, June 27, 2017 at 2:01:24 PM UTC+1, John Mellor wrote:
P asked:

>  So how do you guys use jenkins slaves on VMware ? Do you use existing VMs ?

I use vsphere slaves extensively, but only as existing VMs.  I never managed to 
get a dynamically-constructed slaves to actually work, but perhaps there is 
some magic combination of undocumented incantations that does it.  I have many 
Developers who leave all kinds of cruft around from their builds, install 
prereq packages, reconfigure ssh keys, ntp, dns, etc in their build steps.  I 
use the vsphere plugin to reset the slave back to a known-good condition at the 
start of the next build (that leaves the slave as the previous build left it, 
so I can debug what went wrong).

Its somewhat unfortunate that the plugin only uses vcenter api, as otherwise I 
could use the free version of esxi and also not need the $12k vcenter licence 
in this stack.  The software licences cost about 3x what the hardware costs, so 
you know something is wrong with that model.

For many job types, I also use the CloudBees Docker plugin to build jobs that 
do not build Docker images and do not require a different kernel or libc to 
build correct product.  It seems to be the only one that actually works, and 
provides the pristine environment for a lot less overhead.  I wish there was 
some kind of quality information associated with each Jenkins plugin, as there 
is a *LOT* of crap in the library.

I used to use the Debian pbuilder containers with a pretty large set of 
scripted wrappers in the C++ builds, but Docker images are an improvement.

If you need, I can send you my config changes that I use to thread the needle…



From: jenkins...@googlegroups.com 
[mailto:jenkins...@googlegroups.com] On Behalf Of P
Sent: June-27-17 03:17
To: Jenkins Users <jenkins...@googlegroups.com>
Subject: Re: vSphere Cloud Plugin - does it work ?

It looks like VSphere Cloud plugin is not very widely used 
So how do you guys use jenkins slaves on VMware ? Do you use existing VMs ?
I am a bit surprised nobody is creating dynamically VMs for Jenskins ...

Best regards
P.


On Tuesday, June 20, 2017 at 12:34:19 PM UTC+1, P wrote:
Hello all,

I am trying to use vSphere Cloud Plugin to create new VM for some test 
deployment.
Unfortunatelly it doesn't work and I don't really know why. Below is the error 
message I get when I press "Check Data" button
while defining "vSphere Build Step":
https://gist.github.com/anonymous/b355bed14171f8afa066dd18e8191179
I also include the configuration I use.

Can anybody have a look and tell me why it is failing ?
Kind regards
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-use...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7a37767a-285d-4b18-8ee6-2ac684a48e11%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/7a37767a-285d-4b18-8ee6-2ac684a48e11%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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/1499174621.13800.1.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins not indicating that there are updates for plugins

2017-06-30 Thread John Lussmyer
We are running Jenkins 1.616, and I've recently noticed that we no longer 
receive notifications that there are new versions of plugins.
When I go to Manage Jenkins, Manage Plugins, the Updates tab is always 
empty.
I've manually checked, and there are multiple plugins that have new 
versions available.

How can I get the update checking to work again?

-- 
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/3365613d-3c14-4811-b16b-33b30a6b6f80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ${CHANGES,showDependencies="true"} not working?

2017-06-28 Thread John Lussmyer
On Wednesday, June 28, 2017 at 1:22:26 PM UTC-7, slide wrote:
>
> BUILD_NUMBER is an environment variable, CHANGES is a token macro. Does 
> the text-file-operations plugin use the token macro plugin to replace 
> things?
>

Can't tell from the description if it uses the Token Macro Plugin or not.
Sigh, probably doesn't then.

Any suggestions for other techniques to get that information into a simple 
text file?

-- 
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/cf181478-a3ab-4a56-b419-2ad169a08117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


${CHANGES,showDependencies="true"} not working?

2017-06-28 Thread John Lussmyer
Im trying to use the text-file-operations plugin to create a file that has 
the changes for the current build.
I've added the build step (Create/Update Text file) and set the content of 
the file to be:
Build: ${BUILD_NUMBER}
${CHANGES,showDependencies="true"}
-


The file gets created, the ${BUILD_NUMBER} gets properly substituted, but 
the CHANGES does not.
Any suggestions on what to change/try next?

-- 
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/74e48663-b163-4212-9665-4cffd87933ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why doesn't Jenkins Update Center show certain plugins?

2017-06-28 Thread John Lussmyer
Jenkins 1.616, and no, the plugin was not already installed.
I finally figured out which link on the page could be used to download the 
plugin, and used the Advanced tab to manually install the plugin.

-- 
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/658be192-60bd-4a23-b150-d923a36738c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Gerrit trigger doesn't detect changes in Gerrit and run automatically CI

2017-06-27 Thread John Mellor
Hi Daniel,

The Gerrit plugin a really nice piece of work that is pathetically documented 
and poorly integrated with the co-requisite git plugin.  It works, but the 
working config settings are very non-obvious and the integration seems 
incomplete.

In the sourcecode management section under git, in the advanced/addition 
behaviours subsection, add strategy for choosing what to build and set it to 
Gerrit trigger.  That is probably the key item that gets your setup at least 
partially functional.

In the job, configure the Gerrit trigger to watch for patchset created, draft 
published and change merged.  That seems to be all that is actually required in 
real-world use.

Change your Gerrit trigger branch from plain to path and set it to the branch 
to build.

I also set a default pair of prarameters in the job, for when someone does a 
pushbutton build.  Se the intended GERRIT_BRANCH to (say) dev, and 
GERRIT_REFSPEC to (say) refs/heads/dev to get that mode working.

Finally, if you are using promotions or a build step that promotes artifacts, 
you need to differentiate between Gerrit verification builds and final builds.  
I add a small block of scripting to check for a non-verification build like so:

if [ ! -z "${GERRIT_EVENT_TYPE}" -a "$GERRIT_EVENT_TYPE" != 'change-merged' ]
then
echo 'You cannot promote a verification build' # >&2
exit 1
fi

The 2-part test is required because there is no consistent means of determining 
what triggered the build.  IMHO, the integration sucks.



From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Daniel Pawlik
Sent: June-27-17 14:30
To: Jenkins Users 
Subject: Gerrit trigger doesn't detect changes in Gerrit and run automatically 
CI

Hello,
I have a problem with Gerrit trigger on Jenkins. It doesn't detect and build 
automatically changes pushed to Gerrit repo. I read a lot of manuals and it 
still doesn't work.
Below I present screenshots and executed commands with output.

NOTE: I also check Jenkins Gerrit trigger using Admin credentials and it also 
doesn't work.
NOTE 2: Yes, I would like to configure gerrit like Openstack gerrit have.

All informations:

# Gerrit version:
$ ssh -p 29418 admin@localhost gerrit version
gerrit version 2.14.1

# Enabled plugins - from https://gerrit-ci.gerritforge.com/

# ssh -p 29418 admin@localhost gerrit plugin ls
Name   VersionStatus   File
---
commit-message-length-validator v2.14.1ENABLED  
commit-message-length-validator.jar
delete-project v2.13-13-gd9f1d5f ENABLED  delete-project.jar
download-commands  v2.14.1ENABLED  download-commands.jar
events-log v2.13-26-g83e640c ENABLED  events-log.jar
hooks  v2.14.1ENABLED  hooks.jar
replicationv2.14.1ENABLED  replication.jar
reviewnotesv2.14.1ENABLED  reviewnotes.jar
singleusergroupv2.14.1ENABLED  singleusergroup.jar
verify-status  d99fbcfENABLED  verify-status.jar


$ ssh -p 29418 admin@localhost gerrit create-group "'Jenkins'" --description 
"'jenkins'" --member "'jenkins'" --visible-to-all

$ mkdir All-Projects-ACLs
$ cd All-Projects-ACLs
$ git init
$ git remote add gerrit ssh://$USER@$HOST:29418/All-Projects.git
$ git fetch gerrit +refs/meta/*:refs/remotes/gerrit-meta/*
$ git checkout -b config remotes/gerrit-meta/config

$ cat groups
global:Jenkins Jenkins


$ cat project.config
[project]
description = Access inherited by all other projects.
[receive]
requireContributorAgreement = false
requireSignedOffBy = false
requireChangeId = true
enableSignedPush = false
[submit]
mergeContent = true

[capability]
administrateServer = group Administrators
priority = batch group Non-Interactive Users
streamEvents = group Non-Interactive Users
accessDatabase = group Administrators
administrateServer = group Administrators
createProject = group Project Bootstrappers
emailReviewers = deny group Third-Party CI
priority = batch group Non-Interactive Users
runAs = group Project Bootstrappers
streamEvents = group Registered Users
streamEvents = group Jenkins

[access "refs/*"]
read = group Administrators
read = group Anonymous Users
read = group Non-Interactive Users
read = group Jenkins
push = group Administrators
editTopicName = group Registered Users
create = group Administrators

[access "refs/remotes/*"]
read = group Administrators
read = group Anonymous Users
push = group Administrators
editTopicName = group Registered Users
create = group Administrators

[access "refs/for/*"]
addPatchSet = group Registered Users

[access "refs/for/refs/*"]
push = group Registered Users

RE: vSphere Cloud Plugin - does it work ?

2017-06-27 Thread John Mellor
P asked:

Ø  So how do you guys use jenkins slaves on VMware ? Do you use existing VMs ?

I use vsphere slaves extensively, but only as existing VMs.  I never managed to 
get a dynamically-constructed slaves to actually work, but perhaps there is 
some magic combination of undocumented incantations that does it.  I have many 
Developers who leave all kinds of cruft around from their builds, install 
prereq packages, reconfigure ssh keys, ntp, dns, etc in their build steps.  I 
use the vsphere plugin to reset the slave back to a known-good condition at the 
start of the next build (that leaves the slave as the previous build left it, 
so I can debug what went wrong).

Its somewhat unfortunate that the plugin only uses vcenter api, as otherwise I 
could use the free version of esxi and also not need the $12k vcenter licence 
in this stack.  The software licences cost about 3x what the hardware costs, so 
you know something is wrong with that model.

For many job types, I also use the CloudBees Docker plugin to build jobs that 
do not build Docker images and do not require a different kernel or libc to 
build correct product.  It seems to be the only one that actually works, and 
provides the pristine environment for a lot less overhead.  I wish there was 
some kind of quality information associated with each Jenkins plugin, as there 
is a *LOT* of crap in the library.

I used to use the Debian pbuilder containers with a pretty large set of 
scripted wrappers in the C++ builds, but Docker images are an improvement.

If you need, I can send you my config changes that I use to thread the needle…



From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of P
Sent: June-27-17 03:17
To: Jenkins Users 
Subject: Re: vSphere Cloud Plugin - does it work ?

It looks like VSphere Cloud plugin is not very widely used 
So how do you guys use jenkins slaves on VMware ? Do you use existing VMs ?
I am a bit surprised nobody is creating dynamically VMs for Jenskins ...

Best regards
P.


On Tuesday, June 20, 2017 at 12:34:19 PM UTC+1, P wrote:
Hello all,

I am trying to use vSphere Cloud Plugin to create new VM for some test 
deployment.
Unfortunatelly it doesn't work and I don't really know why. Below is the error 
message I get when I press "Check Data" button
while defining "vSphere Build Step":
https://gist.github.com/anonymous/b355bed14171f8afa066dd18e8191179
I also include the configuration I use.

Can anybody have a look and tell me why it is failing ?
Kind regards
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/7a37767a-285d-4b18-8ee6-2ac684a48e11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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/cdb2fe03af9846e2917ba0198f14641a%40mbx02cmb01p.esentire.local.
For more options, visit https://groups.google.com/d/optout.


How to fire a remote job trigger

2017-06-05 Thread John Mellor
Sorry, forgot the subject text.  Resent.;^P

I’m about ready to throw in the towel regarding remote job triggers.  It is 
definitely a *LOT* too hard.

I’m trying to start an Ansible construction job on a Jenkins-2 cluster from a 
Jenkins-1 cluster, as a workaround for a massive number of items not working in 
Jenkins-1.

My prototyping appears to show that

1.   I need to know the login credentials and Jenkins user key for the 
person who pushed the button.  These do not appear to be exposed as variables 
to the job on Jenkins-1.  For my prototyping, I’m just hardcoding my own 
credentials, but moving forward I will need some way of obtaining these in a 
shell script for production use.

2.   The obvious API way of doing this job start refuses to work, I believe 
ever since the XSRF additions were added.

3.   You need an XSRF cookie to do this remote job start, for unclear 
reasons.  Both of my Jenkins sites are exposed through an nginx redirect from 
port 80, which may have something to do with this.  Is this an unresolved bug?

4.   The XSRF cookie is not accepted, for unclear reasons.  The log is 
totally useless to figure out why.

There must be an undocumented trick, so what is it?  Has anyone got remote job 
initiation actually working?


CRUMB=$(curl -s 
http://$OWNER:$OWNERKEY@$JENKINS2/crumbIssuer/api/xml?$JENKINS2/crumbRequestField,":",//crumb)

curl -o $RUNLOG \
  -X POST \
  -H "Jenkins-Crumb: $CRUMB" \
  $JENKINS2/job/$FOLDER/$JOB/buildWithParameters?token=$JOBTOKEN \
  --user $OWNER:$OWNERKEY \
  --data-urlencode json='{"parameter": [{"name":"OS_TEMPLATE", 
"value":"{OS_TEMPLATE}"},
{"name":"VM_HOST", 
"value":"{VM_HOST}"},
{"name":"VM_MEMORY",   
"value":"{VM_MEMORY}"  },
{"name":"VM_CPU",  
"value":"{VM_CPU}" },
{"name":"VM_DISK", 
"value":"{VM_DISK}"},
{"name":"STATIC_IP",   
"value":"{STATIC_IP}"  }]}'
cat $RUNLOG# (obfuscation added as xxx):


  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed

  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
100  1564  100   354  100  1210  50348   168k --:--:-- --:--:-- --:--:--  196k
+ cat /tmp/run.log



Error 404 Not Found

HTTP ERROR 404
Problem accessing /job/xxx/xxx/buildWithParameters. Reason:
Not Foundhttp://eclipse.org/jetty;>Powered by 
Jetty:// 9.4.z-SNAPSHOT



+ grep -q 'HTTP ERROR 403' /tmp/run.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE

-- 
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/4f5b78df053e463190b813ef79284c67%40mbx02cmb01p.esentire.local.
For more options, visit https://groups.google.com/d/optout.


[no subject]

2017-06-05 Thread John Mellor
I’m about ready to throw in the towel regarding remote job triggers.  It is 
definitely a *LOT* too hard.

I’m trying to start an Ansible construction job on a Jenkins-2 cluster from a 
Jenkins-1 cluster, as a workaround for a massive number of items not working in 
Jenkins-1.

My prototyping appears to show that

1.   I need to know the login credentials and Jenkins user key for the 
person who pushed the button.  These do not appear to be exposed as variables 
to the job on Jenkins-1.  For my prototyping, I’m just hardcoding my own 
credentials, but moving forward I will need some way of obtaining these in a 
shell script for production use.

2.   The obvious API way of doing this job start refuses to work, I believe 
ever since the XSRF additions were added.

3.   You need an XSRF cookie to do this remote job start, for unclear 
reasons.  Both of my Jenkins sites are exposed through an nginx redirect from 
port 80, which may have something to do with this.  Is this an unresolved bug?

4.   The XSRF cookie is not accepted, for unclear reasons.  The log is 
totally useless to figure out why.

There must be an undocumented trick, so what is it?  Has anyone got remote job 
initiation actually working?


CRUMB=$(curl -s 
http://$OWNER:$OWNERKEY@$JENKINS2/crumbIssuer/api/xml?$JENKINS2/crumbRequestField,":",//crumb)

curl -o $RUNLOG \
  -X POST \
  -H "Jenkins-Crumb: $CRUMB" \
  $JENKINS2/job/$FOLDER/$JOB/buildWithParameters?token=$JOBTOKEN \
  --user $OWNER:$OWNERKEY \
  --data-urlencode json='{"parameter": [{"name":"OS_TEMPLATE", 
"value":"{OS_TEMPLATE}"},
{"name":"VM_HOST", 
"value":"{VM_HOST}"},
{"name":"VM_MEMORY",   
"value":"{VM_MEMORY}"  },
{"name":"VM_CPU",  
"value":"{VM_CPU}" },
{"name":"VM_DISK", 
"value":"{VM_DISK}"},
{"name":"STATIC_IP",   
"value":"{STATIC_IP}"  }]}'
cat $RUNLOG# (obfuscation added as xxx):


  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed

  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
100  1564  100   354  100  1210  50348   168k --:--:-- --:--:-- --:--:--  196k
+ cat /tmp/run.log



Error 404 Not Found

HTTP ERROR 404
Problem accessing /job/xxx/xxx/buildWithParameters. Reason:
Not Foundhttp://eclipse.org/jetty;>Powered by 
Jetty:// 9.4.z-SNAPSHOT



+ grep -q 'HTTP ERROR 403' /tmp/run.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE

-- 
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/b57477b973114bb7947a873cafa910ec%40mbx02cmb01p.esentire.local.
For more options, visit https://groups.google.com/d/optout.


Plugins published without a Changelog Entry

2017-06-05 Thread John Mellor
This morning I am looking at 2 more plugins that have somehow been published 
without a changelog entry.  Aside from this being very unprofessional, we do 
not install plugin updates without changelog entries that describe what the 
change is.  These are almost as bad as the stupid no-user-visible-changes 
changelog entries that the core engine slips in once in a while.  We have been 
burned by these poorly thought-through updates several times in the past.

Is it possible add a rule to just deny a plugin publishing an update that does 
not have a usable changelog update?

-- 
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/5dfcaad218b8442bb4a13194e2fb3e05%40mbx02cmb01p.esentire.local.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline node scheduling options

2017-05-30 Thread John Calsbeek
We are currently using Michael's suggestion of running a job periodically 
which looks for labels with 0 nodes and assigns that label to a node in the 
"fallback" pool. We are continuing to manage locality by manually juggling 
label assignments. So now we have guaranteed incremental builds, which is 
nice, but every time we add or remove a pipeline, we have to redistribute 
labels somehow.

On Monday, May 29, 2017 at 10:11:18 AM UTC-7, Paul van der Ende wrote:
>
> Same issue here. Our incremental builds suffer from very poor locality 
> because the pipeline *always* start on a completely different set of node 
> then last time, and we have quite a few nodes. I came up with the same 
> tricks you mention, but it did not help much. Did you find a better 
> solution already, besides managing nodes by hand?
>
> My preferred solution is as follows: Ideally every 'node()' in my pipeline 
> should stick to the same Jenkins node whenever possible. They also should 
> end up in the same workspace to improve reuse of cached artifacts, but 
> ideally different 'nodes()' of the same pipeline should end up in a 
> different working space to avoid conflicts. 
>
> If I compare nodes() with freestyle jobs then they should basically work 
> the same way. I can not believe this is not the case.
>
>
> On Saturday, October 29, 2016 at 5:06:15 AM UTC+2, John Calsbeek wrote:
>>
>> We have a problem trying to get more control over how the node() decides 
>> what node to allocate an executor on. Specifically, we have a situation 
>> where we have a pool of nodes with a specific label, all of which are 
>> capable of executing a given task, but with a strong preference to run the 
>> task on the same node that ran this task before. (Note that these tasks are 
>> simply different pieces of code within a single pipeline, running in 
>> parallel.) This is what Jenkins does normally, at job granularity, but as 
>> JENKINS-36547 <https://issues.jenkins-ci.org/browse/JENKINS-36547> says, 
>> all tasks scheduled from any given pipeline will be given the same hash, 
>> which means that the load balancer has no idea which tasks should be 
>> assigned to which node. In our situation, only a single pipeline ever 
>> assigns jobs to this pool of nodes.
>>
>> So far we have worked around the issue by assigning a different label to 
>> each and every node in the pool in question, but this has a new issue: if 
>> any node in that pool goes down for any reason, the task will not be 
>> reassigned to any other node, and the whole pipeline will hang or time out.
>>
>> We have worked around *that* by assigning each task to "my-node-pool-# 
>> || my-node-pool-fallback", where my-node-pool-fallback is a label which 
>> contains a few standby nodes, so that if one of the primary nodes goes down 
>> the pipeline as a whole can still complete. It will be slower (these tasks 
>> can take two to ten times longer when not running on the same node they ran 
>> last time), but it will at least complete.
>>
>> Unfortunately, the label expression doesn't actually mean "first try to 
>> schedule on the first node in the OR, then use the second one if the first 
>> one is not available." Instead, there will usually be some tasks that 
>> schedule on a fallback node even if the node they are "assigned" to is 
>> still available. As a result, almost every run of this pipeline ends up 
>> taking the worst-case time: it is likely that *some* task will wander 
>> away from its assigned node to run on a fallback, which leads the fallback 
>> nodes to be over-scheduled and leaves other nodes sitting idle.
>>
>> The question is: what are our options? One hack we've considered is 
>> attempting to game the scheduler by using sleep()s: initially schedule all 
>> the fallback nodes with a task that does nothing but sleep(), then schedule 
>> all our real tasks (which will now go to their assigned machines whenever 
>> possible, because the fallback nodes are busy sleeping), and finally let 
>> the sleeps complete so that any tasks which couldn't execute on their 
>> assigned machines now execute on the fallbacks. A better solution would 
>> probably be to create a LoadBalancer plugin that codifies this somehow: 
>> preferentially scheduling tasks only on their assigned label, scheduling on 
>> fallbacks only after 30 seconds or a minute.
>>
>> Is anyone out there dealing with similar issues, or know of a solution 
>> that I have overlooked?
>>
>> Thanks,
>> John Calsbeek
>>
>

-- 
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/98246e7a-34c2-41bd-a442-c6253eda9f78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Gerrit differentiate between a verification build and a merge build

2017-05-23 Thread John Mellor
I am using a single Jenkins job for each project in git, with a Gerrit 
server.  Some of the build steps in these builds push Docker images to the 
registry.  I am trying to prevent Gerrit verification builds from pushing 
these images, while allowing merge and push-button builds to do so.

In the simplest case, no other person is making changes to this project, 
and this is their only change.

I have Gerrit triggers set for Patchset Created and Draft Published, and a 
5-minute Poll SCM timer set to catch merges.  The default GERRIT_BRACH and 
GERRIT_REFSPEC are set to master and refs/for/master respectively.
In the body of the build script, I have:

> if [ -z "${GERRIT_EVENT_TYPE}" -o "$GERRIT_EVENT_TYPE" = 'change-merged' ]
> then
> docker push $TAG
> else
> echo 'You should not push a verification build'
> fi
>
so that push-button builds and merge builds will push the docker image.
 
A change is made on a refs/for/ branch, and this triggers a 
verification build. The GERRIT_EVENT_TYPE environment variable is set to 
patchset
-created, as expected.  I use this value in the build scripting to 
determine that the docker push should not be performed.

At some point, the change is verified, code-reviewed and then merged.
However, it appears that Git/Gerrit is determining that the change on the 
refs/for/ branch will be the same as the merged code, and the 
timer being used to detect a merge does not detect a change, and no merge 
build occurs.

The only way out appears to be to push the image from all verification 
builds as well as merge builds, which is killing the registry and the 
downstream processes that need to somehow weed out all the unwanted 
verification build pushes.  That's a huge amount of unexpected work for 
~300 builds, and is unsustainable.

What am I doing wrong?  How can I successfully differentiate between a 
verification build and a merge build?


-- 
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/a9195421-c42a-4059-a287-1386343bf507%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Iteration over list or map in Pipeline script

2017-03-27 Thread John Mellor
 

I just did it this morning, doesn't work.

You have to instead do:


for(int i = 0; i < list.size(); i++) { def elem = list[i]; ... }


 


On Monday, 13 March 2017 10:26:44 UTC-4, Martin Schmude wrote:
>
> Hello,
>
> I have a freestyle job with one step of the kind "Execute Groovy Script". 
> Its Groovy code is
>
> def x = ['a', 'b', 'c']
> println x
> x.each { println it }
>
>
> The output of this job is (not surprinsingly):
>
> [Test-Groovy2] $ groovy 
> /var/lib/jenkins/workspace/Test-Groovy2/hudson3825239812036801886.groovy
> [a, b, c]
> a
> b
> c
> Finished: SUCCESS
>
>
> But if I create a pipeline job with the pipeline script set to the same 
> Groovy code, its output is:
>
> [Pipeline] echo[a, b, c][Pipeline] echoa[Pipeline] End of PipelineFinished: 
> SUCCESS
>
>
> The .each() gets the first element in the list and nothing more.
> What's going on here? I thought that pipeline scripts are just Groovy plus 
> some pipeline DSL, but I seem to be wrong.
>
> BTW: my Jenkins is 2.27.
>
>

-- 
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/2946fa79-81d5-4ce0-b1b5-88ec84d1363e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Mystery Serialization Error

2017-03-16 Thread John Mellor
I have a very simple pipeline that malfunctions unexpectedly.  Adding @NonCPS 
decorators also does not workaround the job failure problem, so I'm mystified 
as to how to write this correctly.  I'm not sure if there is a coding error in 
the pipeline libs, a coding error in our local lib, or a simpler means of doing 
what I really need.  What is really weird is that the intended operation seems 
to work, but fails the job with a surprise serialization traceback!  Bug or 
what?

The problem is simple: discover the build number of a separate project feeder 
job and use that in the current pipeline.


1) Simple pipeline job (Takes a parameter, prints it out)



Takes a String parameter PARAM1



Pipeline definition:



println PARAM1



2) Global library ("jenkins-common", defined in our Jenkins configuration)



#!/usr/bin/groovy

// Pass in "buildJob"
// If the job is a multi-branch, pass in "branch" as well
// -1 indicates that we could not determine the last successful build number
def call(body) {
  // evaluate the body block, and collect configuration into the object
  def config = [:]
  body.resolveStrategy = Closure.DELEGATE_FIRST
  body.delegate = config
  body()

  // See http://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html
  jenkins = jenkins.model.Jenkins.getInstance()
  job = jenkins.getItemByFullName(config.buildJob)
  def build = null

  if (job instanceof org.jenkinsci.plugins.workflow.job.WorkflowJob) {
build = job.getLastSuccessfulBuild()
  } else if (job instanceof 
org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) {
build = job.getBranch(config.branch).getLastSuccessfulBuild()
  }

  if (null != build) {
result = build.getResult()
return (result == hudson.model.Result.SUCCESS) ? build.getNumber() : -1
  } else {
return -1
  }
}



3) Main job (Figure out any job's last successful build number and pass it to 
another job)



@Library("jenkins-common")

@NonCPS
def getBuild(def name) {
  return lastSuccessfulBuildnumber {
buildJob = name
branch = "master"
  }
}
int awsBuild = getBuild("/CDS/AWS Cloudtrail")



// The following will yield the same result

// def awsBuild = lastSuccessfulBuildnumber {
//buildJob = name
//branch = "master"
//  }


  build job: '.Test/Print parameter', propagate: false, parameters: [
[$class: 'StringParameterValue', name: 'PARAM1', value: "${awsBuild}"]
  ]



3b) This works just fine



int awsBuild = 123



build job: '.Test/Print parameter', propagate: false, parameters: [
[$class: 'StringParameterValue', name: 'PARAM1', value: "${awsBuild}"]
  ]



4) Kicking off job 3 will result in a failure. But, it will properly kick off 
the "print parameter" job!



5) Console output from print parameter



Started by upstream project "Main job" build number 50

originally caused by:

 Started by user 

 Replayed #49

[Pipeline] echo

2

[Pipeline] End of Pipeline

Finished: SUCCESS





6) Console output from main job



Started by user 

Replayed #50

Loading library jenkins-common@master

 > git rev-parse --is-inside-work-tree # timeout=10

Setting origin to ssh://gerrit:29418/jenkins/common.git

 > git config remote.origin.url ssh://gerrit:29418/jenkins/common.git # 
 > timeout=10

Fetching origin...

Fetching upstream changes from origin

 > git --version # timeout=10

using GIT_SSH to set credentials ssh key access

 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*

 > git rev-parse master^{commit} # timeout=10

 > git rev-parse origin/master^{commit} # timeout=10

 > git rev-parse --is-inside-work-tree # timeout=10

Fetching changes from the remote Git repository

 > git config remote.origin.url ssh://gerrit:29418/jenkins/common.git # 
 > timeout=10

Fetching upstream changes from ssh://gerrit:29418/jenkins/common.git

 > git --version # timeout=10

using GIT_SSH to set credentials ssh key access

 > git fetch --tags --progress ssh://gerrit:29418/jenkins/common.git 
 > +refs/heads/*:refs/remotes/origin/*

Checking out Revision 69ab6e9be3a8afd0a847d29d60c4b6ad320ca2f1 (master)

 > git config core.sparsecheckout # timeout=10

 > git checkout -f 69ab6e9be3a8afd0a847d29d60c4b6ad320ca2f1

 > git rev-list 69ab6e9be3a8afd0a847d29d60c4b6ad320ca2f1 # timeout=10

[Pipeline] build (Building .Test > Print parameter)

Scheduling project: .Test > Print parameter

[Pipeline] End of Pipeline

java.io.NotSerializableException: hudson.model.Hudson

at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)

at 
org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)

at 
org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)

at 
org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)

at 
org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)

at 

RE: Updated Hotlist please share your daily requirements..

2017-02-21 Thread John Mellor
Can someone please cancel the posting credentials for this user that allows 
them to post this inappropriate garbage?


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of mahi v
Sent: February-21-17 17:06
Subject: Updated Hotlist please share your daily requirements..

Dear Recruiter,
Please find the Below Hotlist and send me your Requirements to 
mah...@samuraiinfotech.com / 
r...@samuraiinfotech.com
Name

Skill Set

Experience (In Years)

Location

Relocation











Aarthi G

QA Engineer

8

TX

Open

Koneru

SQL DBA

7

NY

Open

Dheeraj

Citrix Admin

7

DC

Open

Phanesh

AWS Developer

7

CA

Open

Charan

Citrix Admin

7

DC

Open

Sruthi

UI Developer

5

PA

Open

Hema

.net Developer

5

VA

Open

Vijitha (Citizen)

QA Tester

5

GA

Only GA

Tushma

QA Tester

7

GA

Open

Venakta (Citizen)

QA Tester

5

TX

Only TX

Anjana

WMB Admin

7

WI

Open

Ravi Kumar

Devops /AWS

7

GA

Open

Rekha

.net Developer

5

GA

Only GA

Gokul

CognosT1

7

CA

Open

Krishna

Oracle Apps Fin Functional

10

CA

Open

Ram

Project Manager

15

NY

 Open

Naveen

CognosT1

5

CA

Open

Srini

Devops/AWS

6

PA

Open

Balaji

Quality Analyst

7

NY

Open

Raj

Devops /AWS

7

GA

Open

Ravi

Devops /AWS

7

NY

Open

Avinash

Performance Tester

7

AZ

Open

 Jayaram

Programme Manager

16

IN

Open

Rakesh

Salesforce Developer

8

IN

Open

  Annapurna (Citizen)

QA Analyst

7

GA

Only GA


Thanks & Regards
Mahesh
Samurai Infotech LLC
Consulting - Development – Staffing
Voice: 678-799-8055
E-mail : 
mah...@samuraiinfotech.com/r...@samuraiinfotech.com
Website : www.samuraiinfotech.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/CAAko6%3D8nxe22x6ga-riDURyxaW%2BBQWYArDShQXU2%2B1jRAiP_Ag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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/acb00ab342da4faa8b834db0b312483b%40mbx02cmb01p.esentire.local.
For more options, visit https://groups.google.com/d/optout.


Re: sh pipeline step started to fail after update to 2.42

2017-02-11 Thread John Mellor
After downgrading the durable tasks pluginto fix this problem, a manual 
reboot is required to actually get pipelines functional again.  Thanks, 
Daniel !

On Friday, 10 February 2017 17:08:25 UTC-5, Daniel Beck wrote:
>
>
> > On 10.02.2017, at 21:40, John Mellor <john@gmail.com > 
> wrote: 
> > 
> > Now what?  All pipelines a inoperable at this point. 
>
> I linked to JENKINS-41339 earlier, which mentions solutions in the 
> comments. 
>
>

-- 
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/d55059c4-e677-45f5-918d-99bab53c5358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: sh pipeline step started to fail after update to 2.42

2017-02-10 Thread John Mellor
Looking at your pipeline plugin version numbers, I assume that you are on 
Jenkins2.
I'm on Jenkins 1.656 and have been unable to move up to the exact pipeline 
plugin version numbers that you used.
However, I have the same problem, and unfortunately reverting to the 
previous version has not fixed the issue.

[Pipeline] {[Pipeline] stage[Pipeline] { (Fetch Dependencies)[Pipeline] 
deleteDir[Pipeline] sh[cb-automation-pipeline] Running shell script
nohup: failed to run command ‘sh’: No such file or directory[Pipeline] echoNo 
need to clear known_hosts.[Pipeline] sh[cb-automation-pipeline] Running shell 
script
nohup: failed to run command ‘sh’: No such file or directory[Pipeline] }

Now what?  All pipelines a inoperable at this point.

-- 
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/f7c01382-6be3-47b2-8bd1-89f071597dcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the proper name for "ghost" jobs and how are they controlled?

2017-02-01 Thread John Bobinyec
The apparent interference might have been due to other things.

But does no one else have ghosts?

jb

On Thursday, January 26, 2017 at 3:27:12 PM UTC-5, John Bobinyec wrote:
>
>
> We have a pool of slaves.  When a job is dispatched to one of them it is 
> assigned to an executor on that machine.  Oftentimes there is a very 
> similar job running on another machine but it's not assigned to an 
> executor.  I call these ghosts.  What do they do?  How are they 
> dispatched?  It seems like they interfere with the jobs which are supposed 
> to be running on that machine, because real jobs which are destined for 
> that machine get queued up.
>
> Thanks,
> jb
>

-- 
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/335ed9c7-ea23-4eec-9ceb-0b75cfcc4fe2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


docker plugins

2017-02-01 Thread john
I have been using the docker-build-step plugin for creating an image and 
running various docker commands in a build. Unfortunately since docker has 
moved on, it has stopped working and is not being updated.
Is there a preferred docker plugin? Or am I better off using shell commands?
Regards

-- 
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/dbf9d056-fc33-4903-bc00-fd024146364b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What is the proper name for "ghost" jobs and how are they controlled?

2017-01-26 Thread John Bobinyec

We have a pool of slaves.  When a job is dispatched to one of them it is 
assigned to an executor on that machine.  Oftentimes there is a very 
similar job running on another machine but it's not assigned to an 
executor.  I call these ghosts.  What do they do?  How are they 
dispatched?  It seems like they interfere with the jobs which are supposed 
to be running on that machine, because real jobs which are destined for 
that machine get queued up.

Thanks,
jb

-- 
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/2d4d0f04-d565-4193-98d6-f266e2f77cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Configure EC2 Plugin with Groovy

2017-01-20 Thread John Mickey
I am trying to configure the EC2 Plugin via a Groovy script.  So far, it's 
been a complete failure.  Here is what I have so far:

I am trying to configure the Jenkins EC2-Plugin via Groovy. Plugin code: 
https://github.com/jenkinsci/ec2-plugin

I'm trying to setup the cloud with a name to get started

import hudson.model.*import jenkins.model.*import hudson.plugins.ec2.*import 
com.amazonaws.services.ec2.model.*
SlaveTemplate awsTemplate = new SlaveTemplate(
  'ami-1234567',
  '',
  '',
  'sg-1234567',
  't2.micro',
  true,
  'foo',
  '',
  'stuff',
  'run code',
  '/var/tmp',
  'more code',
  '4',
  '',
  '',
  '',
  false,
  'subnet-1234567',
  '',
  '60',
  false,
  '',
  'iam-profile',
  false,
  false,
  '',
  false,
  '',
  true,
  false)
def slaveTemplates = [awsTemplate]
def ec2Cloud = new AmazonEC2Cloud(
  'foo',
  true,
  '',
  'us-west-2',
  '',
  '10',
  slaveTemplates)
def cloudList = Jenkins.instance.clouds
cloudList.add(ec2Cloud)

Any ideas?

These are the error messages

Error: Could not find matching constructor for: hudson.plugins.ec2.SlaveTemplate

or

Error: Could not find matching constructor for: 
hudson.plugins.ec2.AmazonEC2Cloud

-- 
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/379138a6-de1a-42cf-a5b9-9803836b80b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


env.CHANGE_ID null when building GitHub Pull Request?

2017-01-19 Thread John Hovell
Hello,

I am successfully triggering pull request builds using the instructions for 
setting up a Github service webhook here:

https://gist.github.com/misterbrownlee/3708738

PRs trigger builds automatically, and build results show up in Github. 

However, none of the env.CHANGE* environment variables are set in the 
build, and as a result it's difficult to know if the build corresponds to a 
pull request as well as more advanced behavior I hope to build out using 
the Github API such as whether the pull request reviews are approved or not.

I'm also using the Github Organization plugin and Jenkins (2.32.1).

I have updated to all the latest plugin versions including these which it 
now looks like I shouldn't have done

https://jenkins.io/blog/2017/01/17/scm-api-2/

Any idea what to check or what I might be doing wrong?

-- 
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/92b18fac-bf94-4f37-8840-29170eab1272%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


docker build step plugin

2017-01-08 Thread john
Hi,
using v2.38 of Jenkins
using v1.35 of docker build step plugin

A job that I had setup worked with previous versions of both Jenkins and 
the plugin. Since various upgrades, they no longer do.

So now I get

[Docker] INFO: Sucessfully created image groovytest-25:jenkins[Docker] INFO: 
created container id 
a2297f9308158f6468a1392dc064d31db45d5afb0bbc9e27d910cc63f07feb04 (from image 
groovytest-25:jenkins)[Docker] ERROR: command 'Start container(s)' failed: 
{"message":"starting container with HostConfig was deprecated since v1.10 and 
removed in v1.12"}


I am a little confused about the maintenance of this plugin.
In GitHub there is a *jenkinsci* 
<https://github.com/jenkinsci>/*docker-build-step-plugin 
<https://github.com/jenkinsci/docker-build-step-plugin>* which is what the 
info page points to. But there is no way to raise issues on this. This 
project was forked from *vjuranek/docker-build-step-plugin* 
<https://github.com/vjuranek/docker-build-step-plugin> which does allow 
issues to be raised.
But the latter project is not the actual code in the released plugin?

I did clone the jenkinsci project in the hope that the solution to the 
above error was obvious but a few simple changes suggested it is not.

So should I be using this plugin or is there a more appropriate plugin to 
use?

Regards,
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/13344f59-c11a-40fb-a133-5f545079de30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jenkins gitlab plugin - credentials problems

2017-01-03 Thread john
So this is what I did.
I had created credentials but let Jenkins create the ID. What I should have 
done is to use 1909e700-c4e3-4cac-a2ff-987b8990bb6c as the ID. 
This is the value in the console log. It is also in 
com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig.xml.

Then run build and worked.

I am guessing I could also have taken the generated ID and changed 
com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig.xml.


>

-- 
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/d7f6c33f-ec03-4db6-9b8e-f012b0ef6574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How To Send An Administrative Email

2017-01-03 Thread John Bobinyec
We want to take Jenkins down for maintenance and give several days notice 
to the users.  Is there an easy way to send an administrative email to that 
effect?

Thanks,
John Bobinyec

-- 
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/2403002c-a56c-447c-89bd-9b8eabc8e9e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jenkins gitlab plugin - credentials problems

2017-01-03 Thread john
Hi,
I set up various Jenkins jobs using the gitlab plugin several months ago 
and it worked. It was using previous versions. Both gitlab and Jenkins 
running on Mint 17.3 and both have been updated over the months. So that I 
now have
*Gitlab plugin version*: 1.4.3
- *Gitlab version*: 8.15.2
- *Jenkins version*: 2.38
- *Job type*: Maven
Then setup got put aside. Now returned to it to find that the Jenkins jobs 
were no longer running. Configure showed an error in Git/ Source code 
management section of

Failed to connect to repository : Command "git ls-remote -h 
git@mint-gitlab:norricorp/groovytest.git HEAD" returned status code 128:
stdout:
stderr: Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

 Please make sure you have the correct access rights and the repository exists.

So I deleted the credentials in jenkins, created a new gitlab access token 
api key for a user called jenkins who had developer rights for the 
gitlab project and created a new credential in Jenkins. Error now gone.


But when I run the job, I get the error above in the console output.


Checking out Revision 78e2f92f3cc5dc9a43c42b0e76402d6d724be8e4 
(refs/remotes/origin/master)

git config core.sparsecheckout # timeout=10
git checkout -f 78e2f92f3cc5dc9a43c42b0e76402d6d724be8e4
git rev-list 3abff1d1f38ce409f468f01a337bc3a7c3e43cd3 # timeout=10
ERROR: Processing failed due to a bug in the code. Please report this to 
jenkinsci-users@googlegroups.com
java.lang.IllegalStateException: No credentials found for credentialsId: 
1909e700-c4e3-4cac-a2ff-987b8990bb6c
at 
com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder.getApiToken(GitLabClientBuilder.java:133)



I also tried creating a new job and get the following error.
javax.servlet.ServletException: java.lang.Error: 
org.gitlab.api.GitlabAPIException: {"message":"401 Unauthorized"}


So generally very confused about what is going on. In previous versions of 
jenkins and the gitlab plugin the Jenkins user can access Gitlab. Now the 
build is obviously getting through to git but not gitlab. Can someone 
please help?
Regards,
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/47af03a9-9aa5-44a7-bb25-f386abe62ffa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   >