fpm-dockery 0.1.4 → 0.1.5

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: 92438edd069b2d126631aec462f4413da8337994
4
- data.tar.gz: dd4be38c6c33a50016269809012009d62cd86a14
3
+ metadata.gz: 081cca7e7810446df757cb19700fa3929b7c4818
4
+ data.tar.gz: b57c6427314d611d5533ec3016ae970da96e7ac3
5
5
  SHA512:
6
- metadata.gz: 0aea7e497436295b38f0a9329f1853bf660f38d670a58865ab3ed8a9bd3dddbbf0c5848c7cd6042822bfd93996b75f939459b6e56a17b7368e291be7b1fa8002
7
- data.tar.gz: 7234042aa6cf54a37db27e436d8f13605b6a7f45289717063c400cb57e5fbfdb72285b3785ae440f776a02b4ddcb7e2f317b5a957f56105be821ca6d3efa97fd
6
+ metadata.gz: bdfb857ea93ef4d44eacec4837d3758f645dde5f8d53ed9337c15dc496b8884f257e049aa3d68d9ff6cf6dd0a874a7b74373cf8092e166bcf114dccf536ecac2
7
+ data.tar.gz: e13c4be91ac5b68fbebd1d974f03718e941115c945bb1a78f2b6d55f0bb56c0e3da16ea7ef8bb046874f1f453e71c893a82961b611b72cebe06dd1cc6488c474
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.5
4
+
5
+ * Update Rubygems when building the builder images. [@lloydpick](https://github.com/lloydpick)
6
+ * Allow specifying a private SSH key (with `--private-key`) when packaging, in order to support
7
+ recipes that require cloning a private repository.
8
+
3
9
  ## 0.1.4
4
10
 
5
11
  * Unbreak building on platforms that aren't 'ubuntu'.
data/README.md CHANGED
@@ -47,6 +47,8 @@ ensure packages are placed in the correct location.
47
47
 
48
48
  The following limitations are imposed on recipes you use with `fpm-dockery`:
49
49
 
50
+ * Docker 1.5 or later is required, as we make use of the `-f` flag with
51
+ `docker build`.
50
52
  * If a recipe includes external files, these files must be in the same directory
51
53
  as the recipe file, or any number of subdirectories below where the recipe file is located.
52
54
  This is because the directory containing the recipe is mounted inside the Docker container
@@ -101,6 +103,16 @@ argument `PACKAGE_DIR`:
101
103
 
102
104
  fpm-dockery package example_recipe/recipe.rb ubuntu12.04 /tmp/somedir
103
105
 
106
+ If you're building a package from git source, and you're using a private repository
107
+ (on GitHub or BitBucket or wherever), you can supply an SSH private key to build with.
108
+ The private key __must have no passphrase__. For reasons of security, it would be wise
109
+ to create a keypair just for your package builds, and give it only read access to the repository.
110
+
111
+ fpm-dockery package --private-key some/path/builder-private-key example_recipe/recipe.rb ubuntu12.04
112
+
113
+ If you'd like to make fpm-cookery skip the packaging step, supply the `--skip-package` option:
114
+
115
+ fpm-dockery package --skip-package example_recipe/recipe.rb ubuntu12.04
104
116
 
105
117
  ### Viewing available builders
106
118
 
@@ -18,8 +18,15 @@ RUN apt-get update
18
18
  RUN apt-get -y install ruby2.1
19
19
  RUN apt-get -y install ruby2.1-dev
20
20
 
21
+ # Update rubygems and don't install docs
22
+ RUN gem update --system --verbose
23
+ RUN echo "gem: --no-document" >> ~/.gemrc
24
+
21
25
  # Install fpm-cookery
22
26
  RUN gem install fpm-cookery -v 0.27.0
23
27
 
28
+ # Remove strict host key checking for SSH
29
+ RUN echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
30
+
24
31
  # Set an entry point to simplify command execution
25
- ENTRYPOINT ["/usr/local/bin/fpm-cook"]
32
+ ENTRYPOINT ["/usr/local/bin/fpm-cook"]
@@ -18,8 +18,15 @@ RUN apt-get update
18
18
  RUN apt-get -y install ruby2.1
19
19
  RUN apt-get -y install ruby2.1-dev
20
20
 
21
+ # Update rubygems and don't install docs
22
+ RUN gem update --system --verbose
23
+ RUN echo "gem: --no-document" >> ~/.gemrc
24
+
21
25
  # Install fpm-cookery
22
26
  RUN gem install fpm-cookery -v 0.27.0
23
27
 
28
+ # Remove strict host key checking for SSH
29
+ RUN echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
30
+
24
31
  # Set an entry point to simplify command execution
25
- ENTRYPOINT ["/usr/local/bin/fpm-cook"]
32
+ ENTRYPOINT ["/usr/local/bin/fpm-cook"]
@@ -67,6 +67,7 @@ module FPM
67
67
  parameter "BUILDER", "Builder to use"
68
68
  parameter "[PACKAGE_DIR]", "Where to place the packages created by the build (defaults to /pkg in same dir as recipe)"
69
69
  option "--skip-package", :flag, "Skip package building (identical to fpm-cook --skip-package)"
70
+ option "--private-key", "PRIVATE_KEY", "Private key to use with SSH (for example, when cloning private Git repositories)"
70
71
 
71
72
  def execute
72
73
  recipe_path = File.expand_path(recipe)
@@ -86,6 +87,10 @@ module FPM
86
87
  pkg_dir = "/output"
87
88
  end
88
89
 
90
+ if private_key
91
+ extra_docker_commands << "-v #{File.expand_path(private_key)}:/root/.ssh/id_rsa"
92
+ end
93
+
89
94
  if skip_package?
90
95
  extra_fpm_cook_commands << "--skip-package"
91
96
  end
@@ -1,5 +1,5 @@
1
1
  module FPM
2
2
  module Dockery
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm-dockery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Sykes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp