luban 0.12.5 → 0.12.6

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: 16a4ac4cbbad990e445dcec48247c1cd6a002b4b
4
- data.tar.gz: 14357da1524674899935c16fb25af9ed251ea791
3
+ metadata.gz: 7d994ba8e032a835c2f4db5e904ed43d95fe9539
4
+ data.tar.gz: 39445b62899ebc545b71e73b6f6c9a337b372e87
5
5
  SHA512:
6
- metadata.gz: dde6271800c608b4f94b12a885ed99cd19cf3b19e9f0a685e9fc9a50419d92d95d2842fb2f2be13cb90f144ebd8dabe77c7e2bb4f6de410944288099e0845736
7
- data.tar.gz: 718e2c0e435ed82de8e626d6c3aa28702db137fbab46d31dd24c60a0ce7d5c242dea44e20c1a7f36435b2985e239af680eb50d6dd06c9e45fdf226342c099ae1
6
+ metadata.gz: 6a0bcf85fbfa1534bd0dabd52d4d49caccc6855b70caf2aa8b253ac7ddf27684d958b3638d452eaf95f5f295f6706ceb20319a7e7da96df8a3c800d2432c20dd
7
+ data.tar.gz: 2e704c5e1f3b786721b57de9c523f7f5cc806ffd68ce04bca8dace5238175c530a232278a064c100790c7e834dabb680e8301d3a618f2ac19407e3b5770e0b35
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.12.6 (Feb 17, 2017)
4
+
5
+ Minor enhancements:
6
+ * Added new Luban parameter for docker, #base_packages, to specify OS packages/libs/tools
7
+ * As a result, optimized Dockerfile.erb for yum install with this new parameter
8
+
3
9
  ## Version 0.12.5 (Feb 16, 2017)
4
10
 
5
11
  Minor enhancements:
@@ -5,6 +5,13 @@ ARG luban_uid
5
5
  ARG luban_user
6
6
  ARG luban_root_path
7
7
 
8
+ <% if has_base_packages? -%>
9
+ # Install required tools and libraries
10
+ RUN yum -y install \
11
+ <%= " " + base_packages.join(" \\\n ") %> && \
12
+ yum clean all
13
+ <% end -%>
14
+
8
15
  # Create luban user with the given uid
9
16
  RUN adduser -ms /bin/bash -u $luban_uid $luban_user && \
10
17
  echo "source <%= envrc_file %>" >> /home/$luban_user/.bashrc && \
@@ -14,6 +21,8 @@ RUN adduser -ms /bin/bash -u $luban_uid $luban_user && \
14
21
  # Add application archives
15
22
  ADD <%= build[:archives].collect { |_, a| a[:path].basename }.join(" \\\n ") %> /
16
23
 
24
+ # RUN chown -R $luban_user:$luban_user $luban_root_path
25
+
17
26
  # Populate image labels
18
27
  LABEL luban.project="<%= project %>" \
19
28
  luban.application="<%= project %>" \
@@ -127,11 +127,14 @@ module Luban
127
127
  parameter :build_tag, default: '0.0.0'
128
128
  parameter :base_image, default: 'centos:7'
129
129
  parameter :timezone, default: 'UTC'
130
+ parameter :base_packages, default: ->{ Array.new }
130
131
  parameter :docker_tls_verify, default: false
131
132
  parameter :docker_cert_path
132
133
  parameter :docker_tcp_port
133
134
  parameter :docker_unix_socket
134
135
 
136
+ def has_base_packages?; !base_packages.empty?; end
137
+
135
138
  def validate_for_docker_cert_path
136
139
  return if !docker_tls_verify and docker_cert_path.nil?
137
140
  if docker_cert_path.is_a?(String)
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.12.5"
3
+ VERSION = "0.12.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli