forked from SkywardApps/popcorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
136 lines (129 loc) · 3.43 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# This is the configuration file for git-lab's CI service.
# We have five stages:
stages:
# Make sure everything compiles OK
- build
# a test stage, which will execute all of the various unit and integration tests that are performed from within the project itself
- test
# a stage where all test results will be integrated into TargetProcess, Confluence, and/or other central sites
- uploadresults
# Option to upload an updated nuget package
- deployment
# Build all three projects, minus the Net Framework project as it is windows/mono dependent.
build:
stage: build
image: onsitedashboard:build
script:
- cd dotnet/PopcornNetStandard
- dotnet restore
- dotnet build
- cd ../PopcornNetStandard.WebApiCore
- dotnet restore
- dotnet build
- cd ../PopcornNetStandard.EntityFrameworkCore
- dotnet restore
- dotnet build
tags:
- x86
# Running the example test integration tests
popcornstandard_integrationtest:
stage: test
image: onsitedashboard:build
script:
- cd dotnet/Tests/PopcornNetCoreExampleIntegrationTest
- dotnet restore
- dotnet test
tags:
- x86
# Running the standard library tests
popcornstandard_unittest:
stage: test
image: onsitedashboard:build
script:
- cd dotnet/Tests/PopcornNetStandardTest
- dotnet restore
- dotnet test
tags:
- x86
# Updating documentation on confluence markdowns within the project
documentation:
stage: uploadresults
image: onsitedashboard:build
only:
- master
before_script:
- mkdir -p ~/.ssh
# Sadly Gitlab mangles these secret variables by prepending a space on susequent lines
- echo $MarkdownConfluenceCORE_pk | tr '.' '\n' >~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -t rsa khan.skywardapps.us >>~/.ssh/known_hosts
script:
# Pull down the connector project to connect results to TP
- git clone [email protected]:internal/markdown-confluence.git
- cd markdown-confluence/MarkdownUploaderCore
- dotnet restore
- dotnet build
# Run with the hardcoded project id as this will always be OnsiteDashboard
- cd ../..
- dotnet run --project markdown-confluence/MarkdownUploaderCore/MarkdownUploaderCore.csproj
tags:
- x86
# Create an instance of this server.
# Also publish relevant nuget packages
nugetPopcornStandard:
stage: deployment
image: onsitedashboard:build
when: manual
allow_failure: true
only:
- master
- alpha
- beta
- production
script:
- cd dotnet/PopcornNetStandard
- dotnet restore
- dotnet build -c Release
- cd ../Build/Release
- ls
- dotnet nuget push Skyward.Api.Popcorn.*.nupkg -k $NugetApiKey -s https://www.nuget.org/api/v2/package
tags:
- x86
nugetPopcornEFCore:
stage: deployment
image: onsitedashboard:build
when: manual
allow_failure: true
only:
- master
- alpha
- beta
- production
script:
- cd dotnet/PopcornNetStandard.EntityFrameworkCore
- dotnet restore
- dotnet build -c Release
- cd ../Build/Release
- ls
- dotnet nuget push Skyward.Api.Popcorn.EntityFrameworkCore.*.nupkg -k $NugetApiKey -s https://www.nuget.org/api/v2/package
tags:
- x86
nugetPopcornWebApiCore:
stage: deployment
image: onsitedashboard:build
when: manual
allow_failure: true
only:
- master
- alpha
- beta
- production
script:
- cd dotnet/PopcornNetStandard.WebApiCore
- dotnet restore
- dotnet build -c Release
- cd ../Build/Release
- ls
- dotnet nuget push Skyward.Api.Popcorn.WebApiCore.*.nupkg -k $NugetApiKey -s https://www.nuget.org/api/v2/package
tags:
- x86