Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1070 from AndrewMcBurney/launch_fix
Browse files Browse the repository at this point in the history
Fix startup error if no pull request triggers are defined.
  • Loading branch information
armcburney committed Jul 10, 2018
2 parents a8ebf8b + a4a0ec7 commit 819aa59
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ group :test, :development do
gem "rack-test", require: "rack/test"
gem "rake"
gem "rspec"
gem "webmock", ">= 3.4.1", "< 3.5.0"
gem "timecop", ">= 0.9.1", "< 1.0.0"
gem "webmock", ">= 3.4.1", "< 3.5.0"
end
1 change: 1 addition & 0 deletions agent/client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require_relative "agent"

# A module encapsulating fastlane.ci agent code.
module FastlaneCI
module Agent
##
Expand Down
2 changes: 1 addition & 1 deletion agent/invocation/recipes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setup_repo(git_url, git_sha)
Dir.chdir("repo")

sh("git checkout #{git_sha}")

sh("gem install bundler --no-doc")
sh("bundle install --deployment")
end
Expand Down
6 changes: 6 additions & 0 deletions launch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ def self.run_pending_github_builds(projects: nil, github_service: nil)
logger.debug("Searching all projects for commits with pending status that need a new build")
# For each project, rerun all builds with the status of "pending"
projects.each do |project|
# Don't enqueue builds for the open pull requests if we don't have a pull request trigger defined for it
next if project.find_triggers_of_type(trigger_type: :pull_request).first.nil?

pending_build_shas_needing_rebuilds = Services.build_service.pending_build_shas_needing_rebuilds(
project: project
)
Expand Down Expand Up @@ -284,6 +287,9 @@ def self.run_pending_github_builds(projects: nil, github_service: nil)
def self.enqueue_builds_for_open_github_prs_with_no_status(projects: nil, github_service: nil)
logger.debug("Searching for open PRs with no status and starting a build for them")
projects.each do |project|
# Don't enqueue builds for the open pull requests if we don't have a pull request trigger defined for it
next if project.find_triggers_of_type(trigger_type: :pull_request).first.nil?

# TODO: generalize this sort of thing
credential_type = project.repo_config.provider_credential_type_needed

Expand Down

0 comments on commit 819aa59

Please sign in to comment.