Re: How can i do a reset with GitSCM?

2018-04-17 Thread Mark Waite
There is a strategy called "OURS" and a strategy called
"RECURSIVE_THEIRS".  Will either of those do what you want?

Mark Waite

On Tue, Apr 17, 2018 at 5:51 PM red 888  wrote:

> I want to merge a branch into the current one but reset the current branch
> to the one I'm merging in:
>
> checkout([$class: 'GitSCM',
> branches: [[name: "${env.BRANCH_NAME}"]],
> doGenerateSubmoduleConfigurations: false,
> extensions: [
> [$class: 'PreBuildMerge',
> options: [
> fastForwardMode: 'NO_FF',
> mergeRemote: 'origin',
> mergeStrategy: 'MergeCommand.Strategy',
> mergeTarget: 'otherbranch']
>  ],
> ]
> ])
>
> Is there an "except their changes" feature here? Actually I think I want a
> full reset because I want origin here to be identical to otherbranch
>
> --
> 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/dfdb1112-fbdb-4929-87d7-0aebf3e4c553%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/CAO49JtEHTE2vRU9YPrC_qV_EBuihGoviudbNpAL6xDX%3DAUFnpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins refuses to queue and run identical consecutive build requests from curl

2018-04-17 Thread R. Tyler Croy
(replies inline)

On Tue, 17 Apr 2018, Martin d'Anjou wrote:

> I try to trigger multiple builds rapidly using curl, but Jenkins silently 
> refuses to launch the builds. It keeps returning the same queue item in the 
> "Location":


>From my understanding this will happen it the "same looking" item goes into the
queue and isn't dequeued rapidly enough.

So basically if the quiet period is really low, these subsequent calls might
queue redundant items once one item is actually dequeued.


Anyways, that's my understanding of this behavior.



-- 
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/20180418023342.GR1836%40grape.lasagna.io.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Jenkins refuses to queue and run identical consecutive build requests from curl

2018-04-17 Thread Martin d'Anjou
I try to trigger multiple builds rapidly using curl, but Jenkins silently 
refuses to launch the builds. It keeps returning the same queue item in the 
"Location":

$ curl -I -X POST 
"http://localhost:8080/job/test-123/buildWithParameters/params?foo=i";
HTTP/1.1 201 Created
Date: Wed, 18 Apr 2018 00:06:32 GMT
X-Content-Type-Options: nosniff
Location: http://localhost:8080/queue/item/17/
Content-Length: 0
Server: Jetty(9.2.z-SNAPSHOT)

$ curl -I -X POST 
"http://localhost:8080/job/test-123/buildWithParameters/params?foo=i";
HTTP/1.1 201 Created
Date: Wed, 18 Apr 2018 00:06:34 GMT
X-Content-Type-Options: nosniff
Location: http://localhost:8080/queue/item/17/
Content-Length: 0
Server: Jetty(9.2.z-SNAPSHOT)

What's wrong? How do I get Jenkins to queue all my build requests?

Martin

-- 
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/2ee0795f-4c1d-4815-9375-56457822ebd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How can i do a reset with GitSCM?

2018-04-17 Thread red 888
I want to merge a branch into the current one but reset the current branch 
to the one I'm merging in:

checkout([$class: 'GitSCM',
branches: [[name: "${env.BRANCH_NAME}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'PreBuildMerge',
options: [
fastForwardMode: 'NO_FF',
mergeRemote: 'origin',
mergeStrategy: 'MergeCommand.Strategy',
mergeTarget: 'otherbranch']
 ],
]
])

Is there an "except their changes" feature here? Actually I think I want a 
full reset because I want origin here to be identical to otherbranch

-- 
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/dfdb1112-fbdb-4929-87d7-0aebf3e4c553%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Vulnerability Scan

2018-04-17 Thread Mark Waite
Your mail doesn't tell us what security vulnerability is believed to exist.

Can you explain further what the report means and what you believe should
be done?

Mark Waite

