-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
35 lines (31 loc) · 829 Bytes
/
.gitlab-ci.yml
File metadata and controls
35 lines (31 loc) · 829 Bytes
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
28
29
30
31
32
33
34
35
---
image: docker:latest
variables:
MX_REGISTRY: docker-local.artifactory.internal.mx
MX_REGISTRY_IMAGE: ${MX_REGISTRY}/mx/platform/docbot
IMG: ${MX_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
ARTIFACTORY_URL: "https://docker-local.artifactory.internal.mx/"
build-feature:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $CI_COMMIT_MESSAGE =~ /BUILD_FEATURE_BRANCH/i
when: always
- when: manual
before_script:
- docker login -u gitlabci -p "{JWT}${CI_JOB_JWT}" $MX_REGISTRY
script:
- docker build -t "$IMG" .
- docker push "$IMG"
build:
only:
- master
except:
- pipelines
stage: build
image: docker:latest
before_script:
- docker login -u gitlabci -p "{JWT}${CI_JOB_JWT}" $MX_REGISTRY
script:
- docker build -t "$IMG" .
- docker push "$IMG"