-
-
Notifications
You must be signed in to change notification settings - Fork 106
/
.gitlab-ci.yml
27 lines (26 loc) · 822 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
build-master:
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE"/nginx -f DockerfileNginx .
- docker push "$CI_REGISTRY_IMAGE"/nginx
- docker build --pull -t "$CI_REGISTRY_IMAGE"/python -f DockerfilePython .
- docker push "$CI_REGISTRY_IMAGE"/python
only:
- master
# build:
# image: docker:latest
# stage: build
# services:
# - docker:dind
# 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