On Tue, Apr 17, 2018, 9:02 AM Eric Fetzer  wrote:

> No one has any ideas about this at all?
>
>
>
> On Friday, April 13, 2018 at 12:21:36 PM UTC-6, Eric Fetzer wrote:
>>
>> We're getting gigged on a security scan that looking at Jenkins
>> documentation, should not be happening.  The scan is turning up:
>>
>>
>> *Vulnerability*
>>
>> *Host*
>>
>> *IP*
>>
>> *Port*
>>
>> *201701*
>>
>> *201702*
>>
>> *201703*
>>
>> *201704*
>>
>> *201705*
>>
>> *201706*
>>
>> *201707*
>>
>> Jenkins JDK / Ant Tools Job Configuration Stored XSS Vulnerability
>> (SECURITY-624)
>> 
>>
>> 
>>
>> TCP:8080
>>
>> NO
>>
>> NO
>>
>> NO
>>
>> NO
>>
>> NO
>>
>> NO
>>
>> NO
>>
>>
>> In the documentation, I see 2 places where this could be turning up.  Ant
>> plugin prior to 1.8, and Jenkins version prior to 2.93.  Our Jenkins
>> version is 2.107.1 and we just upgraded our Ant plugin to 1.8.  Anyone have
>> an idea what's getting us here?
>>
>> 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/58bf582a-a106-4f95-966a-07642c16e11c%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/CAO49JtH_8yxLHf2umcysCn1Wn7N248jMSyDXa-ybz%3D0fA6fBaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


URL Commands

2018-04-17 Thread john.peterson
Where can I find a list of command available as part of the URL such as

http://jenkins/job/jobname/build?delay=4

-- 
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/bab48fa5-d62c-4d6d-8dbd-dc192930d4d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Blue Ocean and Git connectivity issue

2018-04-17 Thread Vivek Pandey
Theo,

Ah, you encountered whats reported here:
https://issues.jenkins-ci.org/browse/JENKINS-50833. There was an
incompatible change in method signature introduced in
pipeline-demos-definition:1.2.8. Its been fixed and released in 1.2.9. You
can try upgrading to 1.2.9.


On Tue, Apr 10, 2018 at 1:09 AM, Theo W  wrote:

> Hi Vivek,
>
> I was able to get past that screen and get to the pipeline editor
> interface, but did notice the following exception trace being output from
> the jenkinsci/blueocean official image:
>
> jenkins_1  | Apr 10, 2018 8:00:27 AM 
> org.eclipse.jetty.server.handler.ContextHandler$Context
> log
> jenkins_1  | WARNING: Error while serving http://localhost:8080/blue/
> rest/pipeline-metadata/agentMetadata
> jenkins_1  | java.lang.reflect.InvocationTargetException
> jenkins_1  | at org.kohsuke.stapler.Function$MethodFunction.invoke(
> Function.java:347)
> jenkins_1  | at org.kohsuke.stapler.ForwardingFunction.invoke(
> ForwardingFunction.java:63)
> jenkins_1  | at io.jenkins.blueocean.commons.stapler.TreeResponse$
> Processor.invoke(TreeResponse.java:43)
> jenkins_1  | at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(
> PreInvokeInterceptedFunction.java:26)
> jenkins_1  | at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:
> 184)
> jenkins_1  | at org.kohsuke.stapler.Function.
> bindAndInvokeAndServeResponse(Function.java:117)
> jenkins_1  | at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:
> 129)
> jenkins_1  | at org.kohsuke.stapler.NameBasedDispatcher.dispatch(
> NameBasedDispatcher.java:58)
> jenkins_1  | at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
> jenkins_1  | at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
> jenkins_1  | at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:
> 374)
> jenkins_1  | at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
> jenkins_1  | at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
> jenkins_1  | at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:
> 374)
> jenkins_1  | at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
> jenkins_1  | at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
> jenkins_1  | at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:686)
> jenkins_1  | at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
> jenkins_1  | at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:
> 374)
> jenkins_1  | at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
> jenkins_1  | at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
> jenkins_1  | at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
> jenkins_1  | at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
> jenkins_1  | at javax.servlet.http.HttpServlet.service(
> HttpServlet.java:790)
> jenkins_1  | at org.eclipse.jetty.servlet.ServletHolder.handle(
> ServletHolder.java:841)
> jenkins_1  | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1650)
> jenkins_1  | at hudson.util.PluginServletFilter$1.
> doFilter(PluginServletFilter.java:154)
> jenkins_1  | at org.jenkinsci.plugins.ssegateway.Endpoint$
> SSEListenChannelFilter.doFilter(Endpoint.java:225)
> jenkins_1  | at hudson.util.PluginServletFilter$1.
> doFilter(PluginServletFilter.java:151)
> jenkins_1  | at io.jenkins.blueocean.ResourceCacheControl.doFilter(
> ResourceCacheControl.java:134)
> jenkins_1  | at hudson.util.PluginServletFilter$1.
> doFilter(PluginServletFilter.java:151)
> jenkins_1  | at io.jenkins.blueocean.auth.jwt.
> impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
> jenkins_1  | at hudson.util.PluginServletFilter$1.
> doFilter(PluginServletFilter.java:151)
> jenkins_1  | at hudson.util.PluginServletFilter.doFilter(
> PluginServletFilter.java:157)
> jenkins_1  | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1637)
> jenkins_1  | at hudson.security.csrf.CrumbFilter.doFilter(
> CrumbFilter.java:105)
> jenkins_1  | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1637)
> jenkins_1  | at hudson.security.ChainedServletFilter$1.
> doFilter(ChainedServletFilter.java:84)
> jenkins_1  | at hudson.security.UnwrapSecurityExceptionFilter.doFilter(
> UnwrapSecurityExceptionFilter.java:51)
> jenkins_1  | at hudson.security.ChainedServletFilter$1.
> doFilter(ChainedServletFilter.java:87)
> jenkins_1  | at jenkins.security.ExceptionTranslationFilter.doFilter(
> ExceptionTranslationFilter.java:117)
> jenkins_1  | at hudson.security.ChainedServletFilter$1.
> doFilter(ChainedServletFilter.java:87)
> jenkins_1  | at org.acegisecurity.providers.anonymous.
> AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
> jenkins_1  | at hudson.security.ChainedServletFilter$1.
> doFilter(ChainedServletFilter.java:87)
> jenkins_1  | at org.acegisecurity.ui.rememberme.
> RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
> jenkins_1  | at hudson.security.Chai

What's the proper REST flow for SAML auth with CSRF enabled?

2018-04-17 Thread Ivan Fernandez Calvo
Hi,

If you want to make an API REST call you only need the API Token and a valid 
crumb, the user will be granted with the latest authorities from the last 
login, you have more details in the following link 
https://wiki.jenkins.io/display/JENKINS/Remote+access+API

-- 
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/9f284774-4cc5-48a8-928c-648f32b353c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Configuring Agile Central Connector plugin

2018-04-17 Thread Suguna Sai
Hi All,

   Can anyone provide documentation on how to setup Configuring Agile 
Central Connector plugin in jenkins?

Regards,
Sai

-- 
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/d69d87a7-b4a8-4f49-a8f6-5ec45d393e25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how can I pop an input box for a specific choice?

2018-04-17 Thread red 888


In jenkins I'd like to do this:


parameters {
choice(
name: 'blah',
choices: 'one\ntwo\ncustom',
description: 'if you choose custom enter a custom number'
)
}


So they have three options on the drop down, but it would be nice if when 
they select the "custom" choice jenkins pops an input box to type in raw 
user input.


Is this possible? I don't want to use user input during the pipeline run 
because that means they need to choose custom then wait for jenkins to get 
to the stage where it asks them for input.

-- 
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/8af8daee-3580-4e4f-a6be-2aa6632b1c71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Vulnerability Scan

2018-04-17 Thread Eric Fetzer
No one has any ideas about this at all?



