Commit ba16372e authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'alberts-assign-local-vars-static-analysis' into 'master'

Assign values to variables

See merge request gitlab-org/gitlab!72082
parents fd6ce34c d2aed8d9
......@@ -66,7 +66,9 @@ class StaticAnalysis
].compact.freeze
def run_tasks!(options = {})
node_assignment = tasks_to_run((ENV['CI_NODE_TOTAL'] || 1).to_i)[(ENV['CI_NODE_INDEX'] || 1).to_i - 1]
total_nodes = (ENV['CI_NODE_TOTAL'] || 1).to_i
current_node_number = (ENV['CI_NODE_INDEX'] || 1).to_i
node_assignment = tasks_to_run(total_nodes)[current_node_number - 1]
if options[:dry_run]
puts "Dry-run mode!"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment