ufo 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7789e9644d6d70e458722decdc1212590dcc2941
4
- data.tar.gz: 686742062dc6728297aecad1a4fb89583ba24b2a
3
+ metadata.gz: 62fced9a39126dbf8cfe7fac5b0972f03444cfea
4
+ data.tar.gz: b40504f936a2b3ba31e1d2b0e3dfd398cf5b58b1
5
5
  SHA512:
6
- metadata.gz: 4580b708e976c77128454ff540cdf4751bb9634dbcd9813b31fccdd1e757805aef1592fd2b8804827c0e540de70f0e9715fb1bed6870db7f3ad4e4c156529d9f
7
- data.tar.gz: 3137da3783c02fcfeb770dc95bc2000f0bc4b947aa96c9c0f115c684d7b56a050d4479c67129ba834a8eb350beceec1089f715bf9f4a04eefa111c1243f70b22
6
+ metadata.gz: ebad958d36276a8a7edeafebb1e7b0cd628b0d50a371a6888c24f3fd70c0650bc29ff3ebfe74c58c132e7113e4a64a456d6a9d71e0684d27a2065340ad41ddd9
7
+ data.tar.gz: e8fde0443a5e90bed2de0df275281fec8b08019dc84dbf591b4fdcd9fb4c48faa8b62fe3d337d281480511a11253638b79fb9d51b6ba540ca91d56b5938adc05
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.1.1]
7
+
8
+ - rename `ufo docker full_image_name` to `ufo docker image_name`
9
+
10
+ ## [0.1.0]
11
+
12
+ - clean up for initial stable release
13
+
6
14
  ## [0.0.5]
7
15
 
8
16
  - add docker base command
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Quick Introduction
4
4
 
5
- Ufo is a simple tool that makes building and shipping Docker containers to [AWS ECS](https://aws.amazon.com/ecs/) super easy.
5
+ Ufo is a simple tool that makes building and shipping Docker containers to [AWS ECS](https://aws.amazon.com/ecs/) super easy. This blog post provides an introduction to the tool: [Ufo - Build Docker Containers and Ship Them to AWS ECS](https://medium.com/@tongueroo/ufo-easily-build-docker-containers-and-ship-them-to-aws-ecs-15556a2b39f#.qqu8o4wal).
6
6
 
7
7
  A summary of steps `ufo ship` takes:
8
8
 
data/bin/ufo CHANGED
@@ -3,7 +3,6 @@
3
3
  require 'rubygems'
4
4
 
5
5
  $:.unshift(File.expand_path('../../lib', __FILE__))
6
- puts File.expand_path('../../lib', __FILE__)
7
6
  require 'ufo'
8
7
  require 'ufo/cli'
9
8
 
data/lib/ufo/cli.rb CHANGED
@@ -27,11 +27,12 @@ module Ufo
27
27
  EcrCleaner.new(builder.image_name, options.merge(tag_prefix: "base")).cleanup
28
28
  end
29
29
 
30
- desc "full_image_name", "displays the full docker image with tag that will be generated"
30
+ desc "image_name", "displays the full docker image with tag that will be generated"
31
+ option :generate, type: :boolean, default: false, desc: "Generate a name without storing it"
31
32
  long_desc CLI::Help.docker_full_image_name
32
- def full_image_name
33
+ def image_name
33
34
  full_image_name = DockerBuilder.new(options).full_image_name
34
- puts "Docker image name that will be used: #{full_image_name}"
35
+ puts full_image_name
35
36
  end
36
37
 
37
38
  desc "cleanup IMAGE_NAME", "Cleans up old images. Keeps a specified amount."
@@ -69,6 +69,10 @@ module Ufo
69
69
 
70
70
  # full_image - includes the tag
71
71
  def full_image_name
72
+ if @options[:generate]
73
+ return generate_name # name already has a newline
74
+ end
75
+
72
76
  unless File.exist?(docker_name_path)
73
77
  puts "Unable to find #{docker_name_path} which contains the last docker image name that was used as a part of `ufo docker build`. Please run `ufo docker build` first."
74
78
  exit 1
@@ -83,11 +87,15 @@ module Ufo
83
87
  def store_full_image_name
84
88
  dirname = File.dirname(docker_name_path)
85
89
  FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
86
- full_image_name = "#{image_name}:#{@image_namespace}-#{timestamp}-#{git_sha}"
90
+ full_image_name = generate_name
87
91
  IO.write(docker_name_path, full_image_name)
88
92
  IO.write("#{@project_root}/ufo/version", full_image_name)
89
93
  end
90
94
 
95
+ def generate_name
96
+ "#{image_name}:#{@image_namespace}-#{timestamp}-#{git_sha}"
97
+ end
98
+
91
99
  def docker_name_path
92
100
  # output gets entirely wiped by tasks builder so dotn use that folder
93
101
  "#{@project_root}/ufo/docker_image_name_#{@image_namespace}.txt"
@@ -37,7 +37,6 @@ module Ufo
37
37
  tags = tags.sort.reverse # ordered by most recent images first
38
38
  delete_tags = tags[@keep..-1]
39
39
  if delete_tags.nil?
40
- say "No images found that matched #{@docker_image_name}:#{tag_string}"
41
40
  @delete_list = []
42
41
  else
43
42
  @delete_list = delete_tags.map { |t| "#{@docker_image_name}:#{t}" }.join(' ')
data/lib/ufo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-01 00:00:00.000000000 Z
11
+ date: 2016-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor