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

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, [email protected] 
> 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 
>>> <https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Multibranch+Plugin> 
>>> do 
>>> what you want? Still sounds like a bug though.
>>>
>>> On Friday, 8 April 2016 17:06:59 UTC+10, [email protected] 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, [email protected] 
>>>> 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 
>>>>>> [email protected]:
>>>>>>>
>>>>>>> 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 [email protected].
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.

Reply via email to