a2zdeploy 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/a2zdeploy.gemspec +1 -1
- data/lib/input_validator.rb +1 -0
- data/lib/teamcity_api.rb +1 -1
- data/lib/upgrade.rb +2 -2
- data/lib/upgradeall.rb +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f35c9a4c04ea9b55dcd935dd480aaf891e2609e
|
4
|
+
data.tar.gz: 33bb2061a5763d24eaa2bf8f6aa7991245316a26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9bbf20ec080cee4eaed2f27f94e5899c9daeef58f53af215dfb263648c98a4e4c632e89dcd939765e81678ce193b1941cf5569817528f589548e0e8af07b215
|
7
|
+
data.tar.gz: 08f54fdeef25bdc998ca04abdf4c879e2284a0c337421bf0569acd661f12ddbd01d43e9b759dd5a8b0363955c7149173574a2f2b0f8054d757ccee50eae3e804
|
data/a2zdeploy.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'a2zdeploy'
|
3
|
-
s.version = '1.0.
|
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'
|
data/lib/input_validator.rb
CHANGED
@@ -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
|
data/lib/teamcity_api.rb
CHANGED
@@ -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
|
data/lib/upgrade.rb
CHANGED
@@ -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
|
data/lib/upgradeall.rb
CHANGED
@@ -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 >
|
200
|
+
until checks > build_wait_time_in_secs
|
202
201
|
sleep 5
|
203
|
-
checks +=
|
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 >
|
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
|