On Friday, April 13, 2018 at 12:21:36 PM UTC-6, Eric Fetzer wrote:
>
> We're getting gigged on a security scan that looking at Jenkins 
> documentation, should not be happening.  The scan is turning up:
>
>
> *Vulnerability*
>
> *Host*
>
> *IP*
>
> *Port*
>
> *201701*
>
> *201702*
>
> *201703*
>
> *201704*
>
> *201705*
>
> *201706*
>
> *201707*
>
> Jenkins JDK / Ant Tools Job Configuration Stored XSS Vulnerability 
> (SECURITY-624)
>  
>
> 
>
> TCP:8080
>
> NO
>
> NO
>
> NO
>
> NO
>
> NO
>
> NO
>
> NO
>
>
> In the documentation, I see 2 places where this could be turning up.  Ant 
> plugin prior to 1.8, and Jenkins version prior to 2.93.  Our Jenkins 
> version is 2.107.1 and we just upgraded our Ant plugin to 1.8.  Anyone have 
> an idea what's getting us here?
>
> 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/58bf582a-a106-4f95-966a-07642c16e11c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline to be generic

2018-04-17 Thread krish
Thanks Guys. That works

On Thursday, 12 April 2018 15:06:19 UTC-4, krish wrote:
>
> Hi,
>
> how can we use the multiple credentials into jenkins pipeline, in our 
> environment diff applications have diff userid and password, is their a 
> smarter way to define this in jenkins pipeline
>
> 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/13b35b68-b640-404c-89bf-871788bd3824%40googlegroups.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 Sunshine
Hi John ,

This definitely works for dedicated individual slaves connected on Masters.

But I have shared-slaves on JOC and this doesn't seem to 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/76f79e88-b214-4759-8bff-79e7ec9c9abe%40googlegroups.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
Sunshine (Saranya),

We use a simple Groovy (Scriptler) script setup to run as a Job on the Jenkins 
Master every 15 minutes, that  checks to see if Jenkins Nodes/Slaves respond or 
it can get an environment setting from them, and if not, sends an email to us 
alerting that the Node/Slave is disconnected or down.

Id:   monitor.slave.nodes.groovy
Name:   Monitor Slave Nodes
Comment:   Monitors Jenkins Nodes and sends out email if it finds a 
node down.
Permission: X
Restriction: X (only run on Master)
No Parameters

--Script Start
/*** BEGIN META {
  "name" : "Monitor Slave Nodes",
  "comment" : "Monitors Jenkins Nodes and sends out email if it finds a node 
down.",
} END META**/

import hudson.model.*
import hudson.node_monitors.*
import hudson.slaves.*
import java.util.concurrent.*

jenkins = Hudson.instance

import javax.mail.internet.*;
import javax.mail.*
import javax.activation.*

import jenkins.model.JenkinsLocationConfiguration

//SendMail process to send emails for notification purposes.
def sendMail (slave, cause) {

jlc = new jenkins.model.JenkinsLocationConfiguration()
message = slave + " slave is down. Check " + jlc.getUrl() + "/computer/" + 
slave + "\nBecause " + cause
subject = slave + " slave is offline"
//The Email Address(es) you want Notifications Sent to, separated by 
semi-colons(;). We usually put an Email Distribution List here, example – 
ourgroupdistributionl...@mydomain.com
toAddress = "emailaddressfornotificati...@yourdomain.com"
fromAddress = jlc.getAdminAddress()
//Your SMTP Server Fully Qualified Domain Name, example – smtp.yahoo.com
host = "SMTPServerFQDN"
//Port number to use for SMTP Server
port = "25"

//Set properties to support the email process
Properties mprops = new Properties();
mprops.setProperty("mail.transport.protocol","smtp");
mprops.setProperty("mail.host",host);
mprops.setProperty("mail.smtp.port",port);

Session lSession = Session.getDefaultInstance(mprops,null);
MimeMessage msg = new MimeMessage(lSession);


//tokenize out the recipients in case they came in as a list
StringTokenizer tok = new StringTokenizer(toAddress,";");
ArrayList emailTos = new ArrayList();
while(tok.hasMoreElements()){
emailTos.add(new InternetAddress(tok.nextElement().toString()));
}
InternetAddress[] to = new InternetAddress[emailTos.size()];
to = (InternetAddress[]) emailTos.toArray(to);
msg.setRecipients(MimeMessage.RecipientType.TO,to);
InternetAddress fromAddr = new InternetAddress(fromAddress);
msg.setFrom(fromAddr);
msg.setFrom(new InternetAddress(fromAddress));
msg.setSubject(subject);
msg.setText(message)

Transport transporter = lSession.getTransport("smtp");
transporter.connect();
transporter.send(msg);
}

