diff --git a/.kitchen.yml b/.kitchen.yml index 3ac8e47..32432f9 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -14,7 +14,7 @@ platforms: - name: windows-2016 driver_config: box: mwrock/Windows2016 - + - name: ubuntu-18.04 suites: - name: default @@ -24,3 +24,14 @@ suites: inspec_tests: - test/smoke/default attributes: + excludes: + - ubuntu-18.04 + - name: linux + run_list: + - recipe[windows-habitat-no-docker::linux] + verifier: + inspec_tests: + - test/smoke/default + attributes: + excludes: + - windows-2016 diff --git a/habitat/plan.sh b/habitat/plan.sh new file mode 100644 index 0000000..cc6691c --- /dev/null +++ b/habitat/plan.sh @@ -0,0 +1,28 @@ +$pkg_name="windows-habitat-no-docker" +$pkg_origin="lauck" +$pkg_version="0.1.0" +$pkg_maintainer="The Habitat Maintainers " +$pkg_license=@("Apache-2.0") +$pkg_source="http://some_source_url/releases/${pkg_name}-${pkg_version}.zip" +# $pkg_filename="$pkg_name-$pkg_version.zip" +# $pkg_shasum="TODO" +# $pkg_deps=@() +# $pkg_build_deps=@() +# $pkg_lib_dirs=@("lib") +# $pkg_include_dirs=@("include") +# $pkg_bin_dirs=@("bin") +# $pkg_svc_run="MyBinary.exe" +# $pkg_exports=@{ +# host="srv.address" +# port="srv.port" +# ssl-port="srv.ssl.port" +# } +# $pkg_exposes=@("port", "ssl-port") +# $pkg_binds=@{ +# database="port host" +# } +# $pkg_binds_optional=@{ +# storage="port host" +# } +# $pkg_description="Some description." +# $pkg_upstream_url="http://example.com/project-name" diff --git a/recipes/linux.rb b/recipes/linux.rb new file mode 100644 index 0000000..af4c1e3 --- /dev/null +++ b/recipes/linux.rb @@ -0,0 +1,21 @@ +# +# Cookbook:: windows-habitat-no-docker +# Recipe:: linux +# +# Copyright:: 2018, The Authors, All Rights Reserved. + +remote_file '/tmp/habitat-install.sh' do + source 'https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh' + mode '0755' +end + +file '/tmp/habitat-install.sh' do + mode '0755' +end + +execute '/tmp/habitat-install.sh' + +execute 'habitat build' do + cwd '/tmp/package' + command 'hab pkg build ./' +end