Update .gitlab-ci.yml

This commit is contained in:
Administrator 2021-06-03 12:18:51 +00:00
parent 8e011a1de2
commit f89044c020

View File

@ -1,13 +1,14 @@
# This file is a template, and might need editing before it works on your project. # This file is a template, and might need editing before it works on your project.
docker-build: docker-build:
# Official docker image. # Official docker image.
image: docker:latest image: docker:20.10.6
stage: build stage: build
tags: tags:
- docker - docker
services: services:
- docker:dind - docker:20.10.6-dind
before_script: before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script: script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" . - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
@ -17,13 +18,14 @@ docker-build:
docker-build-master: docker-build-master:
# Official docker image. # Official docker image.
image: docker:latest image: docker:20.10.6
stage: build stage: build
tags: tags:
- docker - docker
services: services:
- docker:dind - docker:20.10.6-dind
before_script: before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script: script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" . - docker build --pull -t "$CI_REGISTRY_IMAGE" .