a2zdeploy 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edab4c51044637b609ff7db1584caa6b6b1bc4f2
4
- data.tar.gz: ea01503bc8ce736a0a80d9f5a92877685dfef052
3
+ metadata.gz: 7f35c9a4c04ea9b55dcd935dd480aaf891e2609e
4
+ data.tar.gz: 33bb2061a5763d24eaa2bf8f6aa7991245316a26
5
5
  SHA512:
6
- metadata.gz: 03baf61d9457ad7647d5db1db0f4bb75fa08844d8b9cab264a6f3f5070616f8a51f904a8dae7ee82d4a67e3d9bef740f3f27320cc9311f87935ce884aa608617
7
- data.tar.gz: aacb8a92c90f4df953da316a291fe1c8e61da388a574ee7053fb6b6e4f88ff337bec93b3386b2733650cbf970e0c85f7817aafca3682cb408191b7a71c7f313e
6
+ metadata.gz: a9bbf20ec080cee4eaed2f27f94e5899c9daeef58f53af215dfb263648c98a4e4c632e89dcd939765e81678ce193b1941cf5569817528f589548e0e8af07b215
7
+ data.tar.gz: 08f54fdeef25bdc998ca04abdf4c879e2284a0c337421bf0569acd661f12ddbd01d43e9b759dd5a8b0363955c7149173574a2f2b0f8054d757ccee50eae3e804
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'a2zdeploy'
3
- s.version = '1.0.8'
3
+ s.version = '1.0.9'
4
4
  s.date = '2016-02-08'
5
5
  s.summary = 'Given a project dependency chain, updates versions, builds, tests, manages service and cloud settings as well as build environment configuration'
6
6
  s.description = 'Automated Upgrades Gem. Provides version upgrades, build and deployment configuration management'
@@ -70,6 +70,7 @@ class InputValidator
70
70
  yield @simple_validator.method_value_not_nil_or_empty project.metadata, 'status', node_name
71
71
 
72
72
  yield @simple_validator.method_exists project.metadata, 'build_configuration_id', node_name
73
+ yield @simple_validator.method_exists project.metadata, 'build_wait_time_in_secs', node_name
73
74
 
74
75
  node_name = 'project.metadata.env_vars'
75
76
  yield @simple_validator.method_exists project.metadata.env_vars, 'env', node_name
@@ -21,7 +21,7 @@ module TeamCityApi
21
21
 
22
22
  #Build trigger API
23
23
  def TeamCityApi.trigger_build buildConfigurationId, username, password
24
-
24
+ puts "Triggering build configuration: #{buildConfigurationId} for #{username}..."
25
25
  configContent = create_build_trigger_config buildConfigurationId
26
26
  uri = URI.parse 'http://teamcity.relayhealth.com'
27
27
  http = Net::HTTP.new uri.host, uri.port
@@ -127,7 +127,7 @@ class UpgradePackages
127
127
  return false if !update_branch
128
128
  # kick off teamcity build
129
129
  puts GlobalConstants::UPGRADE_PROGRESS + 'Teamcity Project being triggered...'
130
- TeamCityApi.trigger_build @config_map.build_configuration_id, ENV['tc_un'], ENV['tc_pwd']
130
+ TeamCityApi.trigger_build @config_map.metadata.build_configuration_id, ENV['tc_un'], ENV['tc_pwd']
131
131
  end
132
132
 
133
133
  true
@@ -159,7 +159,7 @@ class UpgradePackages
159
159
  puts GlobalConstants::UPGRADE_PROGRESS + 'Local version changes are being committed'
160
160
  return false if !GithubApi.CommitChanges('Versions updated')
161
161
  end
162
-
162
+
163
163
  # rebase and push the branch
164
164
  puts GlobalConstants::UPGRADE_PROGRESS + 'Rebasing and pushing update branch...'
165
165
  GithubApi.CheckoutLocal @branch
@@ -10,7 +10,6 @@ class UpgradeAll
10
10
  VERSION_MAP_FILE = 'versionmap.json'
11
11
  # todo: remove the up one level path
12
12
  MANIFEST_FILE = 'manifest.json'
13
- MAX_CHECKS = 12
14
13
 
15
14
  # repo_url is where the last known version map and manifest are checked-in
16
15
  def initialize repo_url, branch, manifest_path = MANIFEST_FILE
@@ -106,7 +105,7 @@ class UpgradeAll
106
105
  Dir.chdir GlobalConstants::PARENTDIR
107
106
 
108
107
  # if publishing nuget package, wait for a minute for publish to finish
109
- waitfor if node.should_publish_nuget
108
+ waitfor node.metadata.build_wait_time_in_secs if node.should_publish_nuget
110
109
  else
111
110
  # either cycle was unterrupted, a step in upgrade failed or full cycle successfully completed
112
111
  # save the version map and manifest
@@ -195,16 +194,16 @@ class UpgradeAll
195
194
  "One or more validation errors have occurred: #{validation_errors.join(' ')}"
196
195
  end
197
196
 
198
- def waitfor
197
+ def waitfor build_wait_time_in_secs
199
198
  checks = 0
200
199
 
201
- until checks > MAX_CHECKS
200
+ until checks > build_wait_time_in_secs
202
201
  sleep 5
203
- checks += 1
202
+ checks += 5
204
203
  puts GlobalConstants::UPGRADE_PROGRESS + 'Waiting for 5 seconds...'
205
204
  end
206
205
 
207
- raise 'Waitfor timeout expired. Make sure that you aren\'t running something from the build output folders, or that you have browsed to it through Explorer.' if checks > MAX_CHECKS
206
+ raise 'Waitfor timeout expired. Make sure that you aren\'t running something from the build output folders, or that you have browsed to it through Explorer.' if checks > build_wait_time_in_secs
208
207
  end
209
208
 
210
209
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a2zdeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suresh Batta