Re: Tools update job on updates.jenkins.io seems to not be running (no updates since Dec 6th)

2017-12-15 Thread Greg Smith

Thank you Daniel.  

I will use a Infra jira issue next time.

Cheers,
Greg


-- 
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/0f74fcc9-9618-4db9-baba-d3452845cc98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Triggering a multibranch pipeline build from a URL Change

2017-05-26 Thread Greg Smith
Well, I haven't found a solution, but I have found why the scheme we had 
stopped working.  Seems this error is being thrown whenever the first 
triggering build runs:

RunListener failed
java.lang.NullPointerException
at hudson.model.Result.isBetterOrEqualTo(Result.java:130)
at 
jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:139)
at 
jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:89)
at 
jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.onCompleted(ReverseBuildTrigger.java:258)
at 
hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
at hudson.model.Run.execute(Run.java:1773)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)

On Wednesday, May 24, 2017 at 10:22:56 AM UTC-4, Greg Smith wrote:
>
>
> We would like to trigger a multibranch pipeline build whenever a file at a 
> URL changes.  We had a mechanism that worked, but a recent update broke 
> that mechanism.
>
> Here's what we had setup:
>
> URLTrigger used to trigger a Freestyle build, named "Stage1"
> Pipeline build that runs whenever "Stage1" build completes, called "Stage2"
> Pipeline build starts multibranch pipeline build in its script.
>
> This Rube Goldberg like series of steps were required because a Freestyle 
> build can not start a Pipeline build, but a Pipeline build can be triggered 
> by a Freestyle build.  A multibranch pipeline build can not be triggered by 
> a pipeline build, but a pipeline build can directly start a multibranch 
> pipeline build.
>
> At least, these used to be the rules.  We upgraded to the latest LTS 
> release (2.46.1 -> 2.46.2) and the ability for a pipleline build to be 
> triggered by the completion of a Freestyle build now seems to be gone.
>
> I can configure the Pipeline build to run when the Freestyle build 
> complete, but it never actually triggers.  
>
> Ugh -- was hoping someone might know what the current rules are, or point 
> me to a jira / bug.  I'm not even sure where to file such a problem report, 
> as I'm not sure if this is core Jenkins function, or something to do with 
> the pipeline plugins.
>
> Has anyone got a multibranch pipeline build triggered by a URL change?  
> Maybe I need to completely redesign this workflow.
>
> Thanks much,
> Greg
>
>

-- 
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/fb5697a1-bf21-4002-baef-e7654ce290de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Triggering a multibranch pipeline build from a URL Change

2017-05-24 Thread Greg Smith

We would like to trigger a multibranch pipeline build whenever a file at a 
URL changes.  We had a mechanism that worked, but a recent update broke 
that mechanism.

Here's what we had setup:

URLTrigger used to trigger a Freestyle build, named "Stage1"
Pipeline build that runs whenever "Stage1" build completes, called "Stage2"
Pipeline build starts multibranch pipeline build in its script.

This Rube Goldberg like series of steps were required because a Freestyle 
build can not start a Pipeline build, but a Pipeline build can be triggered 
by a Freestyle build.  A multibranch pipeline build can not be triggered by 
a pipeline build, but a pipeline build can directly start a multibranch 
pipeline build.

At least, these used to be the rules.  We upgraded to the latest LTS 
release (2.46.1 -> 2.46.2) and the ability for a pipleline build to be 
triggered by the completion of a Freestyle build now seems to be gone.

I can configure the Pipeline build to run when the Freestyle build 
complete, but it never actually triggers.  

Ugh -- was hoping someone might know what the current rules are, or point 
me to a jira / bug.  I'm not even sure where to file such a problem report, 
as I'm not sure if this is core Jenkins function, or something to do with 
the pipeline plugins.

Has anyone got a multibranch pipeline build triggered by a URL change?  
Maybe I need to completely redesign this workflow.

Thanks much,
Greg

-- 
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/781fc5fb-281a-4374-9edd-0a7ea19810d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Way to trigger another build on "Keep this build forever"?

2017-01-12 Thread Greg Smith

Hi,

I would like to create a build that is triggered whenever a user clicks 
"keep this build forever" within any build.

I want to run a build that backs that those artifacts up, pushes it to 
another file server.

Is there any way I can create a build that is triggered on such an event?

Cheers,
Greg

-- 
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/bc2e6837-acf3-4ccb-928d-5340fdf70eb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline: How to trigger buld on URL change?

2016-12-14 Thread Greg Smith

Hi,

Pre moving all of our builds over to Pipeline, we had a few builds that 
required being triggered off of a URL change.

We used the URL Trigger plugin, available here:
https://wiki.jenkins-ci.org/display/JENKINS/URLTrigger+Plugin

We'd like to still have something like this for our current setup.  All of 
our projects have moved to the Github / Multibranch Pipeline plugin, so 
every one of our builds are defined by Jenkinsfiles, and the project 
properties are defined in our Jenkinsfiles.

Is there a nice way to get the same kind of build trigger that was possible 
with the URLTrigger plugin?  It does not appear that that plugin as been 
updated in forever, so I don't believe it supports Pipeline configuration.  

Anything taking its place?

Or, workarounds others have used?

Thanks,
Greg

-- 
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/d38af720-294c-4062-921e-2537a6c20621%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins slaves hang on JNA load on Windows 10

2016-11-02 Thread Greg Smith

Hi,

Me and my team have been struggling with a hang on our Windows 10 slaves, 
that is being caused by a bad interaction of loading JNA modules.  It looks 
like the SwapSpaceMonitor tries load one module, at the same time that the 
Kernel32Utils.getWin32FileAttributes() call tries to load another JNA 
module, and the slave hangs.

