-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
38 lines (33 loc) · 1015 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
28
29
30
31
32
33
34
35
36
37
38
---
image: registry-bin.ebc/ebc-docker:17.03-ebc-2.0
.docker_service: &docker_service
image: registry-bin.ebc/ebc-docker:17.03-ebc-2.0
services:
- name: registry-bin.ebc/ebc-docker:17.03-dind-ebc-2.0
alias: docker
before_script:
- docker login -u "${PROJECT_REGISTRY_USER}" -p "${PROJECT_REGISTRY_USER_PASS}" "${EBC_REGISTRY_URL}"
stages:
- test
- release
variables:
CONTAINER_IMAGE_TAG: "${EBC_REGISTRY_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME}"
test::docker linter e build:
<<: *docker_service
stage: test
script:
- hadolint Dockerfile
- docker build --tag $CONTAINER_IMAGE_TAG .
release docker image:
<<: *docker_service
stage: release
script:
- docker build --tag $CONTAINER_IMAGE_TAG .
- docker push $CONTAINER_IMAGE_TAG
only:
- /^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)-alpha\d+$/
- /^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)-beta\d+$/
- /^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)-RC\d+$/
- /^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/
except:
- master