Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
052072ff
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
052072ff
编写于
4月 25, 2019
作者:
P
Piotr Wosiek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update .NET Core YAML template - improve indent
Improve indent and remove empty lines
上级
ab9aa821
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
47 deletion
+38
-47
lib/gitlab/ci/templates/dotNET-Core.yml
lib/gitlab/ci/templates/dotNET-Core.yml
+38
-47
未找到文件。
lib/gitlab/ci/templates/dotNET-Core.yml
浏览文件 @
052072ff
...
...
@@ -13,19 +13,17 @@
# and the Docker itself: https://opensource.com/resources/what-docker
image
:
microsoft/dotnet:latest
# ### Define variables
#
variables
:
# 1) Name of directory where restore and build objects are stored.
# 1) Name of directory where restore and build objects are stored.
OBJECTS_DIRECTORY
:
'
obj'
# 2) Name of directory used for keeping restored dependencies.
# 2) Name of directory used for keeping restored dependencies.
NUGET_PACKAGES_DIRECTORY
:
'
.nuget'
# 3) A relative path to the source code from project repository root.
# NOTE: Please edit this path so it matches the structure of your project!
# 3) A relative path to the source code from project repository root.
# NOTE: Please edit this path so it matches the structure of your project!
SOURCE_CODE_PATH
:
'
*/*/'
# ### Define stage list
#
# In this example there are only two stages.
...
...
@@ -34,7 +32,6 @@ stages:
-
build
-
test
# ### Define global cache rule
#
# Before building the project, all dependencies (e.g. third-party NuGet packages)
...
...
@@ -52,28 +49,26 @@ cache:
# Per-stage and per-branch caching.
key
:
"
$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
paths
:
# Specify three paths that should be cached:
#
# 1) Main JSON file holding information about package dependency tree, packages versions,
# frameworks etc. It also holds information where to the dependencies were restored.
-
'
$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json'
# 2) Other NuGet and MSBuild related files. Also needed.
-
'
$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*'
# 3) Path to the directory where restored dependencies are kept.
-
'
$NUGET_PACKAGES_DIRECTORY'
#
# 'pull-push' policy means that latest cache will be downloaded (if exists)
# before executing the job, and a newer version will be uploaded afterwards.
# Such setting saves time when there are no changes in referenced third-party
# packages. For example if you run a pipeline with changes in your code,
# but with no changes within third-party packages which your project is using,
# then project restore will happen in next to no time as all required dependencies
# will already be there — unzipped from cache. 'pull-push' policy is a default
# cache policy, you do not have to specify it explicitly.
# Specify three paths that should be cached:
#
# 1) Main JSON file holding information about package dependency tree, packages versions,
# frameworks etc. It also holds information where to the dependencies were restored.
-
'
$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json'
# 2) Other NuGet and MSBuild related files. Also needed.
-
'
$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*'
# 3) Path to the directory where restored dependencies are kept.
-
'
$NUGET_PACKAGES_DIRECTORY'
#
# 'pull-push' policy means that latest cache will be downloaded (if exists)
# before executing the job, and a newer version will be uploaded afterwards.
# Such setting saves time when there are no changes in referenced third-party
# packages. For example if you run a pipeline with changes in your code,
# but with no changes within third-party packages which your project is using,
# then project restore will happen in next to no time as all required dependencies
# will already be there — unzipped from cache. 'pull-push' policy is a default
# cache policy, you do not have to specify it explicitly.
policy
:
pull-push
#
# ### Restore project dependencies
#
# NuGet packages by default are restored to '.nuget/packages' directory
...
...
@@ -85,33 +80,29 @@ cache:
# Learn more about GitLab cache: https://docs.gitlab.com/ee/ci/caching/index.html
before_script
:
-
'
dotnet
restore
--packages
$NUGET_PACKAGES_DIRECTORY'
build
:
stage
:
build
#
# ### Build all projects discovered from solution file.
#
# Note: this will fail if you have any projects in your solution that are not
# .NET Core based projects e.g. WCF service, which is based on .NET Framework,
# not .NET Core. In such scenario you will need to build every .NET Core based
# project by explicitly specifying a relative path to the directory
# where it is located e.g. 'dotnet build ./src/ConsoleApp'.
# Only one project path can be passed as a parameter to 'dotnet build' command.
# ### Build all projects discovered from solution file.
#
# Note: this will fail if you have any projects in your solution that are not
# .NET Core based projects e.g. WCF service, which is based on .NET Framework,
# not .NET Core. In such scenario you will need to build every .NET Core based
# project by explicitly specifying a relative path to the directory
# where it is located e.g. 'dotnet build ./src/ConsoleApp'.
# Only one project path can be passed as a parameter to 'dotnet build' command.
script
:
-
'
dotnet
build
--no-restore'
tests
:
stage
:
test
#
# ### Run the tests
#
# You can either run tests for all test projects that are defined in your solution
# with 'dotnet test' or run tests only for specific project by specifying
# a relative path to the directory where it is located e.g. 'dotnet test ./test/UnitTests'.
#
# You may want to define separate testing jobs for different types of testing
# e.g. integration tests, unit tests etc.
# ### Run the tests
#
# You can either run tests for all test projects that are defined in your solution
# with 'dotnet test' or run tests only for specific project by specifying
# a relative path to the directory where it is located e.g. 'dotnet test ./test/UnitTests'.
#
# You may want to define separate testing jobs for different types of testing
# e.g. integration tests, unit tests etc.
script
:
-
'
dotnet
test
--no-restore'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录