Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
A
aspnetcore
管理
动态
成员
标记
计划
议题
议题看板
里程碑
Wiki
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
构建
流水线
作业
流水线计划
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
dotnet
aspnetcore
提交
a673bfd7
未验证
提交
a673bfd7
编辑于
6 years ago
作者:
Nate McMaster
浏览文件
操作
下载
补丁
差异文件
Add build script and CI config for the DataProtection folder
上级
4dfd351c
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
5
隐藏空白变更内容
行内
左右并排
显示
5 个更改的文件
.azure/pipelines/fast-pr-validation.yml
+11
-0
11 个添加, 0 个删除
.azure/pipelines/fast-pr-validation.yml
run.ps1
+9
-6
9 个添加, 6 个删除
run.ps1
run.sh
+12
-5
12 个添加, 5 个删除
run.sh
src/DataProtection/build.cmd
+3
-0
3 个添加, 0 个删除
src/DataProtection/build.cmd
src/DataProtection/build.sh
+7
-0
7 个添加, 0 个删除
src/DataProtection/build.sh
有
42 个添加
和
11 个删除
.azure/pipelines/fast-pr-validation.yml
+
11
−
0
浏览文件 @
a673bfd7
...
@@ -15,3 +15,14 @@ phases:
...
@@ -15,3 +15,14 @@ phases:
-
template
:
.vsts-pipelines/templates/project-ci.yml@buildtools
-
template
:
.vsts-pipelines/templates/project-ci.yml@buildtools
parameters
:
parameters
:
buildArgs
:
"
/t:CheckUniverse"
buildArgs
:
"
/t:CheckUniverse"
-
phase
:
DataProtection
queue
:
Hosted VS2017
steps
:
-
script
:
src/DataProtection/build.cmd -ci
displayName
:
Run src/DataProtection/build.cmd
-
task
:
PublishTestResults@2
displayName
:
Publish test results
condition
:
always()
inputs
:
testRunner
:
vstest
testResultsFiles
:
'
src/DataProtection/artifacts/logs/**/*.trx'
此差异已折叠。
点击以展开。
run.ps1
+
9
−
6
浏览文件 @
a673bfd7
...
@@ -14,6 +14,9 @@ The KoreBuild command to run.
...
@@ -14,6 +14,9 @@ The KoreBuild command to run.
.PARAMETER
Path
.PARAMETER
Path
The folder to build. Defaults to the folder containing this script.
The folder to build. Defaults to the folder containing this script.
.PARAMETER
LockFile
The path to the korebuild-lock.txt file. Defaults to $Path/korebuild-lock.txt
.PARAMETER
Channel
.PARAMETER
Channel
The channel of KoreBuild to download. Overrides the value from the config file.
The channel of KoreBuild to download. Overrides the value from the config file.
...
@@ -75,6 +78,7 @@ param(
...
@@ -75,6 +78,7 @@ param(
[
Parameter
(
Mandatory
=
$true
,
Position
=
0
)]
[
Parameter
(
Mandatory
=
$true
,
Position
=
0
)]
[
string
]
$Command
,
[
string
]
$Command
,
[
string
]
$Path
=
$PSScriptRoot
,
[
string
]
$Path
=
$PSScriptRoot
,
[
string
]
$LockFile
,
[
Alias
(
'c'
)]
[
Alias
(
'c'
)]
[
string
]
$Channel
,
[
string
]
$Channel
,
[
Alias
(
'd'
)]
[
Alias
(
'd'
)]
...
@@ -104,15 +108,13 @@ $ErrorActionPreference = 'Stop'
...
@@ -104,15 +108,13 @@ $ErrorActionPreference = 'Stop'
function
Get-KoreBuild
{
function
Get-KoreBuild
{
$lockFile
=
Join-Path
$Path
'korebuild-lock.txt'
if
(
!
(
Test-Path
$LockFile
)
-or
$Update
)
{
Get-RemoteFile
"
$ToolsSource
/korebuild/channels/
$Channel
/latest.txt"
$LockFile
if
(
!
(
Test-Path
$lockFile
)
-or
$Update
)
{
Get-RemoteFile
"
$ToolsSource
/korebuild/channels/
$Channel
/latest.txt"
$lockFile
}
}
$version
=
Get-Content
$
l
ockFile
|
Where-Object
{
$_
-like
'version:*'
}
|
Select-Object
-first
1
$version
=
Get-Content
$
L
ockFile
|
Where-Object
{
$_
-like
'version:*'
}
|
Select-Object
-first
1
if
(
!
$version
)
{
if
(
!
$version
)
{
Write-Error
"Failed to parse version from
$
l
ockFile
. Expected a line that begins with 'version:'"
Write-Error
"Failed to parse version from
$
L
ockFile
. Expected a line that begins with 'version:'"
}
}
$version
=
$version
.
TrimStart
(
'version:'
)
.
Trim
()
$version
=
$version
.
TrimStart
(
'version:'
)
.
Trim
()
$korebuildPath
=
Join-Paths
$DotNetHome
(
'buildtools'
,
'korebuild'
,
$version
)
$korebuildPath
=
Join-Paths
$DotNetHome
(
'buildtools'
,
'korebuild'
,
$version
)
...
@@ -207,6 +209,7 @@ if (!$DotNetHome) {
...
@@ -207,6 +209,7 @@ if (!$DotNetHome) {
else
{
Join-Path
$PSScriptRoot
'.dotnet'
}
else
{
Join-Path
$PSScriptRoot
'.dotnet'
}
}
}
if
(
!
$LockFile
)
{
$LockFile
=
Join-Path
$Path
'korebuild-lock.txt'
}
if
(
!
$Channel
)
{
$Channel
=
'master'
}
if
(
!
$Channel
)
{
$Channel
=
'master'
}
if
(
!
$ToolsSource
)
{
$ToolsSource
=
'https://aspnetcore.blob.core.windows.net/buildtools'
}
if
(
!
$ToolsSource
)
{
$ToolsSource
=
'https://aspnetcore.blob.core.windows.net/buildtools'
}
...
...
此差异已折叠。
点击以展开。
run.sh
+
12
−
5
浏览文件 @
a673bfd7
...
@@ -15,6 +15,7 @@ verbose=false
...
@@ -15,6 +15,7 @@ verbose=false
update
=
false
update
=
false
reinstall
=
false
reinstall
=
false
repo_path
=
"
$DIR
"
repo_path
=
"
$DIR
"
lockfile_path
=
''
channel
=
''
channel
=
''
tools_source
=
''
tools_source
=
''
ci
=
false
ci
=
false
...
@@ -41,6 +42,7 @@ __usage() {
...
@@ -41,6 +42,7 @@ __usage() {
echo
" --config-file <FILE> The path to the configuration file that stores values. Defaults to korebuild.json."
echo
" --config-file <FILE> The path to the configuration file that stores values. Defaults to korebuild.json."
echo
" -d|--dotnet-home <DIR> The directory where .NET Core tools will be stored. Defaults to '
\$
DOTNET_HOME' or '
\$
HOME/.dotnet."
echo
" -d|--dotnet-home <DIR> The directory where .NET Core tools will be stored. Defaults to '
\$
DOTNET_HOME' or '
\$
HOME/.dotnet."
echo
" --path <PATH> The directory to build. Defaults to the directory containing the script."
echo
" --path <PATH> The directory to build. Defaults to the directory containing the script."
echo
" --lockfile <PATH> The path to the korebuild-lock.txt file. Defaults to
\$
repo_path/korebuild-lock.txt"
echo
" -s|--tools-source|-ToolsSource <URL> The base url where build tools can be downloaded. Overrides the value from the config file."
echo
" -s|--tools-source|-ToolsSource <URL> The base url where build tools can be downloaded. Overrides the value from the config file."
echo
" --package-version-props-url <URL> The url of the package versions props path containing dependency versions."
echo
" --package-version-props-url <URL> The url of the package versions props path containing dependency versions."
echo
" --access-token <Token> The query string to append to any blob store access for PackageVersionPropsUrl, if any."
echo
" --access-token <Token> The query string to append to any blob store access for PackageVersionPropsUrl, if any."
...
@@ -61,13 +63,12 @@ __usage() {
...
@@ -61,13 +63,12 @@ __usage() {
get_korebuild
()
{
get_korebuild
()
{
local
version
local
version
local
lock_file
=
"
$repo_path
/korebuild-lock.txt"
if
[
!
-f
"
$lockfile_path
"
]
||
[
"
$update
"
=
true
]
;
then
if
[
!
-f
"
$lock_file
"
]
||
[
"
$update
"
=
true
]
;
then
__get_remote_file
"
$tools_source
/korebuild/channels/
$channel
/latest.txt"
"
$lockfile_path
"
__get_remote_file
"
$tools_source
/korebuild/channels/
$channel
/latest.txt"
"
$lock_file
"
fi
fi
version
=
"
$(
grep
'version:*'
-m
1
"
$lock
_
file
"
)
"
version
=
"
$(
grep
'version:*'
-m
1
"
$lockfile
_path
"
)
"
if
[[
"
$version
"
==
''
]]
;
then
if
[[
"
$version
"
==
''
]]
;
then
__error
"Failed to parse version from
$lock
_
file
. Expected a line that begins with 'version:'"
__error
"Failed to parse version from
$lockfile
_path
. Expected a line that begins with 'version:'"
return
1
return
1
fi
fi
version
=
"
$(
echo
"
${
version
#version
:
}
"
|
sed
-e
's/^[[:space:]]*//'
-e
's/[[:space:]]*$//'
)
"
version
=
"
$(
echo
"
${
version
#version
:
}
"
|
sed
-e
's/^[[:space:]]*//'
-e
's/[[:space:]]*$//'
)
"
...
@@ -176,6 +177,11 @@ while [[ $# -gt 0 ]]; do
...
@@ -176,6 +177,11 @@ while [[ $# -gt 0 ]]; do
repo_path
=
"
${
1
:-}
"
repo_path
=
"
${
1
:-}
"
[
-z
"
$repo_path
"
]
&&
__error
"Missing value for parameter --path"
&&
__usage
[
-z
"
$repo_path
"
]
&&
__error
"Missing value for parameter --path"
&&
__usage
;;
;;
--
[
Ll]ock[Ff]ile
)
shift
lockfile_path
=
"
${
1
:-}
"
[
-z
"
$lockfile_path
"
]
&&
__error
"Missing value for parameter --lockfile"
&&
__usage
;;
-s
|
--tools-source
|
-ToolsSource
)
-s
|
--tools-source
|
-ToolsSource
)
shift
shift
tools_source
=
"
${
1
:-}
"
tools_source
=
"
${
1
:-}
"
...
@@ -296,6 +302,7 @@ if [ ! -z "$product_build_id" ]; then
...
@@ -296,6 +302,7 @@ if [ ! -z "$product_build_id" ]; then
msbuild_args[
${#
msbuild_args
[*]
}
]=
"-p:DotNetProductBuildId=
$product_build_id
"
msbuild_args[
${#
msbuild_args
[*]
}
]=
"-p:DotNetProductBuildId=
$product_build_id
"
fi
fi
[
-z
"
$lockfile_path
"
]
&&
lockfile_path
=
"
$repo_path
/korebuild-lock.txt"
[
-z
"
$channel
"
]
&&
channel
=
'master'
[
-z
"
$channel
"
]
&&
channel
=
'master'
[
-z
"
$tools_source
"
]
&&
tools_source
=
'https://aspnetcore.blob.core.windows.net/buildtools'
[
-z
"
$tools_source
"
]
&&
tools_source
=
'https://aspnetcore.blob.core.windows.net/buildtools'
...
...
此差异已折叠。
点击以展开。
src/DataProtection/build.cmd
0 → 100644
+
3
−
0
浏览文件 @
a673bfd7
@ECHO
OFF
SET
RepoRoot
=
"
%~dp0
..\.."
%RepoRoot%
\build.cmd
-LockFile
%RepoRoot%
\korebuild
-lock
.txt
-Path
%~dp0
%
*
此差异已折叠。
点击以展开。
src/DataProtection/build.sh
0 → 100755
+
7
−
0
浏览文件 @
a673bfd7
#!/usr/bin/env bash
set
-euo
pipefail
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
repo_root
=
"
$DIR
/../.."
"
$repo_root
/build.sh"
--path
"
$DIR
"
--lockfile
"
$repo_root
/korebuild-lock.txt"
"
$@
"
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录