Hi Thomas,
Yes, I've noticed the new version soon and I'm using it for about a week.
Sorry that I've not updated the maillist with my finding.
I'm using git for the groovy script and it works exactly the same as if I
used standalone git checkout.
I've just could not figure out how to correctly specify additional actions
like "Cleanup workdir after checkout".
If you know how to do that please let me know.
Thanks,
Timur
воскресенье, 1 февраля 2015 г., 0:59:20 UTC+3 пользователь Thomas Goeppel
написал:
>
> Hi Timur,
>
> good news, loading the CPS script from SCM (i.e. Git or SVN) is one of the
> new features in workflow plugin 1.2. Just add your script to your SCM,
> select "Groovy CPS DSL from SCM" instead of ""Groovy CPS DSL", enter your
> repository, and the name of your Groovy CPS script.
>
> I did a quick test with Subversion: it works, but I had to experiment a
> while with the settings to make my script work. It looks like Jenkins tries
> to be "smart" about the location of trunk/ in the repository path, which is
> odd, since the repository structure should be none of its business ;-)
>
> I also couldn't figure out what "Local module directory", and "Add module"
> are about. After setting the "Locale module directory", I had to add a "dir
> { }" instruction. Without that the script started in the wrong directory. I
> guess, that these are Subversion related issues.
>
> /Thomas
>
> On Monday, January 19, 2015 at 11:05:19 AM UTC+1, Timur Batyrshin wrote:
>>
>> Hi,
>>
>> I'd like to store the script for running the flow in Git but it looks
>> like I can't do the SCM checkout before running the flow.
>> I could write some additional lines in the flow script (one for checkout
>> and one "load" command) but the checkout commands
>> are too large in the current state (like:
>> checkout changelog: true, poll: true, scm: [$class: 'GitSCM', branches:
>> [[name: 'remotes/origin/master']], userRemoteConfigs: [[credentialsId:
>> 'XXXXXXX-XXXXXX-XXXXX-XXXXXXX', url: '
>> https://github.com/XXXXX/XXXXXX.git']]]
>> ).
>>
>> Is there a way to do the initial checkout using plain Jenkins checkout
>> feature or should I use this approach? Probably some other ways of doing
>> that?
>>
>>
>> Thanks,
>> Timur
>>
>
--
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/7677afc2-ef33-4560-a391-d526f4127370%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.