This repository has been archived by the owner on May 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
Support for multiple runners #97
Open
n-e-g
wants to merge
9
commits into
gitlabhq:master
Choose a base branch
from
n-e-g:multiple-runners
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b1337b9
Supports multiple runners in dedicated directories
46c3305
Reverts changes in init.d startup script
584b8cc
Fixes build spec
106aaf4
Update build_spec.rb
n-e-g 75a36c6
Fixes init.d start script
eba679f
Merger remote changes
d8755ca
Merge branch 'master' of https://github.com/gitlabhq/gitlab-ci-runner…
031f098
Converts single quotes to double
b7bc8ba
Fixes long line
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,9 @@ module GitlabCi | |
class Runner | ||
attr_accessor :current_build, :thread | ||
|
||
def initialize | ||
puts '* Gitlab CI Runner started' | ||
def initialize(runner) | ||
@runner = runner | ||
puts "* Gitlab CI Runner #{@runner} started" | ||
puts '* Waiting for builds' | ||
loop do | ||
if running? | ||
|
@@ -34,7 +35,7 @@ def abort_if_timeout | |
|
||
def update_build | ||
return unless @current_build.completed? | ||
puts "#{Time.now.to_s} | Completed build #{@current_build.id}, #{@current_build.state}." | ||
puts "#{Time.now.to_s} | Completed build #{@current_build.id}, #{@current_build.state} on runner #{@runner}." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant use of |
||
|
||
# Make sure we push latest build info submitted | ||
# before we clean build | ||
|
@@ -70,14 +71,14 @@ def get_build | |
end | ||
|
||
def network | ||
@network ||= Network.new | ||
@network ||= Network.new(@runner) | ||
end | ||
|
||
def run(build_data) | ||
@current_build = GitlabCi::Build.new(build_data) | ||
puts "#{Time.now.to_s} | Starting new build #{@current_build.id}..." | ||
@current_build = GitlabCi::Build.new(@runner, build_data) | ||
puts "#{Time.now.to_s} | Starting new build #{@current_build.id} with runner #{@runner}..." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant use of |
||
@current_build.run | ||
puts "#{Time.now.to_s} | Build #{@current_build.id} started." | ||
puts "#{Time.now.to_s} | Build #{@current_build.id} on runner #{@runner} started." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant use of |
||
end | ||
|
||
def collect_trace | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant use of
Object#to_s
in interpolation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a ruby expert, so could you please show me how to fix this issue and I will apply it to later ones