What's really frustrating about this is that it causes all builds to hang, 
not just the single build on the slave.  This deadlock situation seems to 
cause the Jenkins master to just stop handling any other Pipeline builds.

Below are the 2 thread stacks that really symbolize the problem.  And here 
is the Jira report where I have been keeping full thread dumps and my 
investigation notes:
https://issues.jenkins-ci.org/browse/JENKINS-39179

We've been able to recreate this on all recent versions of Jenkins (2.26, 
2.19.1 and 2.19.2 LTS editions) and even tried swapping Java 7/8 on the 
endpoint to get it to go away.  It just keeps happening, and when it does 
-- all builds stop until I kill the slave with the deadlock.  This is 
happening basically 1 to 2 times a day, and when it happens, I get 30 
people screaming at me.  It was my idea to move us over to Jenkins 2.X and 
Pipeline style builds, so I'm getting a lot of heat about this.

What's amazing to me too is:  How is this only happening to us?  It seems 
like the kind of lock up problem that would be occurring to lots of people 
-- We're not doing anything that strange or unique.

And I've found a few bugs with references to similar thread stacks, and 
most are from about 1 year ago.  So why this big problem now.

Anyway, I'm just putting this out there because I'm hoping to find someone 
else that this is happening to, so we can compare notes.  

Cheers,
Greg



"pool-1-thread-4 for channel" Id=16 Group=main RUNNABLE
at com.sun.jna.Native.initIDs(Native Method)
at com.sun.jna.Native.(Native.java:148)
at hudson.util.jna.Kernel32Utils.load(Kernel32Utils.java:112)
at hudson.util.jna.Kernel32.(Kernel32.java:37)
at 
hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:77)
at 
hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:98)
at hudson.Util.isSymlink(Util.java:510)
at hudson.FilePath.deleteRecursive(FilePath.java:1221)
at hudson.FilePath.access$1000(FilePath.java:195)
at hudson.FilePath$14.invoke(FilePath.java:1201)
at hudson.FilePath$14.invoke(FilePath.java:1198)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Number of locked synchronizers = 1
- java.util.concurrent.ThreadPoolExecutor$Worker@11c41d99

pool-1-thread-6 for channel

"pool-1-thread-6 for channel" Id=26 Group=main RUNNABLE
at com.sun.jna.Pointer.(Pointer.java:41)
at com.sun.jna.Structure.(Structure.java:2078)
at org.jvnet.hudson.Windows.monitor(Windows.java:42)
at 
hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:124)
at 
hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Number of locked synchronizers = 1
- java.util.concurrent.ThreadPoolExecutor$Worker@17011895

-- 
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/45bdea71-95e9-4841-b18d-9b83a8fa673b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


vCenter plugin -- customize slave launch parameters?

2016-10-27 Thread Greg Smith

Does anyone know if there is a way to customize the launch parameters of 
the vCenter plugin slaves?

We use the plugin to dynamically start up our slave vms, and we would like 
to add a -D parameter to the startup.  But I don't see any obvious way to 
do this.

Any help appreciated.

Thanks,
Greg

-- 
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/3b895348-fe18-4ec9-8b2f-28dc849ca757%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


GitHub webhooks created with only Pull Request and Repository Events - No Push Events?

2016-10-18 Thread Greg Smith

Hi,

We are having a problem with GitHub and webhooks, and was hoping someone 
might have an idea of how to resolve.

We want to use webhooks for obvious reasons:  We're using the GitHub org 
plugin to scan our repos, and setup the Pipeline jobs.

I used the "Re-register hooks for all jobs" button on the Configure System 
page -- and it did, it went through and configured all of the webhooks on 
our projects.

But it seems to have only registered the events of "Pull Request" and 
"Repository" events.  It didn't register the Push event -- so we are not 
receiving any events to kick off builds when a user actually pushes 
something to git.

This seems to be by design -- after all, it did register for events, 
selected these 2 instead of receiving all events -- so I am assuming this 
has something to do with some other config elsewhere?

How can we get the webhook management to include Push events in the 
registered list of events?

Thanks,
Greg

-- 
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/433a4d78-de5a-4141-a30b-72fc3afb73cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Logging github api requests - github rate limit being reached, 20% being used on static items

2016-10-12 Thread Greg Smith
Hi,

We keep running into our github rate limit with Jenkins' mutlibranch plugin.

I ended up contacting github directly, and they said 20% of all of our 
requests were actually going to resources that were basically static.  

>From github support, our usage over the last week:

Top 10 specific resources:
>
> /   97,571  10.37%
> /user   96,932  10.302%
>

Github support basically said that these are static (or almost static) -- 
but 20% of our rate limit was being used on these.  I do have the github's 
plugin cache setup and configured for 100mb, but it looks like its not even 
being used.

I would like to figure out why these resources are being used -- but I'm 
not sure where or how to turn on github api logging, so that I can figure 
out what is going on.

Does anyone know how best to log / get info on what the github plugin is 
using -- like when its going to the cache vs when its going to github?  

Thanks,
Greg
 

-- 
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/13d1f7b8-72d0-4b9f-a6a2-44b8b854185e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Logging github api requests - github rate limit being reached, 20% being used on static items

2016-10-12 Thread Greg Smith

Hi,

We keep running into our github rate limit with Jenkins' mutlibranch plugin.

I ended up contacting github directly, and they said 20% of all of our 
requests were actually going to resources that were basically static.  

>From github support, our usage over the last week:

Top 10 specific resources:
>
> /   97,571  10.37%
> /user   96,932  10.302%
>

Github support basically said that these are static (or almost static) -- 
but 20% of our rate limit was being used on these.  I do have the github's 
plugin cache setup and configured for 100mb, but it looks like its not even 
being used.

I would like to figure out why these resources are being used -- but I'm 
not sure where or how to turn on github api logging, so that I can figure 
out what is going on.

Does anyone know how best to log / get info on what the github plugin is 
using -- like when its going to the cache vs when its going to github?  

Thanks,
Greg
 

-- 
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/b5c26289-9cb2-4b23-bf2d-9d0b92d9ea5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What are the rules for when pipeline jobs are serialized?

2016-09-08 Thread Greg Smith

Ah -- Found the "@NonCPS" marker.   Seems to have gotten me past my 
original problem.

Cheers,
Greg


On Thursday, September 8, 2016 at 12:09:26 PM UTC-4, Greg Smith wrote:
>
>
> Hi,
>
> I just updated my Jenkins instance to all of the latest plugins, and now 
> many of my jobs are failing.  They are all failing because of serialization 
> problems:
>
> java.io.NotSerializableException: hudson.model.FreeStyleProject
>   at 
> org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
>
>
> Now, this pipleline groovy script was running fine, but now the rules for 
> when things are serialized has changed again, and its failing.
>
> Can someone point me to something about when / where / how serialization 
> of jobs should be happening, and what the rules are?  I'd like to build 
> pipeline scripts that work over time and through upgrades, but the rules 
> for when the job is serialized don't seem to be firm.
>
> Making sure that I am never using any object in my script that absolutely 
> can't be serialized is becoming a pain.  I can't seem to use any iterators, 
> or hold any object in a var that can't be serialized, even within a single 
> function.
>
> Cheers,
> Greg
>
>
>

-- 
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/32055461-2f0e-44ce-ae59-95cb3e0c9004%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What are the rules for when pipeline jobs are serialized?

2016-09-08 Thread Greg Smith

Hi,

I just updated my Jenkins instance to all of the latest plugins, and now 
many of my jobs are failing.  They are all failing because of serialization 
problems:

java.io.NotSerializableException: hudson.model.FreeStyleProject
at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)


Now, this pipleline groovy script was running fine, but now the rules for 
when things are serialized has changed again, and its failing.

Can someone point me to something about when / where / how serialization of 
jobs should be happening, and what the rules are?  I'd like to build 
pipeline scripts that work over time and through upgrades, but the rules 
for when the job is serialized don't seem to be firm.

Making sure that I am never using any object in my script that absolutely 
can't be serialized is becoming a pain.  I can't seem to use any iterators, 
or hold any object in a var that can't be serialized, even within a single 
function.

Cheers,
Greg


-- 
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/530d8c7c-2dbe-4a34-8e28-48641b328c37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-Branch Pipeline triggers interval example?

2016-08-22 Thread Greg Smith

As I hate searching groups for problems, finding exactly my problem, but 
not finding any answer -- I wanted to follow up on my own post.

I received this example of how to setup the job to build every 15 minutes

properties([pipelineTriggers([cron('H/15 * * * *')])])


When I filed a bug for the snippet generator and documentation not working, 
in this bug:
https://issues.jenkins-ci.org/browse/JENKINS-37477

Cheers,
Greg



-- 
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/7e45503a-9713-4fca-9531-f8deca5515c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Multi-Branch Pipeline triggers interval example?

2016-08-17 Thread Greg Smith

Hi,

Would someone mind giving me an example of how to use the "properties" task 
to set a build trigger so that a multibranch pipeline build will run every 
15 minutes?

Somehow, both the snippet generator and the pipeline syntax generator are 
both errorring out on my server, so I can not find any sample of how to do 
it correctly.

My snippet generator with the value of "H/15 * * * *" just generates the 
following:
pipelineTriggers([])

And the pipeline syntax generator shows the following:
$class: 'PipelineTriggersJobProperty'
triggers
Array/List:
java.lang.UnsupportedOperationException: do not know how to categorize 
attributes of type hudson.triggers.Trigger


So with both of those broken, I can't seem to find any good example of how 
to configure this new capability in my by branch build

Thanks,
Greg



-- 
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/cb6ed62f-377b-47a2-8af8-677e1e360245%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Can I use html in currentBuild.description?

2016-08-16 Thread Greg Smith
Thanks!  Just what I needed

On Tuesday, August 16, 2016 at 5:53:16 AM UTC-4, Jonathan Hodgson wrote:
>
> Use the Pegdown formatter plugin, Markdown allows for HTML tags.
>
> I've even got javascript working quite happily in the description, so 
> things update as certain artifacts are created.
>
>

-- 
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/01bba137-bfa1-4587-8eb2-f79bf354cb07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline: Can I use html in currentBuild.description?

2016-08-15 Thread Greg Smith

Hi,

Is there some simple way to allow html in currentBuild.description?  

Seems like when I write any html tags in that string, they are all 
automatically escaped.  I can see where it would be important to do this by 
default for security purposes -- but as we have control over our github 
instance, I would like to be able to allow it.

I want to create some basic links in the description to the deep artifacts 
that are being archived on the build.

Cheers,
Greg

-- 
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/b0a3f924-d938-4d97-ab44-33f5e82ab9fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Passing the artifacts of the current pipeline into a downstream job

2016-08-15 Thread Greg Smith
Never mind -- I seem to have found the solution to this:

1)  Set the freestyle project to use instead select the artifacts of "The 
upstream job that triggered this job" 
2)  Set the wait on the build value to false, so that the pipeline build 
does not wait on running the other freestyle build

These together seem to have fixed the problem (though I didn't try them 
individually, maybe I could have gotten away with one or the other...)

Greg

On Monday, August 15, 2016 at 12:11:00 PM UTC-4, Greg Smith wrote:
>
>
> Hi,
>
> I am trying to build a workflow where one a pipeline job passes its 
> artifacts into another (old style) job in Jenkins that we already have 
> defined.
>
> The freestyle job takes 2 parameters:  The project name, and the build 
> number.  It then copies the artifacts from "Project" / "Build Number" into 
> its workspace, and does stuff with it.
>
> In my pipeline job, I am first saving my artifacts, and then I am calling 
> my downstream job like this:
>
> build job: 'Publish MyJob', parameters: [string(name: 'PROJECT_NAME', 
> value: "${env.JOB_NAME}"), string(name: 'PROJECT_BUILD_NUMBER', value: 
> "${env.BUILD_NUMBER}")], wait: false
>
> The problem is that it seems that the downstream, freestyle project can't 
> access the artifacts of the currently, still running pipeline job.  In my 
> freestyle job, I'm getting this output:
>
> ERROR: Unable to find a build for artifact copy from: 
> Organization/MyJob/master
>
>
> What is the correct way for a pipeline job to start a downstream job with 
> the artifacts it just built?
>
> Thanks,
> Greg
>
>

-- 
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/e7205517-10a3-4fa0-a754-a9fcba7553be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Passing the artifacts of the current pipeline into a downstream job

2016-08-15 Thread Greg Smith

Hi,

I am trying to build a workflow where one a pipeline job passes its 
artifacts into another (old style) job in Jenkins that we already have 
defined.

The freestyle job takes 2 parameters:  The project name, and the build 
number.  It then copies the artifacts from "Project" / "Build Number" into 
its workspace, and does stuff with it.

In my pipeline job, I am first saving my artifacts, and then I am calling 
my downstream job like this:

build job: 'Publish MyJob', parameters: [string(name: 'PROJECT_NAME', 
value: "${env.JOB_NAME}"), string(name: 'PROJECT_BUILD_NUMBER', value: 
"${env.BUILD_NUMBER}")], wait: false

The problem is that it seems that the downstream, freestyle project can't 
access the artifacts of the currently, still running pipeline job.  In my 
freestyle job, I'm getting this output:

ERROR: Unable to find a build for artifact copy from: Organization/MyJob/master


What is the correct way for a pipeline job to start a downstream job with 
the artifacts it just built?

Thanks,
Greg

-- 
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/29862cd5-1b1c-427f-a3dd-45af03bf3730%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Groovy code to access full path to a job, ie "Org/Project/branch" name

2016-08-11 Thread Greg Smith
Thanks!  That worked for exactly what I wanted.  

On Thursday, August 11, 2016 at 11:52:35 AM UTC-4, Cuong Tran wrote:
>
> Try getFullName()

-- 
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/21c1f278-dff7-4fc2-988f-857a552d641d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Groovy code to access full path to a job, ie "Org/Project/branch" name

2016-08-10 Thread Greg Smith

Hi,

I am using a groovy script to walk through all jobs, and find the 
multibranch jobs in a github project.  I want to get the full path name to 
the job, and I'm having problems figuring out what property to pull, even 
though I can see that the object knows its full path.

Here's what I mean -- Here's a sample of the code:

for (item in Jenkins.instance.items) { 
  println("Item " + item)
  if(item.hasProperty("items")) {
for(item1 in item.items) {
  println("Item " + item1)
  if(item1.hasProperty("items")) {
for(item2 in item1.items) {
  println("Item " + item2)
}
  }
}
  }
}

If I run this, I can see that the jobs found known their full path.  This 
outputs this:

Item jenkins.branch.OrganizationFolder@41f1ea07[MyOrg]
Item 
org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@6d24ed54[MyOrg/MyProject]
Item 
org.jenkinsci.plugins.workflow.job.WorkflowJob@5e6f7f42[MyOrg/MyProject/master]

I want to get "MyOrg/MyProject/master" -- obviously the WorkflowJob knows 
that's what it is.

But if I just look at item2.name, its just "master".  No property value seems 
to be the full path, which is what I need. I can calculate it pretty easy with 
getParent() calls, but it just feels like its already there, and I'm just not 
pulling the correct value...


Thanks for the help,
Greg

-- 
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/60b312db-4065-44a3-9508-7684af45a0dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Anyway to define and take an action on "Keep Artifacts Forever"

2016-08-01 Thread Greg Smith

Hi,

I would like to take an action (kick off a downstream job) on any artifacts 
that marked as "Keep Forever"

I would usually use the Promotion plugin for this, but this will be a mix 
of Multibranch Pipeline jobs and normal jobs -- and the Promotion plugin 
does not yet work with Pipeline.  

Does anyone have any ideas how I might be able to do this?  I am really 
missing the Promotion plugin with Pipeline jobs...

Cheers,
Greg



-- 
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/a21a50c4-9f24-464d-bcbb-c2750954fcf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is `concurrency: 1` on a stage in multibranch pipeline build supposed to apply to all branches for that build?

2016-07-29 Thread Greg Smith

Was watching the new release notes for some plugins, and happened to find 
this:

JENKINS-34547 <https://issues.jenkins-ci.org/browse/JENKINS-34547> 
Converted concurrency setting to a job property, allowing it to be defined 
in a multibranch Jenkinsfile via the properties step.

It looks like it is now possible to set concurrency so that it does go 
across all branches -- though I'm not sure how to use it yet, seems very 
promising.

Cheers,
Greg


