Jenkinfile DSL how to specify target directory

后端 未结 5 1062
予麋鹿
予麋鹿 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条回答
  •  闹比i
    闹比i (楼主)
    2021-02-18 14:42

    This can be done by using the directive of dir:

    def exists = fileExists ''
    if (!exists){
        new File('').mkdir()
    }
    dir ('') {
      git url: ''
    }
    

提交回复
热议问题