minke 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjIxYmE2YmYwMjJmMWYwMTBjOGFlYjE4YzFmZGM3ODgxOTk0M2JiNw==
4
+ MjZmMjA4YjA2NWRlZWJmZDA5YzA0NWZmODg3NjVmYThhYzdlZDMxOQ==
5
5
  data.tar.gz: !binary |-
6
- Yzg5N2IzZTE0MTVmODMwZDNkY2NlYzQ3NGJlZWY2ZTUxZGE5Y2UxMQ==
6
+ MDE5ZTUwMWM3N2RhMDlkYTMzZGUwMTFmODMxYWExMmUwYWIwZDFjNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjlkMzYyNTFiODNhYzMzZmEwOWIyMGNlZTQ2OGE0NDY0ZGVlY2RmYzFiNzUw
10
- ZjY2ODAzMTE0YWRkMjUwNTJjMjAxOGU3M2EyZGI4NGQ1ZDA3NGUyNmVlNGFm
11
- MzAzN2U0NDkxOTEwOTlkOGUxOWM3MTQ0MzZiNTUyYWE5MjI5YzA=
9
+ NmZhMDQyY2ZmNGU2YzRiODE0MDNiZGNjMmVlMzU2NWMyM2ZhNWFkMDQwMTU3
10
+ N2ViMGE2ZGJmZjRkNzljZDU0YTFjOGE3N2U4Mzk0NTM2NDNkNzg0MWUxNTY3
11
+ N2M2YmFlYTllZGI4NzdlZWUyN2Q5MTIyMzZmNTRkNjRiYTEwMWI=
12
12
  data.tar.gz: !binary |-
13
- ZDZkMzc3Y2YzNjg2MzY1NGFkNzZjYTA4MDYyOTkzNGNjZDYyMThjMWMzZTU4
14
- ZWZmYWMyODkxYmMzZTVjNjQxOTkxODVkYzcyZWQyZGEyMTBiNWNkZDdmMjBl
15
- OTI4ZDYyYjNlOTVlMTI2MDk4NDU4MTM3MmEwMzRmOGNhYjI4Nzc=
13
+ ZDY1NTAwZWRkMTNiMzQyZTU1MmVkZmQxNzQ2NTk4OWUzMzhkOWQ3YWJhNGM0
14
+ NmQ2N2E0YWNjMDY4M2ZmMGM2YjJlODM3Mjc3NGMxOWI4MjI2NTY4MTBkMjYz
15
+ Y2IwZjFmNjdiN2NjMTZhYzQ1MDlhM2M1ODI1YWI2N2ZlNDc1NWM=
@@ -101,7 +101,7 @@ module Minke
101
101
  begin
102
102
  container.delete()
103
103
  rescue => e
104
- puts "Unable to delete container"
104
+ puts "Error: Unable to delete container"
105
105
  end
106
106
  end
107
107
  end
@@ -1,32 +1,34 @@
1
1
  namespace :app do
2
2
  desc "run unit tests"
3
3
  task :test => ['config:set_docker_env', 'config:load_config', 'docker:fetch_images'] do
4
- p "Test application"
5
-
6
4
  config = Minke::Helpers.config
7
5
 
8
6
  begin
9
7
  # Get go packages
10
- puts "Go get"
11
- container, ret = Minke::GoDocker.create_and_run_container config['docker'], ['go','get','-t','-v','./...']
8
+ puts "## Go get"
9
+ container, ret = Minke::GoDocker.create_and_run_container config['docker'], ['go','get','-t','-v','-d','./...']
12
10
  ensure
13
11
  Minke::GoDocker.delete_container container
14
12
  end
15
13
 
14
+ puts ""
15
+
16
16
  begin
17
17
  # Test application
18
- puts "Go test"
18
+ puts "## Go test"
19
19
  container, ret = Minke::GoDocker.create_and_run_container config['docker'], ['go','test','./...']
20
20
 
21
21
  raise Exception, 'Error running command' unless ret == 0
22
22
  ensure
23
23
  Minke::GoDocker.delete_container container
24
24
  end
25
+
26
+ puts ""
25
27
  end
26
28
 
27
29
  desc "build and test application"
28
30
  task :build => [:test] do
29
- p "Build for Linux"
31
+ puts "## Build for Linux"
30
32
 
31
33
  config = Minke::Helpers.config
32
34
 
@@ -38,31 +40,37 @@ namespace :app do
38
40
  ensure
39
41
  Minke::GoDocker.delete_container container
