Run dev pipeline for *-run-dev branches: fix "docker push" to the next-attempt tag

This commit is contained in:
Suzanne Dupéron 2020-02-20 16:52:07 +01:00
parent ce4c2ee783
commit c4c79e69f2
2 changed files with 9 additions and 3 deletions

View File

@ -121,7 +121,7 @@ build-current-docker-image:
- build-and-package-debian-10
<<: *docker
script:
- sh scripts/build_docker_image.sh
- sh scripts/build_docker_image.sh next
- sh scripts/test_cli.sh
only:
- merge_requests
@ -134,7 +134,7 @@ build-and-publish-latest-docker-image:
dependencies:
- build-and-package-debian-10
script:
- sh scripts/build_docker_image.sh
- sh scripts/build_docker_image.sh $(if test "$CI_COMMIT_REF_NAME" = "dev"; then echo next; else echo next-attempt; fi)
- sh scripts/test_cli.sh
- echo ${LIGO_REGISTRY_PASSWORD} | docker login -u ${LIGO_REGISTRY_USER} --password-stdin
- docker push ${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:$(if test "$CI_COMMIT_REF_NAME" = "dev"; then echo next; else echo next-attempt; fi)

View File

@ -1,3 +1,9 @@
#!/bin/sh
set -e
docker build -t "${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:next" -f ./docker/distribution/debian/distribute.Dockerfile .
if test $# -ne 1 || test "x$1" = "-h" -o "x$1" = "x--help"; then
echo "Usage: build_docker_image.sh TAG_NAME"
exit 1
fi
docker build -t "${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:$1" -f ./docker/distribution/debian/distribute.Dockerfile .