Jenkins使用步骤:
1.点击“新建任务”,进行任务的创建

2.输入任务名称,并选择“流水线”

3.勾选“GitHub项目”,并写入github对应的仓库链接

4.在“流水线”脚本中,写入需要执行的脚本,包括拉去GitHub的命令

具体代码
pipeline {
agent any
stages {
stage("stage 1") {
steps{
echo "hello world"
}
}
stage('拉取代码') {
steps {
git([branch:'main',url:'https://github.com/StupidTAO/WelfareSystem.git'])
}
}
}
}
302

被折叠的 条评论
为什么被折叠?



