Update .gitlab-ci.yml file

This commit is contained in:
2021-03-03 01:19:39 +00:00
parent 550ba6df4a
commit 54a838c2da

View File

@@ -1,46 +1,16 @@
# This file is a template, and might need editing before it works on your project.
docker-build-master:
# Official docker image.
image: docker:18.09.7-dind
services:
- docker:18.09.7-dind
stages:
- build
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overl
DOCKER_TLS_CERTDIR: ""
before_script:
- docker info
# variables:
#DOCKER_HOST: tcp://localhost:2375
#DOCKER_DRIVER: overlay2
#DOCKER_TLS_CERTDIR: ""
#IMAGE_TAG: erichardson/py-eagle-mqtt:$CI_COMMIT_TAG
#IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script:
- docker version
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
docker-build:
# Official docker image.
image: docker:18.09.7-dind
build:
stage: build
image: docker:18.09.7-dind
services:
- docker:18.09.7-dind
variables:
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://localhost:2375/
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
- echo "hello world"