From f09e84428d9f426768d074d0b8e68309172a5763 Mon Sep 17 00:00:00 2001 From: "Christopher A. Snapp" Date: Thu, 2 Jul 2020 14:23:25 -0600 Subject: Add Linux support to habitat test pipeline Signed-off-by: Christopher A. Snapp --- .expeditor/habitat-test.pipeline.yml | 34 ++++++++++++++++++++++++++++++---- scripts/ci/install-hab.sh | 3 +++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml index 8a71df9c17..be35d66017 100644 --- a/.expeditor/habitat-test.pipeline.yml +++ b/.expeditor/habitat-test.pipeline.yml @@ -9,12 +9,36 @@ expeditor: steps: +- label: ":linux: Validate Linux" + commands: + - sudo ./scripts/ci/install-hab.sh x86_64-linux + - 'echo "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX"' + - sudo hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX + - sudo ./habitat/tests/test.sh $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: ":linux: Validate Linux (kernel2)" + commands: + - sudo ./scripts/ci/install-hab.sh x86_64-linux-kernel2 + - 'echo "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2"' + - sudo hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2 + - sudo ./habitat/tests/test.sh $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2 + expeditor: + executor: + linux: + privileged: true + single-use: true + - label: ":windows: Validate Habitat Builds of Chef Infra" commands: - - powershell -File "./scripts/ci/ensure-minimum-viable-hab.ps1" + - powershell -File ./scripts/ci/ensure-minimum-viable-hab.ps1 - 'Write-Host "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS"' - - hab pkg install "$EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS" - - powershell -File "./habitat/tests/test.ps1" -PackageIdentifier "$EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS" + - hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS + - powershell -File ./habitat/tests/test.ps1" -PackageIdentifier $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS expeditor: executor: windows: @@ -26,7 +50,9 @@ steps: - label: ":habicat: Promoting packages to the current channel." commands: - - hab pkg promote "$EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS" current x86_64-windows + - hab pkg promote $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX current x86_64-linux + - hab pkg promote $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2 current x86_64-linux-kernel2 + - hab pkg promote $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS current x86_64-windows expeditor: executor: docker: diff --git a/scripts/ci/install-hab.sh b/scripts/ci/install-hab.sh index a59b9ce0f0..b65a89d706 100755 --- a/scripts/ci/install-hab.sh +++ b/scripts/ci/install-hab.sh @@ -2,6 +2,8 @@ set -euo pipefail +export HAB_LICENSE="accept" + hab_target="$1" # print error message followed by usage and exit @@ -18,3 +20,4 @@ error () { echo "--- :habicat: Installing latest version of Habitat" rm -rf /hab curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | bash -s -- -t "$hab_target" +hab license accept -- cgit v1.2.1