1234567891011121314151617181920212223242526272829 |
- def git_auth="d4b4c06c-7a45-4969-a06d-8363858e81cd"
- def git_url="http://10.68.0.122:3000/fanyijian/k8s.git"
- def jenkins_home="/var/jenkins_home/workspace/k8s"
- def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue-jenkins"
- def release="${BUILD_NUMBER}"
- def projectList = project_name.split(",")
- def list2 = ['mchsrv','sharebms2']
- ansiColor('xterm') {
- node {
- stage('pull code') {
- echo "\u001B[32m############开始拉取代码############\u001B[0m"
- checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${git_auth}", url: "${git_url}"]]])
- }
- stage('build images') {
- for (int i = 0; i < projectList.length ; i++) {
- echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
- for (int j = 0 ; j < list2.size() ; j++) {
- if ("${projectList[i]}" == "${list2[j]}") {
- echo "11111111111"
- }else {
- echo "22222222222"
- }
- }
- }
- }
- }
- }
|