This commit is contained in:
dxin
2025-10-17 22:11:23 +08:00
parent 7546bfe2d6
commit fb361c2854
5 changed files with 219 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
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 "这是部署步骤"
}
}
}
}