2020-04-23 13:48:27 +00:00
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
image: docker:stable
|
|
|
|
variables:
|
|
|
|
IMAGE_REPO: hamravesh/rawfile-csi
|
|
|
|
script:
|
2020-05-29 14:07:55 +00:00
|
|
|
- export REGISTRY=docker.io
|
2020-04-23 13:48:27 +00:00
|
|
|
- mkdir -p ~/.docker/; echo $DOCKER_AUTH_CONFIG >~/.docker/config.json
|
|
|
|
- export IMAGE="$REGISTRY/$IMAGE_REPO"
|
2020-05-29 14:50:03 +00:00
|
|
|
- |
|
|
|
|
docker build \
|
|
|
|
-t $IMAGE:$CI_COMMIT_SHORT_SHA \
|
|
|
|
-t $IMAGE:$CI_COMMIT_REF_SLUG \
|
|
|
|
--build-arg IMAGE_TAG=$CI_COMMIT_SHORT_SHA \
|
|
|
|
--build-arg IMAGE_REPOSITORY=$IMAGE \
|
|
|
|
.
|
2020-04-23 13:48:27 +00:00
|
|
|
- docker push $IMAGE:$CI_COMMIT_SHORT_SHA
|
|
|
|
- docker push $IMAGE:$CI_COMMIT_REF_SLUG
|
|
|
|
tags:
|
|
|
|
- docker
|