-
Notifications
You must be signed in to change notification settings - Fork 839
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
[BUG] Buildkite did not pick up new env variable. #7403
Changes from all commits
88d37c8
467f14e
042767c
a9f6dff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,15 @@ set +x | |
# Expected env variables: | ||
# * GPROJECT - GCE project name, e.g. elastic-bekitzur | ||
# * GCE_ACCOUNT - credentials for the google service account (JSON blob) | ||
# * GCE_IMAGE - Google's Docker image to publish docs | ||
# * GIT_BRANCH - current Git branch or tag (e.g. "refs/heads/main", "v18.2.1") | ||
# * GIT_PULL_REQUEST_ID - current Git PR (Ex. 6999) or "false" from Buildkite env | ||
# * GIT_TAG - current Git tag (Ex. v87.0.0) from Buildkite env | ||
# * DEPLOY_ROOT - passed in from Buildkite UI or undefined. Manually publishes release docs when set to true. | ||
|
||
# Docker images | ||
GCE_IMAGE=google/cloud-sdk:slim | ||
# Test that DEPLOY_ROOT is being passed properly | ||
# TODO: Revert | ||
echo "Testing deploy_root is ${DEPLOY_ROOT}" | ||
|
||
if [[ -z "${GPROJECT}" ]]; then | ||
echo "GPROJECT is not set, e.g. 'GPROJECT=elastic-bekitzur'" | ||
|
@@ -103,6 +106,7 @@ if [[ "$1" != "nodocker" ]]; then | |
--env GIT_PULL_REQUEST_ID \ | ||
--env GIT_TAG \ | ||
--env CURRENT_RELEASE="${CURRENT_RELEASE}" \ | ||
--env DEPLOY_ROOT="${DEPLOY_ROOT}" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forgot to pass the env variable into Docker. I was able to echo it in previous tests but missed the key detail. This should run correctly now. |
||
--env HOME=/tmp \ | ||
--user="$(id -u):$(id -g)" \ | ||
--volume "${PWD}":/app:ro \ | ||
|
@@ -137,7 +141,7 @@ else | |
|
||
# Our branched docs deploys are **only** ever triggered by tags | ||
# https://buildkite.com/docs/pipelines/environment-variables#BUILDKITE_TAG | ||
elif [[ ! -z "${GIT_TAG}" ]]; then | ||
elif [[ -n "${GIT_TAG}" ]]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this to |
||
echo "Deploying eui.elastic.co/${GIT_TAG}" | ||
full_bucket_path="gs://${BUCKET}/${GIT_TAG}/" | ||
max_age="1800" # Reducing to 15 minutes to limit stale docs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this get tested/reverted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did initially, but I'd like to keep it in the script until I get at least one successful manual run.
Having a quick way to verify the env variable before the build step in the Docker environment cuts my troubleshooting surface in half if it fails again.