Checkout code in Jenkins pipeline

The script command with checkout function in the pipeline is as follows

  git branch: "master", url: "https://gitee.com/liuboliu/******.git"

The complete script command is as follows

pipeline {
    agent any
    stages {
        stage('checkout') {
            steps {
                  git branch: "master", url: "https://gitee.com/liuboliu/*****.git"
            }
        }
        
    }
}

After execution, view the log as followsPlease add a picture description

According to the prompt, there is already a project file under the workspace path.
The file path is as follows
Please add a picture description

It can be seen that
steps { git branch: “master”, url: “https://gitee.com/liuboliu/*****.git” } This command will checkout the code of the remote warehouse to the workspace path of jenkins Down

Guess you like

Origin blog.csdn.net/LIUXIAOXIAOBO/article/details/131254223