可以在Jenkins中使用Docker插件使以下代码更漂亮吗?

时间:2019-04-04 13:11:43

标签: jenkins

这是我当前的代码。我没有一种明显的方法来实现Docker插件来使以下代码更漂亮。

尤其是当我在docker-compose中而不是Jenkins的Docker-plugin中进行实际的Docker构建时。

尽管技巧和反馈会很棒。

tag=$(git describe --abbrev=0 --tags)
docker tag denpal:latest development/denpal:latest
docker tag denpal:latest development/denpal:$tag
docker push development/denpal:latest
docker push development/denpal:$tag

docker tag denpal_nginx:latest development/denpal_nginx:latest
docker tag denpal_nginx:latest development/denpal_nginx:$tag
docker push development/denpal_nginx:latest
docker push development/denpal_nginx:$tag

docker tag denpal_php:latest development/denpal_php:latest
docker tag denpal_php:latest development/denpal_php:$tag
docker push development/denpal_php:latest
docker push development/denpal_php:$tag

0 个答案:

没有答案