Skip to content

Commit

Permalink
Set variable in pre-exit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm committed Apr 30, 2024
1 parent 0004fb9 commit 997839b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
11 changes: 3 additions & 8 deletions .buildkite/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ set -euo pipefail
# TODO: change pipeline slug
if [[ "${BUILDKITE_PIPELINE_SLUG}" == "elastic-package" && "${BUILDKITE_STEP_KEY}" == "test-serverless" ]]; then
echo "--- Take down the Elastic stack"
echo "Current directory: $(pwd)"
echo "Workspace: ${WORKSPACE}"
# already installed in pipeline step
# BUILDKITE resets PATH contents in pre-exit hook
ELASTIC_PACKAGE_BIN="${HOME}/go/bin/elastic-package"
echo "Test with variable"
${ELASTIC_PACKAGE_BIN} version
echo "Contents go (direct path)"
ls -l /opt/buildkite-agent/go/bin
echo "PATH:"
echo $PATH | tr ':' '\n' | grep "go/bin"
echo "Contents go bin:"
ls -l $(go env GOPATH)/bin

EC_API_KEY=${EC_API_KEY_SECRET} EC_HOST=${EC_HOST_SECRET} elastic-package stack down -v
fi
Expand Down
5 changes: 0 additions & 5 deletions .buildkite/scripts/test_packages_with_serverless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ echo "--- Install elastic-package"
# Required to start the Serverless Elastic stack
make install

echo "PATH:"
echo $PATH | tr ':' '\n' | grep "go/bin"
echo "Contents go bin:"
ls -l $(go env GOPATH)/bin
export ELASTIC_PACKAGE_BIN="$(go env GOPATH)/bin/elastic-package"
# prepare_serverless_stack
#
# echo "Waiting time to avoid getaddrinfo ENOTFOUND errors..."
Expand Down

0 comments on commit 997839b

Please sign in to comment.