Jenkins pipeline 中 checkout 代码
这句命令会将远端仓库的代码checkout 到jenkins的workspace 路径下。pipeline 中 具有checkout 功能的脚本命令如下。根据提示,workspace 路径下已经有了项目文件。执行过之后查看log如下。
·
pipeline 中 具有checkout 功能的脚本命令如下
git branch: "master", url: "https://gitee.com/liuboliu/******.git"
完整的脚本命令如下
pipeline {
agent any
stages {
stage('checkout') {
steps {
git branch: "master", url: "https://gitee.com/liuboliu/*****.git"
}
}
}
}
执行过之后查看log如下
根据提示,workspace 路径下已经有了项目文件
产看文件路径如下
由此可见
steps {
git branch: “master”, url: “https://gitee.com/liuboliu/*****.git”
} 这句命令会将远端仓库的代码checkout 到jenkins的workspace 路径下
更多推荐
所有评论(0)