This repository has been archived by the owner on Dec 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
79 lines (74 loc) · 1.99 KB
/
.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
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
71
72
73
74
75
76
77
78
79
stages:
- build
- test
- release
build:
image: dbogatov/docker-images:net-core-latest
stage: build
script:
- printf "{\"Version\":{\"GitHash\":\"%s\"}}" $CI_BUILD_REF > src/version.json
- ./build.sh
artifacts:
expire_in: 90 min
paths:
- src/bin/
tags:
- docker
test-dotnet:
stage: test
image: dbogatov/docker-images:net-core-latest
script:
- export ASPNETCORE_ENVIRONMENT="Testing"
- printf "{\"Version\":{\"GitHash\":\"%s\"}}" $CI_BUILD_REF > src/version.json
- cd test
- dotnet restore
- ./test.sh | tee tests.out
- "cat tests.out | grep 'Failed: 0.'"
tags:
- docker
tidy:
image: dbogatov/docker-images:net-core-latest
stage: test
dependencies:
- build
before_script:
- export ASPNETCORE_ENVIRONMENT="Staging"
- cd src/bin/release/netcoreapp1.1/publish/
- dotnet shevastream.dll > /dev/null &
- sleep 15
script:
- curl -Ls http://localhost/ | tidy -e
- curl -Ls http://localhost/home/profile | tidy -e
- curl -Ls http://localhost/home/contact | tidy -e
- curl -Ls http://localhost/home/faq | tidy -e
- curl -Ls http://localhost/store/product | tidy -e
- curl -Ls http://localhost/store/product/1 | tidy -e
- curl -Ls http://localhost/store/cart | tidy -e
- curl -Ls http://localhost/blog | tidy -e
- curl -Ls http://localhost/blog/29 | tidy -e
tags:
- docker
blc:
image: dbogatov/docker-images:net-core-latest
stage: test
dependencies:
- build
before_script:
- export ASPNETCORE_ENVIRONMENT="Staging"
- cd src/bin/release/netcoreapp1.1/publish/
- dotnet shevastream.dll > /dev/null &
- sleep 15
script:
- blc --filter-level 3 --input http://localhost -rog --exclude "*linkedin.*"
tags:
- docker
release:
stage: release
dependencies:
- build
script:
- docker build -t registry.dbogatov.org/dbogatov/shevastream:$CI_BUILD_REF_NAME .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.dbogatov.org
- docker push registry.dbogatov.org/dbogatov/shevastream:$CI_BUILD_REF_NAME
tags:
- shell