Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2e9372b5
Commit
2e9372b5
authored
Oct 30, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for basic parallelization of the 'static-analysis' job
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
0e7baa35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
scripts/static-analysis
scripts/static-analysis
+28
-10
No files found.
scripts/static-analysis
View file @
2e9372b5
...
...
@@ -26,7 +26,8 @@ def emit_errors(static_analysis)
end
end
tasks
=
[
def
jobs_to_run
(
node_index
,
node_total
)
all_tasks
=
[
%w[bin/rake lint:all]
,
%w[bundle exec license_finder]
,
%w[yarn run eslint]
,
...
...
@@ -35,8 +36,25 @@ tasks = [
%w[bundle exec rubocop --parallel]
,
%w[scripts/lint-conflicts.sh]
,
%w[scripts/lint-rugged]
]
]
case
node_total
when
1
all_tasks
when
2
rake_lint_all
,
*
rest_jobs
=
all_tasks
case
node_index
when
1
[
rake_lint_all
]
else
rest_jobs
end
else
raise
"Parallelization > 2 (currently set to
#{
node_total
}
) isn't supported yet!"
end
end
tasks
=
jobs_to_run
((
ENV
[
'CI_NODE_INDEX'
]
||
1
).
to_i
,
(
ENV
[
'CI_NODE_TOTAL'
]
||
1
).
to_i
)
static_analysis
=
Gitlab
::
Popen
::
Runner
.
new
static_analysis
.
run
(
tasks
)
do
|
cmd
,
&
run
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment