Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
c5c7e83b
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c5c7e83b
编写于
11月 11, 2020
作者:
D
David Worsham
提交者:
GitHub
11月 11, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fuchsia: Add licenses to CIPD (#22430)
上级
5d4d06eb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
60 addition
and
29 deletion
+60
-29
tools/fuchsia/build_fuchsia_artifacts.py
tools/fuchsia/build_fuchsia_artifacts.py
+60
-29
未找到文件。
tools/fuchsia/build_fuchsia_artifacts.py
浏览文件 @
c5c7e83b
...
...
@@ -176,7 +176,6 @@ def BuildBucket(runtime_mode, arch, optimized, product):
CopyVulkanDepsToBucket
(
out_dir
,
deps_dir
,
arch
)
CopyIcuDepsToBucket
(
out_dir
,
deps_dir
)
def
CheckCIPDPackageExists
(
package_name
,
tag
):
'''Check to see if the current package/tag combo has been published'''
command
=
[
...
...
@@ -193,30 +192,7 @@ def CheckCIPDPackageExists(package_name, tag):
else
:
return
True
def
ProcessCIPDPackage
(
upload
,
engine_version
):
# Copy the CIPD YAML template from the source directory to be next to the bucket
# we are about to package.
cipd_yaml
=
os
.
path
.
join
(
_script_dir
,
'fuchsia.cipd.yaml'
)
CopyFiles
(
cipd_yaml
,
os
.
path
.
join
(
_bucket_directory
,
'fuchsia.cipd.yaml'
))
tag
=
'git_revision:%s'
%
engine_version
already_exists
=
CheckCIPDPackageExists
(
'flutter/fuchsia'
,
tag
)
if
already_exists
:
print
(
'CIPD package flutter/fuchsia tag %s already exists!'
%
tag
)
if
upload
and
IsLinux
()
and
not
already_exists
:
command
=
[
'cipd'
,
'create'
,
'-pkg-def'
,
'fuchsia.cipd.yaml'
,
'-ref'
,
'latest'
,
'-tag'
,
tag
,
]
else
:
command
=
[
'cipd'
,
'pkg-build'
,
'-pkg-def'
,
'fuchsia.cipd.yaml'
,
'-out'
,
os
.
path
.
join
(
_bucket_directory
,
'fuchsia.cipd'
)
]
def
RunCIPDCommandWithRetries
(
command
):
# Retry up to three times. We've seen CIPD fail on verification in some
# instances. Normally verification takes slightly more than 1 minute when
# it succeeds.
...
...
@@ -230,6 +206,55 @@ def ProcessCIPDPackage(upload, engine_version):
if
tries
==
num_tries
-
1
:
raise
def
ProcessCIPDPackage
(
upload
,
engine_version
):
# Copy the CIPD YAML template from the source directory to be next to the bucket
# we are about to package.
cipd_yaml
=
os
.
path
.
join
(
_script_dir
,
'fuchsia.cipd.yaml'
)
CopyFiles
(
cipd_yaml
,
os
.
path
.
join
(
_bucket_directory
,
'fuchsia.cipd.yaml'
))
# Copy the license files from the source directory to be next to the bucket we
# are about to package.
bucket_root
=
os
.
path
.
join
(
_bucket_directory
,
'flutter'
)
licenses_root
=
os
.
path
.
join
(
_src_root_dir
,
'flutter/ci/licenses_golden'
)
license_files
=
[
'licenses_flutter'
,
'licenses_fuchsia'
,
'licenses_gpu'
,
'licenses_skia'
,
'licenses_third_party'
]
for
license
in
license_files
:
src_path
=
os
.
path
.
join
(
licenses_root
,
license
)
dst_path
=
os
.
path
.
join
(
bucket_root
,
license
)
CopyPath
(
src_path
,
dst_path
)
if
not
upload
or
not
IsLinux
():
RunCIPDCommandWithRetries
([
'cipd'
,
'pkg-build'
,
'-pkg-def'
,
'fuchsia.cipd.yaml'
,
'-out'
,
os
.
path
.
join
(
_bucket_directory
,
'fuchsia.cipd'
)
])
return
# Everything after this point will only run iff `upload==true` and
# `IsLinux() == true`
assert
(
upload
)
assert
(
IsLinux
())
if
engine_version
is
None
:
print
(
'--upload requires --engine-version to be specified.'
)
return
tag
=
'git_revision:%s'
%
engine_version
already_exists
=
CheckCIPDPackageExists
(
'flutter/fuchsia'
,
tag
)
if
already_exists
:
print
(
'CIPD package flutter/fuchsia tag %s already exists!'
%
tag
)
return
RunCIPDCommandWithRetries
([
'cipd'
,
'create'
,
'-pkg-def'
,
'fuchsia.cipd.yaml'
,
'-ref'
,
'latest'
,
'-tag'
,
tag
,
])
def
BuildTarget
(
runtime_mode
,
arch
,
optimized
,
enable_lto
,
enable_legacy
,
asan
,
dart_version_git_info
,
additional_targets
=
[]):
unopt
=
"_unopt"
if
not
optimized
else
""
...
...
@@ -263,6 +288,12 @@ def BuildTarget(runtime_mode, arch, optimized, enable_lto, enable_legacy,
def
main
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--cipd-dry-run'
,
default
=
False
,
action
=
'store_true'
,
help
=
'If set, creates the CIPD package but does not upload it.'
)
parser
.
add_argument
(
'--upload'
,
default
=
False
,
...
...
@@ -337,6 +368,7 @@ def main():
enable_lto
=
not
args
.
no_lto
enable_legacy
=
not
args
.
no_legacy
# Build buckets
for
arch
in
archs
:
for
i
in
range
(
3
):
runtime_mode
=
runtime_modes
[
i
]
...
...
@@ -348,11 +380,10 @@ def main():
args
.
targets
.
split
(
","
))
BuildBucket
(
runtime_mode
,
arch
,
optimized
,
product
)
if
args
.
upload
:
if
args
.
engine_version
is
None
:
print
(
'--upload requires --engine-version to be specified.'
)
return
1
# Create and optionally upload CIPD package
if
args
.
cipd_dry_run
or
args
.
upload
:
ProcessCIPDPackage
(
args
.
upload
,
args
.
engine_version
)
return
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录