Commit graph

15 commits

Author SHA1 Message Date
Jared Quick
b8b9a379a3
Update hab plan for hab 0.56+ (#3241)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-20 12:59:15 -04:00
Jared Quick
c01ec12947
Update hab to use psql client. (#3234)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-18 16:55:19 -04:00
pete higgins
045671703e Add git dependency to habitat plan. (#3037)
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
2018-05-10 14:49:44 -04:00
Jerry Aldrich
700d042422 Update Habitat plan (#3000)
This updates the included Habitat plan to do the following:
  - Include binaries needed for certain resources (Example: `curl`)
  - Use `gem install/build` instead of Bundler
  - Use a wrapper binary to ensure GEM_HOME and GEM_PATH are correct
  - Perform build/install steps in a cache directory instead of `/src`

Many thanks to @miah @tduffield

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-04-27 10:57:13 -04:00
Adam Leff
01b65db6c7 Habitat build works for all versions, eliminates rake (#2301)
The Habitat plan has been modified to support building from the repo
rather than relying on a gem being pushed to RubyGems. This allows
us to build current packages at every merge rather than only pushing to
Habitat Builder when we promote to stable.

This change also enables Expeditor to perform builds for us and removes
the dependency on the rake task as it is no longer needed.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-14 05:01:51 +01:00
Nathan L Smith
8ede5556ba Use RubyGems version for habitat plan
In #1820 we made it so inspec would install the checked out source
version rather than the version from RubyGems.

This actually didn't work (though it wasn't apparent in a development
environment) because it used a relative path to bin/inspec that pointed
at /src/bin/inspec, which only exists if you're in a Habitat studio
started from the InSpec repo.

Revert back to getting the gem from RubyGems to avoid this problem and
have a working package.

Signed-off-by: Nathan L Smith <smith@chef.io>
2017-06-01 16:26:26 -05:00
Nathan L Smith
6324a6d289 Improvements to Habitat plan
These are kind of all over the place, but should improve things:

* Use the new `pkg_version` mechanism to set the version, and fail if
  the VERSION file is not present
* Use inspec.io for the upstream url
* Remove pkg_source and it's associated callbacks; they aren't required
  any more
* Alphabetize the deps list
* Remove duplicate coreutils from build deps
* Move environment variable setting to `do_prepare`
* Delete all binstubs in bin that aren't inspec
* Put the generated Gemfile in $CACHE_PATH so it doesn't stomp on the
  developer's Gemfile
* Insert the SSL_CERT_FILE env var in the binstub (Fixes #1582)
* Use install instead of cp to drop off Gemfile.lock
* Build using `path: '$SRC_PATH'` instead of `'= $pkg_version'` in the Gemfile
* Disable `do_strip` to decrease build time and because we don't need it

Works for me on Habitat 0.23.

Since all the "building" is done now in `do_install`, it would be
possible to define a `do_check` that runs `inspec exec` on profiles to
verify inspec is working by running inspec.

Signed-off-by: Nathan L Smith <smith@chef.io>
2017-05-29 15:41:26 -04:00
Elliott Davis
c99853a7cc Add busybox-static to habitat plan so netstat works for port resource on linux
Signed-off-by: Elliott Davis <edavis@chef.io>
2017-05-11 11:16:41 -05:00
Ryan Hass
3a3ce30a85 Add core/lsof package to facilitate port detection. (#1789)
* Add core/lsof package to facilitate port detection.

Signed-off-by: Ryan Hass <rhass@users.noreply.github.com>
2017-05-10 12:45:46 -04:00
Elliott Davis
31645968e2 Update hab exporter to use inspec in path over calling to hab sup
Signed-off-by: Elliott Davis <edavis@chef.io>
2017-05-09 20:09:33 -05:00
Ryan Hass
56364caeaa Add core/hab to pkg_deps in hab plan.
Runtime of `hab pkg exec chef/inspec` changes the path for the inspec
runtime to match that of the inspec hab package. This makes it so tests
which need to execute things like `hab pkg path myorigin/mypath` in the
can profile/test can successfully execute the command.

Signed-off-by: Ryan Hass <rhass@users.noreply.github.com>
2017-04-27 17:17:54 -07:00
Adam Leff
73d46f9c49
Replace Nokogiri with REXML in the JUnit formatter
In #1454, we welcomed a newly-revamped JUnit formatter which has
a dependency on Nokogiri. Unfortunately, this had led us to problems
getting InSpec included in Chef omnibus builds (see chef/chef#5937)
because Chef is using Ruby 2.4.1 and the Nokogiri maintainers have
not yet released a windows binary gem that supports Ruby 2.4.x.
This has led to breaking builds in Chef's CI platform and would
block the acceptance of chef/chef#5937.

This change replaces Nokogiri use with REXML instead. While REXML
can be slower than Nokogiri, it does not require native extensions
and is supported on all Chef platforms.

Signed-off-by: Adam Leff <adam@leff.co>
2017-04-03 14:51:48 -04:00
Adam Leff
4dae0bead8 Fix Habitat plan for nokogiri support
Nokogiri is failing to build in the habitat artifact due to the lack
of libxml2 and libxslt. This brings them in as dependencies and also
properly configures bundler to use them.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-21 17:51:59 -04:00
Adam Leff
3e0369046e Add Rake to Habitat build Gemfile
The `rainbow` gem requires `rake` to build native extensions, and rake
is a development dependency for InSpec, not a runtime dependency.

This change adds the `rake` gem to the Habitat build Gemfile so we
can successfully build a Habitat artifact.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-01 18:10:53 +01:00
Dave Parfitt
5231a0dc43 move Inspec Habitat package to chef/inspec.
NOTE: The existing `core/inspec` package (version 0.27.0) cannot be removed
from the public Habitat depot.
2016-10-12 15:03:24 -04:00