-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
72 lines (60 loc) · 1.76 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
stages:
- build
- release
- deploy
variables:
ASSEMBLY_EXTENSION: "dll"
.build_scripts : &build_scripts
before_script:
- nuget restore
- mkdir $env:CI_PROJECT_NAME/lib
- wget https://gitlab.cern.ch/$env:CI_PROJECT_NAMESPACE/plugin/-/jobs/artifacts/master/raw/plugin/bin/Release/plugin.dll?job=build -OutFile $env:CI_PROJECT_NAME/lib/plugin.dll
script:
- msbuild /p:VersionAssembly=$env:CI_COMMIT_TAG /p:Configuration=Release $env:CI_PROJECT_NAME.sln
after_script:
- (Get-FileHash $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION -Algorithm SHA1).Hash > $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION.sha1
test_build:
stage: build
except:
- tags
<<: *build_scripts
build:
stage: build
only:
- tags
<<: *build_scripts
artifacts:
paths:
- $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION
- $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION.sha1
expire_in: 1 year
release_version:
stage: release
only:
- tags
script:
# Create a release for the current tag
# This needs to be changed by GitLab
# Release creation should be 'keyword based'
- CreateRelease
release_qa:
stage: deploy
environment: qa
only:
- tags
script:
# Update "qa" release name the newest version number
# This needs to be changed by GitLab
# Release creation should be 'keyword based'
- DeployQA
release_production:
stage: deploy
environment: production
when: manual
only:
- tags
script:
# Update "production" release name the newest version number
# This needs to be changed by GitLab
# Release creation should be 'keyword based'
- DeployProduction