1 Star 0 Fork 4

2839543 / training-jenkinsdocker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-持续集成-命令说明.txt 1.61 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
2839543 提交于 2015-09-14 16:42 . 增加注释
============================> dev-springemp <============================
#jenkins docker 命令说明
--persistent String parameter
2个参数
Registry_URL
image_repository
--Registry_URL
默认值:localhost
描述:registry仓库地址
例如:139.129.21.58:443
--image_repository
描述:
应用镜像名
csphere/my-web-app
--git
https://git.oschina.net/2839543/springemp.git
--Execute Shell 4 step
# build image
docker build -t ${Registry_URL}/${image_repository}:$GIT_COMMIT $WORKSPACE/
# push image to registry
docker push ${Registry_URL}/${image_repository}:$GIT_COMMIT
# tag with latest
docker tag -f ${Registry_URL}/${image_repository}:$GIT_COMMIT ${Registry_URL}/${image_repository}:latest
# push image to registry
docker push ${Registry_URL}/${image_repository}:latest
============================> test-springemp <============================
--persistent String parameter
4个参数
Registry_URL
image_repository
image_tag
test_url
--git
https://git.oschina.net/2839543/springemp.git
--Execute Shell
#增加可执行权限
chmod u+x deploy.sh init.sh test-script.sh
#执行测试
./test-script.sh
--增加邮件通知
============================> prod-springemp <============================
--persistent String parameter
4个参数
Registry_URL
image_repository
image_tag
image_new_tag
--Execute Shell
# new tag
docker tag -f ${Registry_URL}/${image_repository}:${image_tag} ${Registry_URL}/${image_repository}:${image_new_tag}
# docker push image
docker push ${Registry_URL}/${image_repository}:${image_new_tag}
1
https://gitee.com/2839543/training-jenkinsdocker.git
git@gitee.com:2839543/training-jenkinsdocker.git
2839543
training-jenkinsdocker
training-jenkinsdocker
master

搜索帮助

14c37bed 8189591 565d56ea 8189591