代码拉取完成,页面将自动刷新
node {
def mvnHome
stage('Preparation') {
echo "Checkout Source Code"
git 'https://gitee.com/SMS-DEV/message-adapter-manager.git'
mvnHome = tool 'M3'
}
stage('Maven Build') {
echo "Build Package"
withEnv(["MVN_HOME=$mvnHome"]) {
if (isUnix()) {
sh '"$MVN_HOME/bin/mvn" -Dmaven.test.failure.ignore clean package'
} else {
bat(/"%MVN_HOME%\bin\mvn" -Dmaven.test.failure.ignore clean package/)
}
}
}
stage('Docker Build Image'){
echo "Docker Build"
sh "sudo -i"
sh "aws ecr get-login --no-include-email --region cn-northwest-1"
sh "docker build -t message-adapter-manager ."
}
stage('Docker Tag Image'){
echo "Docker Tag latest"
sh "docker tag message-adapter-manager:latest 297669174308.dkr.ecr.cn-northwest-1.amazonaws.com.cn/message-adapter-manager:latest"
}
stage('Push Image') {
echo "Push Docker"
docker.withRegistry('https://297669174308.dkr.ecr.cn-northwest-1.amazonaws.com.cn', 'ecr:cn-northwest-1:aws_ecr_credentials') {
sh "docker push 297669174308.dkr.ecr.cn-northwest-1.amazonaws.com.cn/message-adapter-manager:latest"
}
}
stage('Deploy Service') {
echo "deploy Service"
sh "aws ecs update-service --cluster arn:aws-cn:ecs:cn-northwest-1:297669174308:cluster/LvNing-SMS-Custers --service arn:aws-cn:ecs:cn-northwest-1:297669174308:service/message-adapter --force-new-deployment"
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。