containerci 0.4.0 → 0.5.0

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: 93858c0d6e36c0ef633a539616944fe4509b743d
4
- data.tar.gz: 93fcc68718de639b9e620f13b576e4e45832dea9
3
+ metadata.gz: 94e5bf6189f0ae386ac11d97d41fe8c8be361450
4
+ data.tar.gz: c49422e41c29ee310e6f5038efba80e34cc46314
5
5
  SHA512:
6
- metadata.gz: 76bf0b9484ab7a0a8c54a005eec9a58402efaea989a44f1c148980d95d90d6ee704eaff7a7ef2820e75c1f8403558481a71023521d4aeed793dc05e2b4da806b
7
- data.tar.gz: 6439ed23bfdc3e97257e41c926346073388737a5b07fadafac6aa6517fa7a03f3d25a7b13b344b9048343bae4195db08df12490c79a9cbabc788f8d89ce9a614
6
+ metadata.gz: c4bc64245761f5f71cdc5c427dd25a8963760bc58e163cf2282fe0d3b37ac58877ea748a438992ba70a44b306f09120a47aad8ba032d4a48abef5b524356ce7d
7
+ data.tar.gz: 5e078e73db836e051612c961ac61f6f42122443958eb4d1ca64e0d69a66e707ee91b40f0aa2fdbc05ee2bc96232923e987273bf4cc90a274eaa2b100fbd7dd11
data/ChangeLog.md CHANGED
@@ -13,3 +13,7 @@ Fix git commands to handle tags correctly
13
13
  ## Changes since ContainerCI 0.3.1
14
14
 
15
15
  Improve caching approach.
16
+
17
+ ## Changes since ContainerCI 0.4.0
18
+
19
+ Retry on docker push if error received.
@@ -1,4 +1,4 @@
1
1
  # Rakefile toolkit for creating automated builds for Docker containers.
2
2
  module ContainerCI
3
- VERSION = '0.4.0'
3
+ VERSION = '0.5.0'
4
4
  end
data/lib/containerci.rb CHANGED
@@ -33,6 +33,12 @@ module ContainerCI
33
33
  @next_version ||= `sh -c 'TZ=UTC date +%Y-%m-%d-%H%M'`.chomp
34
34
  end
35
35
 
36
+ def docker_push_cmds(version)
37
+ 'false; ' \
38
+ 'until [ $? -eq 0 ]; do ' \
39
+ "docker push #{USER}/#{PROJECT_NAME}:#{version} < /dev/null; done"
40
+ end
41
+
36
42
  def define
37
43
  @dsl.define_task(:update_github_project) do
38
44
  puts "pulling #{GITHUB_PROJECT}..."
@@ -109,8 +115,9 @@ module ContainerCI
109
115
  :docker_tag])
110
116
 
111
117
  @dsl.define_task(:docker_push) do
112
- sh "docker push #{USER}/#{PROJECT_NAME}"
113
- sh "docker push #{USER}/#{PROJECT_NAME}:#{current_version}"
118
+
119
+ sh docker_push_cmds('latest')
120
+ sh docker_push_cmds(current_version)
114
121
  end
115
122
 
116
123
  @dsl.define_task(after_test_success:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: containerci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-10 00:00:00.000000000 Z
11
+ date: 2015-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.4.6
109
+ rubygems_version: 2.4.3
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Rakefile toolkit for creating automated builds for Docker containers.