Re: Pipeline retry step

2021-02-08 Thread Graham Hay
Good idea, thanks.

On Mon, Feb 8, 2021 at 2:19 PM  wrote:

> Hi Graham,
>
> I have no ide … but why not test it?
>
> It’s quite straightforward:
>
>
>
> Retry(1) {
>
>Error(“This will fail … but how many times you will see this text?”)
>
> }
>
>
>
> Cheers,
>
> Gianluca.
>
>
>
>
>
> *From:* jenkinsci-users@googlegroups.com 
> *On Behalf Of *Graham Hay
> *Sent:* 08 February 2021 12:50
> *To:* Jenkins Users 
> *Subject:* Pipeline retry step
>
>
>
>
> https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#retry-retry-the-body-up-to-n-times
>
> Can someone clarify for me what retry(1) will do? Will that run the step
> twice, if it fails? Or does the count include the original attempt? (I
> tried to find the source code, but didn't even know where to start).
>
>
>
> Thanks,
>
>
>
> Graham
>
> --
> 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/4f974b15-a376-47ff-b6ea-199715275225n%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/4f974b15-a376-47ff-b6ea-199715275225n%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/Ku2uzb00f2A/unsubscribe.
> To unsubscribe from this group and all its topics, 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/00c401d6fe25%249371c480%24ba554d80%24%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/00c401d6fe25%249371c480%24ba554d80%24%40gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAJ4H%2BnqXcdfqwShnGLmazZ9qJWFjun-Lx5oQpPQhThbFRJMZKQ%40mail.gmail.com.


Pipeline retry step

2021-02-08 Thread Graham Hay
https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#retry-retry-the-body-up-to-n-times

Can someone clarify for me what retry(1) will do? Will that run the step 
twice, if it fails? Or does the count include the original attempt? (I 
tried to find the source code, but didn't even know where to start).

Thanks,

Graham

-- 
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/4f974b15-a376-47ff-b6ea-199715275225n%40googlegroups.com.


Re: Pipeline & GH pull requests

2017-02-16 Thread Graham Hay
In case anyone else is playing along (or for future me), I fixed the first
problem by specifying "master" instead of "*" for branches to build:

[image: Inline images 1]


It noticed force pushes after that too. And I discovered that the plugin
was listening
,
but the right event wasn't being sent by the webhook; so I added it (at the
org level):

[image: Inline images 2]
There doesn't seem to be any way to turn off concurrent builds, but there
is an issue here  tracking
it.

-- 
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/CAABECY2-h4grqv5QPk_C-iLKy7OSqq%2BhS5ewi9AkfgQUegN%2BxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Best practices for develop/release branch model with pipeline

2016-10-28 Thread Graham Hay
This is interesting, it's something I've been struggling with while 
converting our current system over to the new world (I really like the 
stage view!).

We currently have a "pipeline" of freestyle jobs, that pass artifacts down 
the line. Build (and test) -> Deploy to stage -> Deploy to prod. The last 
build uses pinned artifacts ("keep forever"), which allows us to rollback 
by unpinning the latest build. This is something I'd like to keep.

The one thing I don't understand is where I would define the deploy jobs? 
Isn't the whole point that everything is now in the Jenkinsfile, and under 
version control? Also, I don't seem to be able to point my existing 
freestyle job at the new pipeline build job, to retrieve artifacts. So what 
am I missing?

Thanks,

Graham

On Wednesday, October 26, 2016 at 4:26:17 PM UTC+1, Michael Lasevich wrote:
>
> I am not sure the stages you are talking about are same as what Jenkins 
> Pipelines calls stages.
>
> Jenkins, at its core, is a job server. In Pipelines, a stage is a segment 
> of a job. Stages of a build job would be something like "Build Binaries" or 
> "Upload Build Artifacts" - something that is part of one logical job. What 
> you are talking is a deployment process which is really a separate job from 
> a build job, and not really a "stage" of build. 
>
> So, my approach would be (and is, in some cases):
>
> * Set up a Pipeline build for the develop branch 
> * Make sure the build job archives either deployment artifact(s) or 
> pointer to them - something that can be used for deployment.
> * Set up a separate deployment job (can also be Pipeline) that takes in 
> parameters for a build run and target environment (stage, QA, UA, PreProd, 
> Production, whatever), and grabs artifacts/pointers from the selected run 
> and performs a deployment
>
> Now, if you want to get fancy, you make that first "build" job a 
> MultiBranch job that builds both develop and some versions of the feature 
> branches (I've used /feature/build/* pattern) and then modify the selection 
> of the job run to select from multiple branches (need to write a Groovy 
> based Parameter selector for that) - and now you can deploy builds from 
> feature branches for testing BEFORE they are merged into develop
>
> HTH,
>
> -M
>
>
>
>
>
>
>
> On Wednesday, October 26, 2016 at 4:21:23 AM UTC-7, Sathyakumar 
> Seshachalam wrote:
>>
>> New to Jenkins pipeline.
>>
>> My process is that developers work off of develop branch (Feature 
>> branches and merges of-course).
>> At any point in time, a release branch is branched off of develop  and 
>> then deployed to a stage environment, Once Accepted/approved, the same 
>> release branch is deployed into prod. (All immutable deployments).
>>
>> So am looking at atleast two stages that are only conditionally and 
>> manually entered  - stages being deploy to stg, deploy to prod and 
>> condition being the branch prefix. (Each stage will have build steps like 
>> deploy binaries, launch, run functional tests etc.,) and an automatic stage 
>> that is triggered only once per day (nightly) with build steps like deploy 
>> binaries, lunch, run and tear down).
>>
>> Is this kind of a workflow feasible with pipelines. If yes, Are there any 
>> recommendations/suggestions/pointers. 
>>
>> Thanks,
>> Sathya
>>
>

-- 
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/5fd36db7-d0bc-4c9f-ad33-75d0b325dfd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline & GH pull requests

2016-10-26 Thread Graham Hay
The answer was to tick this box:
[image: Inline images 1]
under Project Sources -> Repository Sources -> GitHub Org -> Advanced in
the folder configuration. I then got PR builds, with a branch named as
"PR-${prNumber}".

I think the fork PR version was ticked by default, but that's not our
workflow.

On 29 September 2016 at 15:44, Graham Hay <grahamr...@gmail.com> wrote:

> Is there any way to get the id of a pull request, in the brave new
> pipeline world? It was exposed as $ghprbPullId when using the GHPRB
> <https://github.com/janinko/ghprb> plugin.
>
> I'm using a GH Org Folder & Multibranch, with a Jenkinsfile.
>
> Also, what do I have to do to get something to appear in the pull requests
> folder (see attached)? There are open PRs.
>
> Thanks,
>
> Graham
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/fnphR6M-420/unsubscribe.
> To unsubscribe from this group and all its topics, 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/f8e8c340-3171-458b-af5b-bdf59dc7157e%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/f8e8c340-3171-458b-af5b-bdf59dc7157e%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/CAABECY3VngLZ%2BRu1-_cM8ykYLs4_Mq95kdyc5Czw-kR7_UpOKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline & GH pull requests

2016-09-29 Thread Graham Hay
Is there any way to get the id of a pull request, in the brave new pipeline 
world? It was exposed as $ghprbPullId when using the GHPRB 
 plugin.

I'm using a GH Org Folder & Multibranch, with a Jenkinsfile.

Also, what do I have to do to get something to appear in the pull requests 
folder (see attached)? There are open PRs.

Thanks,

Graham

-- 
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/f8e8c340-3171-458b-af5b-bdf59dc7157e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SSH Agent w/ passphrase

2015-12-07 Thread Graham Hay
Hi,

Is there any way to make the ssh agent plugin prompt for a passphrase? I'd 
prefer not to store the passphrase on jenkins.

I'm sure I can cobble something together with a build parameter and some 
shell, but I thought I'd make sure I wasn't missing something obvious first.

Thanks,

Graham

-- 
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/b2cf29b6-85f0-4338-9bb4-19f0fc9ac4f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.