Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing the pipelines for cookstyle hab package #982

Merged
merged 8 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .expeditor/buildkite/artifact.habitat.test.sh
100644 → 100755
Empty file.
3 changes: 0 additions & 3 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ changelog:
rollup_header: Changes not yet released to rubygems.org

pipelines:
- verify:
description: Pull Request validation tests
public: true
- habitat/build:
env:
- HAB_NONINTERACTIVE: "true"
Expand Down
5 changes: 4 additions & 1 deletion habitat/tests/test.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -euo pipefail


project_root="$(git rev-parse --show-toplevel)"
pkg_ident="$1"

# print error message followed by usage and exit
error () {
Expand All @@ -16,9 +17,11 @@ error () {
[[ -n "$pkg_ident" ]] || error 'no hab package identity provided'

package_version=$(awk -F / '{print $3}' <<<"$pkg_ident")
echo $package_version

cd "${project_root}"

echo "--- :msg_right: Testing ${pkg_ident} executables"
echo "--- :mag_right: Testing ${pkg_ident} executables"
actual_version=$(hab pkg exec "${pkg_ident}" cookstyle -v | sed -n 's/^Cookstyle \([0-9.]*\).*$/\1/p')
echo $actual_version
[[ "$package_version" = "$actual_version" ]] || error "cookstyle version is not the expected version. Expected '$package_version', got '$actual_version'"
Loading