admin 管理员组

文章数量: 887021


2024年1月5日发(作者:ncre)

def project_url = "/***/"def gitlab_auth = "z***"def tag = "latest"def harbor_url = "192.168.*.*:9999"def harbor_project_name = "sysnthesis-cloud-dev"def imageName = "${project_name}:${tag}"node { def mvnHome stage('pull') { checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: "${gitlab_auth}", url: "${project_url}"]]]) } stage('structure') { sh "mvn -f cloud-common clean install" sh "mvn -f cloud-feign clean install" } stage('pack') { sh "mvn -f ${project_name} clean package dockerfile:build" sh "docker tag ${imageName} ${harbor_url}/${harbor_project_name}/${imageName}" } stage('uploading') { withCredentials([usernamePassword(credentialsId: '6c0f72aa-fab4-4be4-8889-*****', passwordVariable: 'password', usernameVariable: 'username')])

{ sh "docker login -u ${username} -p ${password} ${harbor_url}" sh "docker push ${harbor_url}/${harbor_project_name}/${imageName}" sh "echo 镜像上传成功" } } stage('issue') { sshPublisher(publishers: [sshPublisherDesc(configName: 'sysnthesis-cloud', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand:

"/root/sh/sysnthesiscloud/ $harbor_url $harbor_project_name $project_name $tag $port", execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) }}参数具体含义如下

over~


本文标签: 镜像 含义 上传 参数