spec: remove unused pact rake task

Remove unused rake task for publishing generic api consumer pact file.
We use the script bin/contracts_publish_api instead.

Change-Id: I507b35e1aef7df201309f09f171a8e816218c7d7
Reviewed-on: https://gerrit.instructure.com/158764
Reviewed-by: Anju Reddy <areddy@instructure.com>
Reviewed-by: Rohan Cheeniyil <rcheeniyil@instructure.com>
Tested-by: Jenkins
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
This commit is contained in:
Robert Lamb 2018-07-26 09:53:35 -06:00
parent 0c6945f2e6
commit 4684bd2606
1 changed files with 0 additions and 39 deletions

View File

@ -1,39 +0,0 @@
if Gem.loaded_specs.has_key?('pact_broker-client')
require 'pact_broker/client/tasks'
# see https://github.com/pact-foundation/pact_broker-client/blob/master/README.md
namespace :broker do
GENERIC_CONSUMER_VERSION = '0.15'
PactBroker::Client::PublicationTask.new(:local) do |task|
format_rake_task(
task,
'http://pact-broker.docker',
'pact',
'broker',
'local'
)
end
PactBroker::Client::PublicationTask.new(:jenkins_post_merge) do |task|
format_rake_task(
task,
ENV.fetch('PACT_BROKER_HOST'),
ENV.fetch('PACT_BROKER_USERNAME'),
ENV.fetch('PACT_BROKER_PASSWORD'),
`git rev-parse --abbrev-ref HEAD`.strip
)
end
def format_rake_task(task, url, username, password, task_tag)
task.consumer_version = GENERIC_CONSUMER_VERSION
task.pattern = 'pacts/*.json'
task.pact_broker_base_url = url
task.pact_broker_basic_auth = { username: username, password: password }
task.tag = task_tag
puts "Pact file tagged with: #{task.tag}"
end
end
end