Use the git shortref as tag for Docker images. (#14901)
This commit is contained in:
Родитель
c87218760a
Коммит
ed462100e4
|
@ -23,7 +23,7 @@ commands:
|
|||
name: Build docker image and push to repo
|
||||
command: |
|
||||
docker version
|
||||
docker build -t app:build -f << parameters.dockerfile >> .
|
||||
docker build -t app:build -f << parameters.dockerfile >> --label git.commit="$CIRCLE_SHA1" .
|
||||
docker tag app:build "${DOCKERHUB_REPO}":<< parameters.image_tag >>
|
||||
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
|
||||
docker push "${DOCKERHUB_REPO}":<< parameters.image_tag >>
|
||||
|
|
Загрузка…
Ссылка в новой задаче