-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (38 loc) · 981 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
39
40
41
stages:
- test
- build_and_push
test:unit:
image: python:3.7-slim-buster
stage: test
script:
- apt-get update && apt-get install -y make
- make venv-test
- make unittests
test:integration:
image: python:3.7-slim-buster
stage: test
variables:
MOUNTEBANK_HOST: "mountebank"
services:
- name: registry.gitlab.com/soerenschneider/mountebank-docker
alias: mountebank
script:
- apt-get update && apt-get -y install make curl
- curl -X POST --data @mountebank/dyndns.json mountebank:2525/imposters
- make venv-test
- make integrationtests
build_and_push:
image: docker:latest
services:
- docker:dind
stage: build_and_push
tags:
- docker
script:
- export IMAGE_VERSION=${CI_COMMIT_TAG:-latest}
- docker build -t $CI_REGISTRY_IMAGE:$IMAGE_VERSION .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker push $CI_REGISTRY_IMAGE:$IMAGE_VERSION
only:
- master
- tags