Files
dxin fb361c2854 +1
2025-10-17 22:11:23 +08:00

29 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

pipeline {
agent any
stages {
stage('拉取镜像') {
steps {
// 登录镜像仓库
withCredentials([usernamePassword(credentialsId: 'dxin_img_hub_auth', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh '''
echo "$REGISTRY_PWD" | docker login ${REGISTRY} -u ${REGISTRY_USER} --password-stdin
'''
}
// 拉取镜像
sh "docker pull uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:${IMAGE_TAG}"
}
}
stage('展示镜像Label信息') {
steps {
sh "docker inspect --format='{{json .Config.Labels}}' uswccr.ccs.tencentyun.com/lessie.s2/lessie-sourcing-agents:${IMAGE_TAG}"
}
}
stage('部署镜像') {
steps {
// 这里可以添加具体的部署逻辑例如使用docker-compose或kubectl进行部署
echo "这是部署步骤"
}
}
}
}