-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
37 lines (29 loc) · 1.09 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
# This template does the following:
#
# 1. Builds the project while resolving the dependencies from Artifactory
# 2. Uploads the build artifact to Artifactory
# 3. Publishes the build-info to Artifactory
#
# Requirements:
# Configure the following variables with the names of NuGet repositories in JFrog Artifactory:
# 'ARTIFACTORY_VIRTUAL_REPO', and 'ARTIFACTORY_LOCAL_REPO'.
default:
image: mono
include:
- remote: "https://releases.jfrog.io/artifactory/jfrog-cli/gitlab/v2/.setup-jfrog-unix.yml"
# For Windows agents:
#- remote: "https://releases.jfrog.io/artifactory/jfrog-cli/gitlab/v2/.setup-jfrog-windows.yml"
jfrog-dotnet-build:
script:
- !reference [.setup_jfrog, script]
# Configure JFrog Artifactory repositories
- jf dotnet-config --repo-resolve $ARTIFACTORY_VIRTUAL_REPO
# Resolve dependencies from JFrog Artifactory
- jf dotnet restore
# Upload artifact
- jf rt u <path-to-local-file> <ARTIFACTORY_LOCAL_REPO>
# Publish build-info to JFrog Artifactory
- jf rt build-publish
after_script:
# Cleanup
- !reference [.cleanup_jfrog, script]