2 Star 0 Fork 1

SMS-DEV/message-adapter-manager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Jenkinsfile 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
zjy 提交于 2020-08-26 16:48 . merge release
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"
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/SMS-DEV/message-adapter-manager.git
git@gitee.com:SMS-DEV/message-adapter-manager.git
SMS-DEV
message-adapter-manager
message-adapter-manager
master

搜索帮助