Files
jenkins-pipeline/SCM/初版本/deploy_image_lessie_agent_s1.groovy
2025-11-13 15:40:38 +08:00

27 lines
889 B
Groovy
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
parameters {
imageTag(
name: 'IMAGE_NAME',
description: '此处是 lessietest 命名空间内的镜像',
registry: 'https://uswccr.ccs.tencentyun.com',
image: 'lessietest/lessie-sourcing-agents',
credentialId: 'dxin_img_hub_auth',
filter: '.*',
defaultTag: 'latest',
verifySsl: true
)
}
stages {
stage('部署') {
steps {
script {
// 提取纯标签去掉附加的Label信息
def pureTag = params.IMAGE_NAME.split(' ')[0]
echo "开始部署镜像uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:${pureTag}"
// 部署命令如kubectl、docker run等
}
}
}
}
}