40
42
  end
43
+
44
+ puts ""
41
45
  end
42
46
 
43
47
  task :copy_assets do
44
- p "Copy assets"
48
+ puts "## Copy assets"
45
49
 
46
50
  config = Minke::Helpers.config
47
51
 
48
52
  if config['after_build'] != nil && config['after_build']['copy_assets'] != nil
49
53
  Minke::Helpers.copy_files config['after_build']['copy_assets']
50
54
  end
55
+
56
+ puts ""
51
57
  end
52
58
 
53
59
  desc "build Docker image for application"
54
60
  task :build_server => [:build, :copy_assets] do
55
61
  config = Minke::Helpers.config
56
62
 
57
- p "Building Docker image: #{config['go']['application_name']}"
63
+ puts "## Building Docker image: #{config['go']['application_name']}"
58
64
 
59
65
  Docker.options = {:read_timeout => 6200}
60
66
  image = Docker::Image.build_from_dir config['docker']['docker_file'], {:t => config['go']['application_name']}
67
+
68
+ puts ""
61
69
  end
62
70
 
63
71
  desc "run application with Docker Compose"
64
72
  task :run => ['config:set_docker_env', 'config:load_config'] do
65
- p "Run application with docker compose"
73
+ puts "## Run application with docker compose"
66
74
 
67
75
  config = Minke::Helpers.config
68
76
  compose = Minke::DockerCompose.new config['docker']['compose_file']
@@ -73,8 +81,10 @@ namespace :app do
73
81
  # do we need to run any tasks after the server starts?
74
82
  if config['run']['after_start'] != nil
75
83
  config['run']['after_start'].each do |task|
76
- puts "Running after_start task: #{task}"
84
+ puts "## Running after_start task: #{task}"
77
85
  Rake::Task[task].invoke
86
+
87
+ puts ""
78
88
  end
79
89
  end
80
90
 
@@ -82,6 +92,8 @@ namespace :app do
82
92
  Minke::Helpers.wait_until_server_running "#{config['run']['consul_loader']['url']}/v1/status/leader", 0
83
93
  loader = ConsulLoader::Loader.new(ConsulLoader::ConfigParser.new)
84
94
  loader.load_config config['run']['consul_loader']['config_file'], config['run']['consul_loader']['url']
95
+
96
+ puts ""
85
97
  end
86
98
 
87
99
  compose.logs
@@ -98,7 +110,7 @@ namespace :app do
98
110
  task :cucumber, [:feature] => ['config:set_docker_env', 'config:load_config'] do |t, args|
99
111
  config = Minke::Helpers.config
100
112
 
101
- puts "Running cucumber with tags #{args[:feature]}"
113
+ puts "## Running cucumber with tags #{args[:feature]}"
102
114
 
103
115
  if args[:feature] != nil
104
116
  feature = "--tags #{args[:feature]}"
@@ -115,8 +127,10 @@ namespace :app do
115
127
  # do we need to run any tasks after the server starts?
116
128
  if config['run']['after_start'] != nil
117
129
  config['run']['after_start'].each do |task|
118
- puts "Running after_start task: #{task}"
130
+ puts "## Running after_start task: #{task}"
119
131
  Rake::Task[task].invoke
132
+
133
+ puts ""
120
134
  end
121
135
  end
122
136
 
@@ -142,7 +156,7 @@ namespace :app do
142
156
 
143
157
  desc "push built image to Docker registry"
144
158
  task :push => ['config:load_config'] do
145
- p "Push image to registry"
159
+ puts "## Push image to registry"
146
160
 
147
161
  config = Minke::Helpers.config
148
162
  Minke::GoDocker.tag_and_push config
@@ -1,11 +1,17 @@
1
1
  namespace :docker do
2
2
  desc "updates build images for swagger and golang will overwrite existing images"
3
3
  task :update_images do
4
+ puts "## Updating Docker images"
4
5
  Minke::GoDocker.pull_image 'golang:latest'
6
+
7
+ puts ""
5
8
  end
6
9
 
7
10
  desc "pull images for golang from Docker registry if not already downloaded"
8
11
  task :fetch_images do
12
+ puts "## Pulling Docker images"
9
13
  Minke::GoDocker.pull_image 'golang' unless Minke::GoDocker.find_image 'golang:latest'
14
+
15
+ puts ""
10
16
  end
11
17
  end
data/lib/minke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Minke
2
- VERSION = "0.10.0"
2
+ VERSION = "0.11.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Jackson