Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
30d7535b
提交
30d7535b
编辑于
3 years ago
作者:
Chad Woolley
浏览文件
操作
下载
补丁
差异文件
Revert "Add spring support to rails/rake binstubs"
This reverts commit
28f82411
.
上级
c9ec6e4e
No related branches found
No related tags found
无相关合并请求
变更
5
隐藏空白变更内容
行内
左右并排
显示
5 个更改的文件
.gitlab/ci/static-analysis.gitlab-ci.yml
+11
-3
11 个添加, 3 个删除
.gitlab/ci/static-analysis.gitlab-ci.yml
bin/rails
+0
-5
0 个添加, 5 个删除
bin/rails
bin/rake
+0
-5
0 个添加, 5 个删除
bin/rake
lib/gitlab/popen/runner.rb
+2
-15
2 个添加, 15 个删除
lib/gitlab/popen/runner.rb
lib/tasks/lint.rake
+7
-0
7 个添加, 0 个删除
lib/tasks/lint.rake
有
20 个添加
和
28 个删除
.gitlab/ci/static-analysis.gitlab-ci.yml
+
11
−
3
浏览文件 @
30d7535b
...
@@ -24,11 +24,8 @@ static-analysis:
...
@@ -24,11 +24,8 @@ static-analysis:
extends
:
extends
:
-
.static-analysis-base
-
.static-analysis-base
-
.static-analysis:rules:ee-and-foss
-
.static-analysis:rules:ee-and-foss
-
.use-pg12
stage
:
test
stage
:
test
parallel
:
4
parallel
:
4
variables
:
SETUP_DB
:
"
true"
script
:
script
:
-
run_timed_command "retry yarn install --frozen-lockfile"
-
run_timed_command "retry yarn install --frozen-lockfile"
-
scripts/static-analysis
-
scripts/static-analysis
...
@@ -38,6 +35,17 @@ static-analysis:
...
@@ -38,6 +35,17 @@ static-analysis:
paths
:
paths
:
-
tmp/feature_flags/
-
tmp/feature_flags/
static-analysis-with-database
:
extends
:
-
.static-analysis-base
-
.static-analysis:rules:ee-and-foss
-
.use-pg12
stage
:
test
script
:
-
bundle exec rake lint:static_verification_with_database
variables
:
SETUP_DB
:
"
true"
static-analysis as-if-foss
:
static-analysis as-if-foss
:
extends
:
extends
:
-
static-analysis
-
static-analysis
...
...
此差异已折叠。
点击以展开。
bin/rails
+
0
−
5
浏览文件 @
30d7535b
#!/usr/bin/env ruby
#!/usr/bin/env ruby
begin
load
File
.
expand_path
(
'../spring'
,
__FILE__
)
rescue
LoadError
=>
e
raise
unless
e
.
message
.
include?
(
'spring'
)
end
APP_PATH
=
File
.
expand_path
(
'../config/application'
,
__dir__
)
APP_PATH
=
File
.
expand_path
(
'../config/application'
,
__dir__
)
require_relative
'../config/boot'
require_relative
'../config/boot'
require
'rails/commands'
require
'rails/commands'
此差异已折叠。
点击以展开。
bin/rake
+
0
−
5
浏览文件 @
30d7535b
#!/usr/bin/env ruby
#!/usr/bin/env ruby
begin
load
File
.
expand_path
(
'../spring'
,
__FILE__
)
rescue
LoadError
=>
e
raise
unless
e
.
message
.
include?
(
'spring'
)
end
require_relative
'../config/boot'
require_relative
'../config/boot'
require
'rake'
require
'rake'
Rake
.
application
.
run
Rake
.
application
.
run
此差异已折叠。
点击以展开。
lib/gitlab/popen/runner.rb
+
2
−
15
浏览文件 @
30d7535b
...
@@ -31,7 +31,7 @@ def all_success?
...
@@ -31,7 +31,7 @@ def all_success?
end
end
def
all_stderr_empty?
def
all_stderr_empty?
results
.
all?
{
|
result
|
stderr
_
empty
_ignoring_spring
(
result
)
}
results
.
all?
{
|
result
|
result
.
stderr
.
empty
?
}
end
end
def
failed_results
def
failed_results
...
@@ -40,22 +40,9 @@ def failed_results
...
@@ -40,22 +40,9 @@ def failed_results
def
warned_results
def
warned_results
results
.
select
do
|
result
|
results
.
select
do
|
result
|
result
.
status
.
success?
&&
!
stderr
_
empty
_ignoring_spring
(
result
)
result
.
status
.
success?
&&
!
result
.
stderr
.
empty
?
end
end
end
end
private
# NOTE: This is sometimes required instead of just calling `result.stderr.empty?`, if we
# want to ignore the spring "Running via Spring preloader..." output to STDERR.
# The `Spring.quiet=true` method which spring supports doesn't work, because it doesn't
# work to make it quiet when using spring binstubs (the STDERR is printed by `bin/spring`
# itself when first required, so there's no opportunity to set Spring.quiet=true).
# This should probably be opened as a bug against Spring, with a pull request to support a
# `SPRING_QUIET` env var as well.
def
stderr_empty_ignoring_spring
(
result
)
result
.
stderr
.
empty?
||
result
.
stderr
=~
/\ARunning via Spring preloader in process [0-9]+\Z/
end
end
end
end
end
end
end
此差异已折叠。
点击以展开。
lib/tasks/lint.rake
+
7
−
0
浏览文件 @
30d7535b
...
@@ -12,6 +12,13 @@ unless Rails.env.production?
...
@@ -12,6 +12,13 @@ unless Rails.env.production?
dev:load
dev:load
]
do
]
do
Gitlab
::
Utils
::
Override
.
verify!
Gitlab
::
Utils
::
Override
.
verify!
end
desc
"GitLab | Lint | Static verification with database"
task
static_verification_with_database:
%w[
lint:static_verification_env
dev:load
]
do
Gitlab
::
Utils
::
DelegatorOverride
.
verify!
Gitlab
::
Utils
::
DelegatorOverride
.
verify!
end
end
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录