On Tuesday, July 26, 2016 at 9:15:57 PM UTC-4, David wrote:
>
> I never found a good solution, but I am using the lockable resources 
> plugin (
> https://wiki.jenkins-ci.org/display/JENKINS/Lockable+Resources+Plugin). I 
> didn't need to define each resource manually:
>
> When the lock step is used in a Pipeline, if the resource to be locked 
>> isn't already defined in the Jenkins global configuration, it'll be set up 
>> automatically.
>
>
> On Tuesday, July 26, 2016 at 7:49:21 PM UTC-4, Greg Smith wrote:
>>
>> Hi David,
>>
>> Did you ever find a nice solution to this problem?  I would also like to 
>> lock builds for projects with multiple branches / PRs, but don't want to 
>> mess with using lockable resources (which seems to be the only solution 
>> right now that works with pipeline code, but it requires you define a 
>> resource for each project)
>>
>> Cheers,
>> Greg
>>
>>
>> On Thursday, May 12, 2016 at 4:23:50 PM UTC-4, David wrote:
>>>
>>> I have a Jenkinsfile in my repo, and one of the stages uses resources 
>>> shared across every branch, but I need to limit it to only one build at a 
>>> time. It seems that if two branches are being built simultaneously, they 
>>> don't respect the concurrency parameter and end up using the shared 
>>> resource at the same time.
>>>
>>> I'd like the branch builds to wait until the other branch is out of that 
>>> shared stage before entering, which is what i thought the concurrency 
>>> parameter would do.
>>>
>>> stage name: 'Source code checkout'
>>> node {
>>> checkout scm
>>> }
>>>
>>> // Tests reuse the same resources
>>> // I thought setting concurrency to 1 would avoid multiple branch builds 
>>> stepping on each other
>>> stage name: 'Test', concurrency: 1
>>> node {
>>> // This doesn't seem to be limited to one branch build at a time
>>> // How can I achieve 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/60360a11-eff1-4420-98e0-c293d0d1af59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.x Pipeline - parametrized build, parameters are not evaluated in Git

2016-07-26 Thread Greg Smith
We are currently using the multibranch plugin to rebuild old versions of 
our code using Jenkins 2.X pipeline style.

Our main branch just uses "checkout scm".  That builds and builds.

If we need to rebuild an old release, from a specific version, we create a 
branch from that version:

git branch oldversion1.2.3 

Now push that to your repo, and the multibranch plugin finds that branch, and 
rebuilds the old code.

Cheers,
Greg





On Tuesday, July 26, 2016 at 5:06:30 PM UTC-4, Francois Marot wrote:
>
> Has anyone any update or workaround on it ?
> I'd like to move the team to Jenkins 2 and use Jenkinsfile but not being 
> able to run a build against a specific branch or a specific commit is a 
> blocker in my case... I need to be able to build again old versions of my 
> software.
> I tried yesterday on up to date Jenkins and it is still KO
>
> Regards, Francois
>
> On Tuesday, May 10, 2016 at 12:05:50 PM UTC+2, thomas@teamaol.com 
> wrote:
>>
>> The multibranch is for sure something I will look into it but the 
>> mentioned behavior is
>> someting that has been working with Freestyle (as example). So yes  
>> agree ... sounds like a bug.
>>
>> On Sunday, May 1, 2016 at 2:19:17 PM UTC+2, Lionel Orellana wrote:
>>>
>>> Doesn't the Pipeline Multibranch Plugin 
>>>  
>>> do 
>>> what you want? Still sounds like a bug though.
>>>
>>> On Friday, 8 April 2016 17:06:59 UTC+10, thomas@teamaol.com wrote:

 I tested that with the first release candidate.
 *The issue is still there!*

 On Wednesday, April 6, 2016 at 8:10:09 AM UTC+2, thomas@teamaol.com 
 wrote:
>
> *Just to clarify*:
> The variable is required before using the content of the repository.
> That's true for the normal use of the Git plugin and also documented
> looking at the question icon (in both cases, normal and the pipeline 
> variant)
>
> The text:
>
>- *${ENV_VARIABLE}*
>It is also possible to use environment variables. In this case the 
>variables are evaluated and the result is used as described above.
>E.g. ${TREEISH}, refs/tags/${TAGNAME},...
>
>
> I think it is also logical. I would like to run a pipeline on "git 
> master" to deploy into production.
> But I also need to be able to run the pipeline for a feature branch 
> (which ends after the regression tests).
>
> Kind Regards,
> Thomas
>
>
> On Tuesday, April 5, 2016 at 1:36:48 PM UTC+2, Björn Pedersen wrote:
>>
>> Hi,
>>
>>  yes, I can confirm that behaviour. Taking a closer look at the log 
>> shows that any build wrappers that inject e.g. Environment vars are not 
>> running at this early stage. 
>> My guess is, that the assumption was that these wrappers are 
>> instantiated in the Jenkinsfile, so that they are not yet known. 
>>
>> Wether this is a good assumption in all use-cases is an open question.
>>
>> Björn
>>
>> Am Dienstag, 5. April 2016 09:47:50 UTC+2 schrieb 
>> thomas@teamaol.com:
>>>
>>> Hi,
>>>
>>> Mode: Pipeline script from SCM
>>>
>>>
>>> I tried to change working example to take a TAG as String parameter
>>> and to use *${TAG}* for the Branch using the Pipeline job in 
>>> Jenkins 2.x
>>> When trying this I get this:
>>>
>>>  > git rev-parse origin/${TAG}^{commit} # timeout=10
>>>  > git rev-parse ${TAG}^{commit} # timeout=10
>>> ERROR: Couldn't find any revision to build. Verify the repository and 
>>> branch configuration for this job.
>>>
>>>
>>> It looks to me that the variable TAG is not evaluated. Using "master" 
>>> instead
>>> of "${TAG}" works fine.
>>>
>>>
>>> Bug? I guess so.
>>>
>>>
>>> Kind Regards,
>>>
>>> Thomas
>>>
>>>
>>> PS: I tried to register at Jenkins JIRA but it's a nightmare. Either 
>>> the captcha popup appears
>>> after hours, or it timeouts or I get null pointer exception after 
>>> submitting or whatever.
>>>
>>> After 20 minutes I gave up. So don't ask me to write a ticket please ;)
>>>
>>>

-- 
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/fe480e76-1dc0-4cb2-a8f7-92535c19b53e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is `concurrency: 1` on a stage in multibranch pipeline build supposed to apply to all branches for that build?

2016-07-26 Thread Greg Smith
Hi David,

Did you ever find a nice solution to this problem?  I would also like to 
lock builds for projects with multiple branches / PRs, but don't want to 
mess with using lockable resources (which seems to be the only solution 
right now that works with pipeline code, but it requires you define a 
resource for each project)

Cheers,
Greg


On Thursday, May 12, 2016 at 4:23:50 PM UTC-4, David wrote:
>
> I have a Jenkinsfile in my repo, and one of the stages uses resources 
> shared across every branch, but I need to limit it to only one build at a 
> time. It seems that if two branches are being built simultaneously, they 
> don't respect the concurrency parameter and end up using the shared 
> resource at the same time.
>
> I'd like the branch builds to wait until the other branch is out of that 
> shared stage before entering, which is what i thought the concurrency 
> parameter would do.
>
> stage name: 'Source code checkout'
> node {
> checkout scm
> }
>
> // Tests reuse the same resources
> // I thought setting concurrency to 1 would avoid multiple branch builds 
> stepping on each other
> stage name: 'Test', concurrency: 1
> node {
> // This doesn't seem to be limited to one branch build at a time
> // How can I achieve 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/175f7dcb-82a3-41d0-afae-f86c2391b4a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Permissions required to see Pipeline documentation and Snippet Generator?

2016-07-26 Thread Greg Smith

Hi,

I am using github organization to manage our transition to Jenkins' new 
Pipeline build model.  

I would like for my users to be able to see the Pipeline documentation, and 
to use the snippet generator.  The problem is, I can't seem to figure out 
how to do that without making users an admin.

They have the ability to read / view projects -- but the Pipeline 
documentation seems to need something else.

Does anyone know exactly which permission flag gives users access to the 
Pipeline documentation links along the left side?

Cheers,
Greg

-- 
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/d8b3b911-edb8-4919-af16-0ce28b1b610f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Exact permissions required for Github Organization plugin?

2016-07-26 Thread Greg Smith
Thanks!  Yes, just what I was looking for.

On Monday, July 25, 2016 at 6:14:22 PM UTC-4, Mark Waite wrote:
>
> Step 5 at https://hub.docker.com/r/jenkinsci/pipeline-as-code-github-demo/ 
> says 
> "Configure a personal access token with these scopes: repo:status and 
> public_rep"
>
> Is that what you're seeking?
>
> Mark Waite
>
> On Mon, Jul 25, 2016 at 4:06 PM Greg Smith <smithg...@gmail.com 
> > wrote:
>
>>
>> Anyone know or have a link to the list of permissions needed for the 
>> github organization project type / plugin?
>>
>> We are not using hooks back, so it just needs to browse our org, and 
>> update PRs / build information.
>>
>> Any pointers -- I swear I found this once before, but google is failing 
>> me and I can not find it again.
>>
>> Thanks,
>> Greg
>>
>> -- 
>> 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/0c588cbb-f82d-4cac-8ddf-08b664dd3c84%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/0c588cbb-f82d-4cac-8ddf-08b664dd3c84%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/8bbe2eac-ce9d-4b31-bbfc-7a10fccc58a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Exact permissions required for Github Organization plugin?

2016-07-25 Thread Greg Smith

Anyone know or have a link to the list of permissions needed for the github 
organization project type / plugin?

We are not using hooks back, so it just needs to browse our org, and update 
PRs / build information.

Any pointers -- I swear I found this once before, but google is failing me 
and I can not find it again.

Thanks,
Greg

-- 
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/0c588cbb-f82d-4cac-8ddf-08b664dd3c84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to simplify creation/maintenance of builds that are comparable?

2016-07-21 Thread Greg Smith

Here is the solution that worked best for me:

I have a project that builds a set of tools that I use across multiple 
builds.  Before moving to pipeline, it includes build utilities, build 
scripts, stuff like that.

When I moved to Pipeline, I now build that project from Git, and then in my 
other projects, I have a bootstrap Jenkins file that basically does the 
following steps within a node() {}:
-  checkout scm
-  Copy artifacts from build utilities project
-  load 'buildutilties/topLevelBuild.groovy'
-  topLevelBuild.build()

In my "topLevelBuild.groovy" file, I define all of my common build steps, 
and I use the build() as the main entry point. 

For the artifact copy, you can use a selector to determine which version of 
the build utilities you want to copy over.

With this strategy, I can change all of my builds by just checking in a new 
version of topLevelBuild.groovy, letting that rebuild, and then the other 
projects just pick it up.

Cheers,
Greg


On Wednesday, July 20, 2016 at 1:24:46 PM UTC-4, Marco Pas wrote:
>
> We just took to step to move our CI environment to Jenkins 2. We see that 
> we are creating the same build over and over. The jenkinsfile is great, but 
> now we see that we need to repeat it in every project. At the end that 
> becomes it maintenance nightmare..
>
> We have multiple git projects that are equal in structure and need to be 
> build in the same way.
>
> Example:
> gitrepo - App1 - Jenkinsfile (MultiBranchPipeline)
> gitrepo - App2 - Jenkinsfile (MultiBranchPipeline)
> gitrepo - App3 - Jenkinsfile (MultiBranchPipeline)
> 
>
> We are actually coping the same Jenkinsfile to these projects and if we 
> need a change we need to adapt all of them. So this becomes a nightmare.
>
> Is there a better way of organizing this and getting a repeatable way of 
> doing things?
>
> - Marco
>

-- 
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/18008772-04ac-4469-aed7-83613fb1dd72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


vCenter Plugin -- where is current launched slaves info kept?

2016-07-21 Thread Greg Smith

Hi,

I am having a problem with the vCenter plugin, which I use to dynamically 
start up slave machines:

Right now, my cap is set to 1 (for testing purposes) and I am getting this 
in my logs:

There are 1 number of VMs in this bucket. The instance cap for the bucket is: 1

But that slave is gone - it was removed from my vcenter by our admin.  I've 
restarted Jenkins a few times, but it just seems to be keeping this info on a 
slave that removed somewhere -- not sure where though.

Does anyone know where the information on the current list of slaves is kept, 
and how I can reset what Jenkins / the vCenter plugin currently "know" as 
defined slaves?

Thanks,
Greg

-- 
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/e2dd622f-bf39-4be8-a4a0-7708bd6ebb54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can I add a "publish" button to a build page

2016-07-12 Thread Greg Smith
I have exactly this same need, but with pipeline builds.  

The Promotion plugin works awesome for regular builds, but unfortunately 
does not work with pipeline builds.  

I created this Jira to track enhancing the plugin to support pipeline 
builds:  https://issues.jenkins-ci.org/browse/JENKINS-36089

Has anyone found any other solution for this use case (Need to take actions 
on a specific build) when using multibranch pipeline builds?

Cheers,
Greg


On Tuesday, July 12, 2016 at 9:24:00 AM UTC-4, Eric Pyle wrote:
>
> You might take a look at the Promoted Builds plugin. It allows you to 
> manually "promote" a particular build, and trigger other actions. It's 
> designed exactly for this sort of situation.
>
> Eric
>
> On 7/12/2016 8:57 AM, Jonathan Hodgson wrote:
>
> Hi, 
>
> If a build is successful (compiled correctly, passed all tests), I may 
> then want to send it out to beta testers. Which means copying the built 
> binary to a location where they can find it, and sending out emails. I 
> don't want to do this for exery successful build though.
>
> A sensible solution is seems to me would be to have a button on the build 
> page where I could trigger a groovy script to do this. Is there a plugin 
> which would facilitate this?
>
> regards
>
> Jon
> -- 
> 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/22e1eeef-42a3-4604-ba1a-5731e1b91efd%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
>
> * Eric Pyle * 
> Release Engineer 
> Lebanon 
> +1 603-277-3060 (T)
> +1 603-359-8670 (M)
> eric...@cd-adapco.com  
> http://www.cd-adapco.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/f081859c-0aa8-4fb5-8f42-6a6380f37577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Best way to set a timestamp variable in Pipeline build

2016-07-11 Thread Greg Smith

Thanks,

That was my fix -- I went to that screen under Manage Jenkins and set those 
calls to be allowed in the sandbox.  

Thanks for the help.

Cheers,
Greg



On Friday, July 8, 2016 at 11:20:27 AM UTC-4, Baptiste Mathus wrote:
>
> Probably you simply want to allow that finding call.
> Open the /scriptApproval screen for that purpose.
>
> Depending on what you're trying to do. Maybe using long start = 
> System.currentTimeMillis() would suit your needs and be already whitelisted 
> (can't check just now).
>
> HTH
> Le 7 juil. 2016 9:51 PM, "Greg Smith" <smithg...@gmail.com > 
> a écrit :
>
>>
>> Hi,
>>
>> I would like to set a timestamp at the beginning of my pipeline build, 
>> put it into the environment, and reuse it throughout my build.  
>>
>> I found some sample code - but it no longer seems to work because of 
>> sandboxing of the groovy pipeline scripts.
>>
>> The code is:
>> env.TIMESTAMP = new 
>> java.text.SimpleDateFormat('MMddHHmmss').format(new Date())
>>
>> But I get this error now:
>>
>> org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
>> Scripts not permitted to use new java.text.SimpleDateFormat java.lang.String
>>  at 
>> org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectNew(StaticWhitelist.java:185)
>>
>> How should I be setting a timestamp value that I can reuse over throughout 
>> the rest of my build?
>>
>> Thanks,
>> Greg
>>
>>
>> -- 
>> 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/fae69470-a517-4167-a9fb-655170f92084%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/fae69470-a517-4167-a9fb-655170f92084%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/2a85bd7e-f073-481f-bf2b-aab850d915a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Best way to set a timestamp variable in Pipeline build

2016-07-07 Thread Greg Smith

Hi,

I would like to set a timestamp at the beginning of my pipeline build, put 
it into the environment, and reuse it throughout my build.  

I found some sample code - but it no longer seems to work because of 
sandboxing of the groovy pipeline scripts.

The code is:
env.TIMESTAMP = new java.text.SimpleDateFormat('MMddHHmmss').format(new 
Date())

But I get this error now:

org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts 
not permitted to use new java.text.SimpleDateFormat java.lang.String
at 
org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectNew(StaticWhitelist.java:185)

How should I be setting a timestamp value that I can reuse over throughout the 
rest of my build?

Thanks,
Greg


-- 
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/fae69470-a517-4167-a9fb-655170f92084%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


URL to the permalink of "Last saved build (marked "keep forever") - is there a url?

2016-06-14 Thread Greg Smith

Hi,

I use the Copy Artifacts plugin and the Promotion Plugin to mark builds 
that have moved to production level -- I promote them, and them they get 
marked "keep forever".

Is there a URL I can use to access this same build?  

IE, I can use the url like this to access the last build artifacts:  
https://{jenkins server}/view/{view name}/job/{job 
name}/lastSuccessfulBuild/artifact/

But I can't seem to find any docs or references to what the url would look 
like if I want to access the last saved forever build.  

Currently I use the Copy Artifacts plugin to move these artifacts into a 
downstream job -- but I'd like to also use a url reference to the same 
build too.

Along this same lines -- is there a list of urls / permalinks that I can 
just generally use or that are enabled on my Jenkins install?  Some way to 
list the current permalinks available?

Thanks for any help.

Cheers,
Greg

-- 
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/887b9a35-db5b-4c65-8402-2702c1291cd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Enable Manual Promotion of multibranch pipeline builds

2016-06-02 Thread Greg Smith

Hi,

I would like to enable a user to manually promote builds, that are defined 
by Jenkinfiles in a multibranch build configuration.

I'm not quite sure how to set this up, or if its possible.  Ideally it 
would work like this:

For any "master" branch in any project in our github organization, an 
approved person could select one of the builds that had already completed, 
and click "Promote".  That promotion would "Save artifacts forever", and 
kick off a downstream build with the promoted artifacts.

I was able to configure jobs like this before, with a Freestyle project.  
But I can't figure out how I should be doing this now with pipeline builds 
automatically configured by a scan of our github project sets.

Is this still possible, or should I be thinking differently with the new 
pipeline style of doing things.

Thanks,
Greg

-- 
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/6d661051-78ab-4761-b41d-0ee016522789%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline / Git question -- Use same information as used to retrieve Jenkinsfile

2016-05-31 Thread Greg Smith

Thank you -- This is exactly what I was looking for.  Now that I have it, 
and was able to search the docs for it, I don't know how I missed it

Thanks,
Greg


On Tuesday, May 31, 2016 at 11:54:25 AM UTC-4, Antonio Muñiz wrote:
>
> You can use `checkout scm` which will clone the repository at the same 
> revision than the previously fetched Jenkinsfile.
>
> -- 
> Antonio Muñiz
> Software Engineer
> CloudBees, Inc.
>

-- 
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/98fb0c47-3637-471c-b7ed-d8c947f07776%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Multibranch Pipeline / Git question -- Use same information as used to retrieve Jenkinsfile

2016-05-31 Thread Greg Smith

Hello,

I have a question that is probably obvious, but I couldn't seem to find it 
anywhere.  Apologies for my newbie question:

If I have a multibranch Pipeline job, does my Jenkinsfile need to do the 
git extract?  Or should that be assumed as part of the retrieval of the 
Jenkinsfile?

For example, lets say I have project "MyProject", with branch "master", 
with a Jenkins file like this:

node() {
   stage 'Checkout'
   // git -- Do I need to do the git checkout here??
   git credentialsId: '1ab8712b-28f4-498e-af0f-433b409675ea', url: 
'g...@github.com:smithgcovert/MyProject.git'

  // build stuff
}

Now I branch master to "newtestbranch" -- it has the same Jenkinsfile at 
the top.

1)  Do I even need the git extract step?  It would seem to be implied by 
the fact that the Jenkins file was found in that branch... but it seems i 
do from the testing I've done
2)  How can I pass the url and branch into the git step, so that I do not 
put a path to the repo in the file that is checked in?  

IE, I want the repo URL, and the branch being built, and the credentials 
used to do the extract to all be defined by the same url, branch, creds 
that were used to retrieve the Jenkinsfile.  It seems wrong to have any 
url, branch or credential information in the Jenkinsfile -- is there a way 
to say "extract the same as used to retrieve the Jenkinsfile"?

Thanks,
Greg

-- 
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/549e1e95-d6f2-4c40-83b4-b731fdbf2ba6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No link between a promoted build, and the build which was triggered by the promotion

2013-04-24 Thread greg . smith

Hi guys,

I'm having a problem where it seems like I am either doing something wrong, 
or have things mis-configured.  Here's my issue:

We use the promotion plugin to trigger a parameterized build.  Basically, 
that parameterized build just rebuilds the same SVN revision, but has an 
extra step of pushing out to a website.

When I promote the build, I get this in the promotion status of the build 
that was promoted:

CopyTools » promotion » Push To Content Server #3

Legacy code started this job.  No cause information is available
Building on master in workspace /var/lib/jenkins/jobs/CopyTools/workspace
Promoting CopyTools #7 http://192.168.10.42/job/CopyTools/7/
[parameterizedtrigger] no SubversionTagAction found -- is this project an SVN 
project ?
build hudson.plugins.parameterizedtrigger.BuildTrigger@5e8956ff SUCCESS
Finished: SUCCESS


Then, in the build that was caused by the trigger, I get this:

Started by upstream project CopyTools - WL/promotion/Push To Content Server 
build number 3
originally caused by:

   Legacy code started this job. No cause information is available



I can look and see that the promotion caused the triggered build, because the 
second build was started by Push To Content Server build number 3, and those 
match.


But is there any way to set this up so that there is actually a clickable link 
between the build that was promoted, and the build caused by the promotion?


Right now, I have to do a manual search to find the triggered build, based on 
the Started by text, and its really a pain.


Thanks for any advice,

Greg

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