//Get Environment process for getting each Jenkins Node
def getEnviron(computer) {
   def env
   def thread = Thread.start("Getting env from ${computer.name}", { env = 
computer.environment })
   thread.join(2000)
   if (thread.isAlive()) thread.interrupt()
   env
}

//Check to see if the Jenkins Node is accessible (try to get the PATH setting 
from the Node)
def slaveAccessible(computer) {
getEnviron(computer)?.get('PATH') != null
}


def numberOfflineNodes = 0
def numberNodes = 0
for (slave in jenkins.slaves) {
   def computer = slave.computer
   numberNodes ++
   println ""
   println "Checking computer ${computer.name}:"

   //Can you get the PATH and the Node is not OffLine
   def isOK = (slaveAccessible(computer) && !computer.offline)

   //If it responds, it is OK, so just print some info about it
   if (isOK) {
 println "\t\tOK, got PATH back from slave ${computer.name}."
 println('\tcomputer.isOffline: ' + slave.getComputer().isOffline());
 println('\tcomputer.isTemporarilyOffline: ' + 
slave.getComputer().isTemporarilyOffline());
 println('\tcomputer.getOfflineCause: ' + 
slave.getComputer().getOfflineCause());
 println('\tcomputer.offline: ' + computer.offline);


   } else {
 //The Node doesn’t respond or is set OffLine
 numberOfflineNodes ++
 println "  ERROR: can't get PATH from slave ${computer.name}."
 println('\tcomputer.isOffline: ' + slave.getComputer().isOffline());
 println('\tcomputer.isTemporarilyOffline: ' + 
slave.getComputer().isTemporarilyOffline());
 println('\tcomputer.getOfflineCause: ' + 
slave.getComputer().getOfflineCause());
 println('\tcomputer.offline: ' + computer.offline);
 if 
((slave.getComputer().getOfflineCause().toString().contains("Disconnected by")) 
| (computer.name.contains("SetANodeNameHereifYouWantToIgnoreItSpecifically"))) {
//The Node was purposely taken OffLine (disconnected) or is explicitly 
set to be ignored, don’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()) {
  i

Re: Debian package repository: Connection refused

2018-04-17 Thread Dirk Heinrichs
From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Olblak

> Debian and some others distributions don't like https repositories by default.
> So you have two options:
> * Installing 'apt-transport-https'

I know, already had this installed, but that wasn't the problem. The initial 
installation already worked fine a few weeks ago. Was some kind of 
infrastructure problem that has meanwhile been fixed on Jenkins side and it's 
working fine for me again as before.

Bye...

Dirk
--
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/1523956186.88531.1340715784.5F8A0272%40webmail.messagingengine.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/SN6PR15MB24164207DE281531A741E2CAAAB70%40SN6PR15MB2416.namprd15.prod.outlook.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 Baptiste Mathus
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 :

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


Re: Debian package repository: Connection refused

2018-04-17 Thread Olblak
Hi Dirk, 

Debian and some others distributions don't like https repositories
by default.So you have two options:
* Installing 'apt-transport-https'
* Changing in your /etc/apt/sources.list from https://pkg.jenkins.io to
  http://pkg.jenkins.io.
We already have an open ticket about it on the jenkins-infra project,
https://issues.jenkins-ci.org/browse/INFRA-266
---
-> gpg --keyserver keys.gnupg.net --recv-key 52210D3D
---




On Fri, Apr 13, 2018, at 7:44 AM, Dirk Heinrichs wrote:
> Hi,


>  


> apt-get dist-upgrade fails with a "ConnectionRefused" error while
> trying to update Jenkins as installed from Debian package:>  


> Reading package lists... Done


> Building dependency tree


> Reading state information... Done


> Calculating upgrade... Done


> The following packages will be upgraded:


>jenkins (2.107.1 => 2.107.2)


> 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


> Need to get 73.9 MB of archives.


> After this operation, 43.0 kB of additional disk space will be used.> Do you 
> want to continue? [Y/n]


> Err:1 https://pkg.jenkins.io/debian-stable binary/ jenkins 2.107.2


>   FailReason: ConnectionRefused


> E: Failed to fetch
>https://pkg.jenkins.io/debian-stable/binary/jenkins_2.107.2_all.deb
>FailReason: ConnectionRefused> E: Unable to fetch some archives, maybe run 
> apt-get update or try with
>--fix-missing?>  


> Downloading with wget shows that there's a redirect to a
> different host:>  


> --2018-04-13 07:43:42--
> https://pkg.jenkins.io/debian-stable/binary/jenkins_2.107.2_all.deb> 
> Resolving pkg.jenkins.io (pkg.jenkins.io)... 52.202.51.185


> Connecting to pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443...
> connected.> HTTP request sent, awaiting response... 302 Found


> Location:
> https://prodjenkinsreleases.blob.core.windows.net/debian-stable/jenkins_2.107.2_all.deb
> [following]> --2018-04-13 07:43:43--
> https://prodjenkinsreleases.blob.core.windows.net/debian-stable/jenkins_2.107.2_all.deb>
>  Resolving prodjenkinsreleases.blob.core.windows.net
> (prodjenkinsreleases.blob.core.windows.net)... 104.208.128.30> Connecting to 
> prodjenkinsreleases.blob.core.windows.net
> (prodjenkinsreleases.blob.core.windows.net)|104.208.128.30|:443...
> failed: Invalid argument.>  


> Please fix.


>  


> Thanks...


>  


> Dirk


>  


> *Dirk Heinrichs*


> Senior Systems Engineer, Delivery Pipeline


> OpenText ™ Discovery | Recommind


> *Email*: dhein...@opentext.com


> *Website*:  www.recommind.de[1]


> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach


> Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
> Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer
> HRB 10646> This e-mail may contain confidential and/or privileged 
> information. If
> you are not the intended recipient (or have received this e-mail in
> error) please notify the sender immediately and destroy this e-mail.
> Any unauthorized copying, disclosure or distribution of the material
> in this e-mail is strictly forbidden> Diese E-Mail enthält vertrauliche 
> und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
> E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
> Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
> die unbefugte Weitergabe dieser Mail sind nicht gestattet.>  


> 


> --
>  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/SN6PR15MB241651F5AB0B1562F9D4F3B4AAB30%40SN6PR15MB2416.namprd15.prod.outlook.com[2].>
>   For more options, visit https://groups.google.com/d/optout.


Links:

  1. http://www.recommind.de/
  2. 
https://groups.google.com/d/msgid/jenkinsci-users/SN6PR15MB241651F5AB0B1562F9D4F3B4AAB30%40SN6PR15MB2416.namprd15.prod.outlook.com?utm_medium=email&utm_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/1523956186.88531.1340715784.5F8A0272%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.


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

2018-04-17 Thread Sunshine
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.
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.


RE: RemoteInvocationHandler statistics and an exception

2018-04-17 Thread Reinhold Füreder
Hi David,

I think the exception is due to 
https://issues.jenkins-ci.org/browse/JENKINS-50748 and is  allegedly fixed in 
Jenkins 2.117 (https://jenkins.io/changelog/).

HTH Reinhold

-- 
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/VI1P190MB025595BA3A0D32F14C0A73F0F7B70%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: Solutions for publishing AMI's from Jenkins

2018-04-17 Thread rohit dogra
Packer is really a good open source tool to build machine images for
multiple platforms. Thats one of the reason it’s being popular apart from
that it’s lightweight. It uses Json as base and when it comes to building
images Packer is able to use different tools to install software onto a
image.
There were either no existing tools to automate  the creation of machine
images or they had too high of learning curve. The result is that, prior to
packer, creating machine images threatened the agility of operations teams,
and therefore wasn’t used, despite the massive benefits.

Ref : https://www.packer.io

On Tue, Apr 17, 2018 at 2:32 AM John  wrote:

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

-- 
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/CAN44wHCJZLiC9kYJLMOgUVxWaJF%3DcxXw4ufCQf-EB0jRQ7wHwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Started converting Plugin to use Pipeline

2018-04-17 Thread Baptiste Mathus
Better send requests related to Jenkins core or plugins development to the
developers mailing list.

Cheers

2018-04-13 10:17 GMT+02:00 Joe Fair :

> Hey!  I have a Rancher plugin that I inherrited from a developer that
> left.  Now I want to use it in a pipeline, but I'm having a hard time
> getting started.  I've looked in jenkins-ci, but there are a lot of
> projects there.  Is there a good tutorial on how to use
> AbstractCoudComputer/Slave, or something to explain how this works?
>
> Thanks,
> Joe
>
> --
> 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/2651d616-744e-4baf-8e08-dedcf381bce5%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/CANWgJS4HKskydjfghePpK_XAO1z31_suxMmtiaucL4%2BOKZLE%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RemoteInvocationHandler statistics and an exception

2018-04-17 Thread David Aldrich
Hi

We have just migrated our Jenkins master from a Centos 5 m/c to a Centos 7 m/c. 
 The console log now shows some RemoteInvocationHandler statistics and an 
exception. Any thoughts why these are happening please?

Jenkins is fully up and running
Apr 17, 2018 8:37:03 AM INFO hudson.remoting.RemoteInvocationHandler$Unexporter 
reportStats
rate(1min) = 87.4±93.4/sec; rate(5min) = 164.7±67.1/sec; rate(15min) = 
183.1±42.0/sec; rate(total) = 25.2±55.9/sec; N = 11
Apr 17, 2018 8:38:02 AM INFO org.eclipse.jetty.server.session.Session 
beginInvalidate
Session node013k1jykadfpxsiba2w9heafxd1 already being invalidated
Apr 17, 2018 8:38:03 AM INFO hudson.remoting.RemoteInvocationHandler$Unexporter 
reportStats
rate(1min) = 32.2±70.6/sec; rate(5min) = 134.9±87.8/sec; rate(15min) = 
171.3±60.6/sec; rate(total) = 12.1±40.7/sec; N = 23
Apr 17, 2018 8:38:19 AM WARNING hudson.ExpressionFactory2$JexlExpression 
evaluate
Caught exception evaluating: h.jsStringEscape(with) in /jenkins/configure. 
Reason: java.lang.NullPointerException
java.lang.NullPointerException
at hudson.Functions.jsStringEscape(Functions.java:1383)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)


Best regards

David

-- 
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/72d58055773946bab7865d4d47417282%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Solutions for publishing AMI's from Jenkins

2018-04-17 Thread Dirk Heinrichs
From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of John

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

No, don't think so.

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

This is what we do here, too. It's basically a bunch of Ruby code around Packer 
and Puppet to prepare the build.json file as well as some Puppet manifests from 
predefined templates and then start a bunch of threads which run Packer, one 
for each AMI we create. There might also be a Jenkins Plugin for using Packer 
directly, just check the plugins.

The nice thing about packer is that it can produce all sorts of images, like 
Docker, Amazon, etc...

HTH...

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

-- 
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/SN6PR15MB2416465148C19FDB0C9B494CAAB70%40SN6PR15MB2416.namprd15.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.