clc-promote 0.8.2 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -0
- data/lib/chef/knife/promote.rb +4 -0
- data/lib/promote/chef_server.rb +1 -0
- data/lib/promote/utils.rb +6 -1
- data/lib/promote/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff33029edf1c248f6ab90181a88f21dd512abe04
|
4
|
+
data.tar.gz: d1d8ddebce905d413641409e34c63a83b06be53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 993e2517da78c81f045663462df22d875f38cfb685db461df27c514024635b0758752e5d99029cc69033ba7268d76df30be5e8e982694fc6121cfcc4bb92a401
|
7
|
+
data.tar.gz: 049903fd9fbef0bac761206eb586e09f6a724dd7c7d8889b5727cf31b0cffede33cad009dfb41dc77eb1905f024d0599d3908c628fe3c4910c736d962cd40b89
|
data/Rakefile
CHANGED
@@ -4,6 +4,15 @@ require 'rspec/core/rake_task'
|
|
4
4
|
$:.unshift(File.dirname(__FILE__) + '/lib')
|
5
5
|
require 'promote/version'
|
6
6
|
|
7
|
+
module Bundler
|
8
|
+
class GemHelper
|
9
|
+
def rubygem_push(path)
|
10
|
+
gems = Dir.glob(File.join(File.dirname(__FILE__), 'pkg', 'clc-promote-*.gem')).sort
|
11
|
+
system("gem nexus '#{gems[-1]}'")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
7
16
|
RSpec::Core::RakeTask.new(:test)
|
8
17
|
|
9
18
|
task :default => [:test]
|
data/lib/chef/knife/promote.rb
CHANGED
@@ -66,6 +66,10 @@ module KnifePromote
|
|
66
66
|
ui.info "Committing and pushing changes to #{dest_env} back to git"
|
67
67
|
env_file = File.join(promote_config.environment_directory, "#{dest_env}.json")
|
68
68
|
repo = Promote::GitRepo.new(env_file)
|
69
|
+
|
70
|
+
# If there were any pushes to the repo between the sync check
|
71
|
+
# and here the commit will throw. So we do a pull to avoid that.
|
72
|
+
repo.git.pull
|
69
73
|
repo.commit("promoted new constraints from #{source_env} to #{dest_env}", true)
|
70
74
|
end
|
71
75
|
|
data/lib/promote/chef_server.rb
CHANGED
data/lib/promote/utils.rb
CHANGED
@@ -3,7 +3,12 @@ require 'chef'
|
|
3
3
|
module Promote
|
4
4
|
class Utils
|
5
5
|
def self.chef_server_cookbooks(config, versions = 'all')
|
6
|
-
|
6
|
+
Chef::Config[:ssl_verify_mode] = :verify_none
|
7
|
+
rest = Chef::REST.new(
|
8
|
+
config.chef_server_url,
|
9
|
+
config.node_name,
|
10
|
+
config.client_key
|
11
|
+
)
|
7
12
|
rest.get_rest("/cookbooks?num_versions=#{versions}")
|
8
13
|
end
|
9
14
|
|
data/lib/promote/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clc-promote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CenturyLink Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clc-git
|