-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
91 lines (85 loc) · 2.23 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
80
81
82
83
84
85
86
87
88
89
90
91
stages:
- resources
- build
- test
- deploy
resources:
image: alazartech/doc:1.9.5
script:
- pipenv install
- pipenv run changelogparser version -i CHANGELOG.md -o version.txt
stage: resources
artifacts:
paths:
- version.txt
expire_in: 1 month
tags:
- docker
build:library:
stage: build
image: alazartech/vs2019:1.9.5
script:
- cd atsfooters
- cmake .
- cmake --build . --config Release
- ctest
- cp ./Release/atsfooters.dll ../dotnet-example
artifacts:
paths:
- ./dotnet-example/atsfooters.dll
expire_in: 1 week
tags:
- docker-windows
build:library_gcc9:
stage: build
image: alazartech/gcc9:1.9.5
script:
- conan install . --install-folder=build
- conan build . --build-folder=build
tags:
- docker
test:dotnet:
stage: test
image: alazartech/vs2019:1.9.5
script:
- cd dotnet-example
- dotnet run
tags:
- docker-windows
deploy:tag:
image: alazartech/doc:1.9.5
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "${SSH_ADMIN_PRIVATE_KEY}" | tr -d '\r' | ssh-add -
- mkdir -m 700 -p ~/.ssh
- echo "${SSH_KNOWN_HOSTS}" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- git config --global user.name "Gitlab CI Admin"
- git config --global user.email "[email protected]"
script:
- pipenv install
- pipenv run changelogparser version -i CHANGELOG.md -o release-version.txt
- git fetch
- git checkout master
- git pull origin master
- git merge --ff-only origin/${CI_COMMIT_REF_NAME}
- git remote rm origin && git remote add origin [email protected]:${CI_PROJECT_PATH}.git
- git tag v$(cat release-version.txt)
- git push --tags
- git push origin master
stage: deploy
tags:
- docker
only:
- release
deploy:conan:
stage: deploy
image: alazartech/vs2019:1.9.5
script:
- $VERSION = Get-Content -Path version.txt
- $channel = If ($CI_COMMIT_TAG) {"stable"} Else {${CI_COMMIT_REF_NAME}}
- conan create . atsfooters/${VERSION}@alazar/${channel}
- conan upload -r ottawa --all atsfooters/${VERSION}@alazar/${channel}
tags:
- docker-windows