Jenkinfile DSL how to specify target directory

后端 未结 5 1064
予麋鹿
予麋鹿 2021-02-18 14:17

I\'m exploring Jenkins 2.0 pipelines. So far my file is pretty simple.

node {
    stage \"checkout\"
    git([url:\"https://github.com/luxengine/math.git\"])

           


        
5条回答
  •  日久生厌
    2021-02-18 14:35

    First make clear that you are using Jenkins Job DSL.

    You can do this like this:

        scm {
            git {
                wipeOutWorkspace(true)
                shallowClone(true);
                remote {
                    url("xxxx....")
                    relativeTargetDir('checkout-folder')
                }
            }
        }
    
    • https://jenkinsci.github.io/job-dsl-plugin/

    This above address gives you the chance simply to type in upper left aread for example 'scm' and than it will show in which relationships 'scm' can be used. Than you can select 'scm-freestylejob' and afterwards click on the '***' than you can see the details.

    The general start point for Jenkins Job DSL is here:

    • https://github.com/jenkinsci/job-dsl-plugin/wiki

    You can of course ask here on SO or on Google Forum:

    • https://groups.google.com/forum/#!forum/job-dsl-plugin

提交回复
热议问题