-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (60 loc) · 1.45 KB
/
.travis.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
image: docker:latest
services:
- docker:dind
stages:
- build
- analyse
- pre-release
- release
variables:
CONTAINER_STAGING_IMAGE: registry.gitlab.com/kataik/environmenttracker:${CI_BUILD_REF_NAME}
CONTAINER_RELEASE_IMAGE: registry.gitlab.com/kataik/environmenttracker:latest
DOCKER_DRIVER: overlay
#before_script:
# - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
.shared: &restriction
only:
- master
tags:
- docker
.registry: ®istry
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
build:
<<: *restriction
stage: build
image: microsoft/dotnet:1.0.4-sdk
script:
- cd ./src
- /bin/bash ./build.sh
- mkdir ./doc
- mv $(find . | grep -E /doc/.*\.xml | xargs) -t ./doc
artifacts:
expire_in: 3 days
paths:
- src/publish
- src/test
- src/doc
analyse:
<<: *restriction
stage: analyse
image: sdldevelopers/sonar-scanner:latest
script:
- sonar-scanner
prerelease:
<<: *restriction
<<: *registry
stage: pre-release
script:
- docker build -t $CONTAINER_STAGING_IMAGE -f ./Dockerfile.publish .
- docker push $CONTAINER_STAGING_IMAGE
release:
<<: *restriction
<<: *registry
stage: release
script:
- docker pull $CONTAINER_STAGING_IMAGE
- docker tag $CONTAINER_STAGING_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
when: manual
dependencies: []