-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
55 lines (48 loc) · 1.06 KB
/
.gitlab-ci.yml
File metadata and controls
55 lines (48 loc) · 1.06 KB
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
stages:
- build
- publish
- pages
build:
stage: build
image: dotnetimages/microsoft-dotnet-core-sdk-nodejs:10.0_22.x
script:
- dotnet restore
- dotnet build
artifacts:
when: on_success
expire_in: 1 week
untracked: true
publish:
stage: publish
image: dotnetimages/microsoft-dotnet-core-sdk-nodejs:10.0_22.x
script:
- dotnet publish ./JiraTools.Web.Api/JiraTools.Web.Api.csproj -o out
artifacts:
when: on_success
expire_in: 1 week
paths:
- ./out
docker:
image: docker:latest
stage: publish
rules:
- if: $CI_COMMIT_BRANCH == "master"
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build -t $CI_REGISTRY_IMAGE -f JiraTools.Web.Api/Dockerfile .
- docker push $CI_REGISTRY_IMAGE
pages:
stage: pages
image: alpine:latest
needs: [publish]
script:
- mkdir ./public
- cp ./out/wwwroot/* ./public
artifacts:
when: on_success
expire_in: 1 week
paths:
- ./public