-
Notifications
You must be signed in to change notification settings - Fork 0
/
oldgitlab-ciyaml
27 lines (24 loc) · 1.18 KB
/
oldgitlab-ciyaml
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
stages:
- build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build:
stage: build
script:
- docker build --tag $CI_REGISTRY_IMAGE/indexer/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/indexer/$CI_COMMIT_REF_NAME:latest --file indexer.Dockerfile .
- docker build --tag $CI_REGISTRY_IMAGE/mongo/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/mongo/$CI_COMMIT_REF_NAME:latest --file ./mongodb/mongodb.Dockerfile ./mongodb
- docker push $CI_REGISTRY_IMAGE/indexer/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/indexer/$CI_COMMIT_REF_NAME:latest
- docker push $CI_REGISTRY_IMAGE/mongo/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/mongo/$CI_COMMIT_REF_NAME:latest
except:
- tags
build-tags:
stage: build
script:
- docker build --tag $CI_REGISTRY_IMAGE/indexer:$CI_COMMIT_TAG --file indexer.Dockerfile .
- docker build --tag $CI_REGISTRY_IMAGE/mongo:$CI_COMMIT_TAG --file ./mongodb/mongodb.Dockerfile ./mongodb
- docker push $CI_REGISTRY_IMAGE/indexer:$CI_COMMIT_TAG
- docker push $CI_REGISTRY_IMAGE/mongo:$CI_COMMIT_TAG
only:
- tags