Sha256: 82d5eb2e9bfc60e56e076ceb11433fada3ce22d77ec7a75a19681b381a953f21

Contents?: true

Size: 1.01 KB

Versions: 18

Compression:

Stored size: 1.01 KB

Contents

require 'rake'

module Rake
  module Funnel
    module Integration
      module TeamCity
        class ProgressReport < Rake::Funnel::Integration::ProgressReport
          include Rake::Funnel::Integration

          def initialize
            super do
              task_starting do |task, _args|
                next unless TeamCity.running?

                unless TeamCity.rake_runner?
                  ServiceMessages.block_opened(name: task.name)
                end
              end

              task_finished do |task, _args, error|
                next unless TeamCity.running?

                if error.respond_to?(:inner_exception)
                  error = error.inner_exception
                end

                ServiceMessages.build_problem(description: error.message[0..4000 - 1]) if error

                next if Rake::Funnel::Integration::TeamCity.rake_runner?

                ServiceMessages.block_closed(name: task.name)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rake-funnel-0.18.0 lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.17.0 lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.16.1 lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.16.0 lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.15.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.14.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.13.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.12.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.11.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.10.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.9.1.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.9.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.8.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.7.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.6.1.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.6.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.5.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb
rake-funnel-0.4.0.pre lib/rake/funnel/integration/teamcity/progress_report.rb