Commit 53dc35b6 authored by John Skarbek's avatar John Skarbek

trying to test...

parent 9b91853b
......@@ -16,7 +16,7 @@ gem 'version_sorter', '~> 2.2.0'
gem 'parallel', '~> 1.14'
group :development, :test do
gem 'byebug'
gem 'pry-byebug'
gem 'climate_control', '~> 0.2.0'
gem 'pry'
gem 'rspec', '~> 3.7.0'
......
......@@ -15,7 +15,7 @@ GEM
ast (2.4.0)
binding_of_caller (0.7.3)
debug_inspector (>= 0.0.1)
byebug (9.0.5)
byebug (11.0.1)
climate_control (0.2.0)
coderay (1.1.2)
colorize (0.8.1)
......@@ -66,6 +66,9 @@ GEM
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.7.0)
byebug (~> 11.0)
pry (~> 0.10)
psych (3.1.0)
public_suffix (3.0.2)
rainbow (3.0.0)
......@@ -136,7 +139,6 @@ PLATFORMS
DEPENDENCIES
activesupport (~> 4.2.0)
byebug
climate_control (~> 0.2.0)
colorize
dotenv (~> 2.2.0)
......@@ -145,6 +147,7 @@ DEPENDENCIES
merge_db_schema (~> 0.1)
parallel (~> 1.14)
pry
pry-byebug
rake
rspec (~> 3.7.0)
rspec-parameterized
......
......@@ -17,21 +17,24 @@ namespace :auto_deploy do
desc 'Pick commits into the auto deploy branches'
task :pick do
operating_branch_info = ReleaseTools::Services::AutoDeployBranchService.new(nil).filter_branches
binding.pry
version = ReleaseTools::Version.new(operating_branch_info[:version]).to_ee
puts "--> Picking for #{version}..."
$stdout.puts "--> Picking for #{version}..."
results = ReleaseTools::CherryPick::Service
.new(ReleaseTools::Project::GitlabEe, version, operating_branch_info[:branch])
.dry_run
$stdout.puts "Nothing to pick." if results.empty?
exit 1 if results.empty?
binding.pry
results = ReleaseTools::CherryPick::Service
.new(ReleaseTools::Project::GitlabEe, version, operating_branch_info[:branch])
.execute
results.each do |result|
puts result.inspect
end
# check for valid pick tag that contains version
#versions.each do |version|
#end
# perform pick
end
end
......
---
http_interactions:
- request:
method: get
uri: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/milestones?state=active
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/json
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- Gitlab Ruby Gem 4.10.0
Private-Token:
- "[DEV_API_PRIVATE_TOKEN]"
response:
status:
code: 401
message: Unauthorized
headers:
Server:
- nginx
Date:
- Fri, 12 Apr 2019 15:57:29 GMT
Content-Type:
- application/json
Content-Length:
- '30'
Cache-Control:
- no-cache
Vary:
- Origin
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-Request-Id:
- 55twc9FIFs3
X-Runtime:
- '0.014939'
Ratelimit-Limit:
- '600'
Ratelimit-Observed:
- '1'
Ratelimit-Remaining:
- '599'
Ratelimit-Reset:
- '1555084709'
Ratelimit-Resettime:
- Sat, 12 Apr 2019 15:58:29 GMT
body:
encoding: UTF-8
string: '{"message":"401 Unauthorized"}'
http_version:
recorded_at: Fri, 12 Apr 2019 15:57:29 GMT
recorded_with: VCR 2.9.3
......@@ -8,6 +8,10 @@ describe ReleaseTools::CherryPick::Service do
subject { described_class.new(ReleaseTools::Project::GitlabCe, version) }
describe 'initialize' do
it 'for some reason retuns an empty array' do
expect(subject).to eq([])
end
it 'validates version argument' do
expect { described_class.new(double, double(valid?: false)) }
.to raise_error(RuntimeError, /Invalid version provided/)
......@@ -19,6 +23,10 @@ describe ReleaseTools::CherryPick::Service do
expect { described_class.new(double, version) }
.to raise_error(RuntimeError, /Preparation merge request not found/)
end
it 'creates branch' do
expect(ReleaseTools::PreparationMergeRequest).to receive(:new)
end
end
describe '#execute', vcr: { cassette_name: 'cherry_pick/with_prep_mr' } do
......
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