创建一个流水线job,没有的去插件里面安装pipline
pipline 代码
pipeline {
agent any
stages {
stage('clean dir') {
steps {
sh "rm -rf *"
}
}
stage('拉取代码') {
steps {
checkout scmGit(branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: '95235efc-cb4b-4eb3-8d4b-db8d2d8c6409', url: 'http://192.168.189.131/root/springbootdemo.git']])
echo "拉取成功"