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 follows
According to the prompt, there is already a project file under the workspace path.
The file path is as follows
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