Hi Thomas, I use only "Groovy CPS DSL from SCM" for loading the workflow code and it works fine. It allocates a workspace named "workspace@script", does the checkout and runs workflow from it and all is fine.
Sorry for the confusion, I think I've meant different thing from another thread here when I was talking about additional actions. That is when I use the GeneralSCM step inside build flow I don't know how to add additional action there. Sorry again for breaking the topic. I really should have had some sleep till morning before posting an email. Thanks, Timur воскресенье, 1 февраля 2015 г., 17:57:14 UTC+3 пользователь Thomas Goeppel написал: > > Hi Timur, > > did I get this right, besides the "Groovy CPS DSL from SCM" you don't use > a general a "General SCM" step? > > In my understanding, loading the flow definition from an SCM is just a > special case of using multiple SCMs > <https://github.com/jenkinsci/workflow-plugin/tree/master/scm-step> (at > least that's what I would expect it to be). Did you try using an additional > "General SCM" step with the "Cleanup workdir" option active? > > /Thomas > > On Sunday, February 1, 2015 at 1:45:16 AM UTC+1, Timur Batyrshin wrote: >> >> 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/20e399bd-a0b6-4b2f-b5ce-25d454ec190b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
