|
|
|
@ -68,7 +68,7 @@ spec: |
|
|
|
|
stage('构建镜像') { |
|
|
|
|
steps { |
|
|
|
|
withCredentials([usernamePassword(credentialsId: '${DOCKER_REPOSITORY_CREDENTIAL_ID}', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) { |
|
|
|
|
container(name: 'docker', shell: 'sh') { |
|
|
|
|
container(name: 'docker', shell: 'echo') { |
|
|
|
|
sh """ |
|
|
|
|
docker build -t ${HARBOR_HOST}/${NAMESPACE_NAME}/${REPOSITORY_NAME}:${TAG} . |
|
|
|
|
docker login ${HARBOR_HOST} --username=${USERNAME} --password=${PASSWORD} |
|
|
|
|