Skip to content

Commit

Permalink
build: update deploy pipeline scripts to use correct paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tkajtoch committed May 6, 2024
1 parent b90ae15 commit d408a55
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .buildkite/scripts/pipelines/pipeline_deploy_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ if [[ -z "${GITHUB_TOKEN}" ]]; then
exit 1
fi

cd packages/eui

# Run EUI build/deploy script, set in the template parameter
# Expects env: GPROJECT, GCE_ACCOUNT, GIT_BRANCH, GITHUB_TOKEN from pre_command.sh
./scripts/deploy/deploy_docs

./packages/eui/scripts/deploy/deploy_docs
2 changes: 1 addition & 1 deletion packages/eui/scripts/deploy/build_docs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ docker run \
--volume "$PWD":/app \
--workdir /app \
"$DOCKER_BASE_IMAGE" \
bash -c 'yarn && yarn build && yarn build-docs && yarn build-storybook'
bash -c 'yarn && yarn --cwd packages/eui build && yarn --cwd packages/eui build-docs && yarn --cwd packages/eui build-storybook'
16 changes: 8 additions & 8 deletions packages/eui/scripts/deploy/deploy_docs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set +x
# itself from within another docker container to deploy to GCP.

# Usage:
# * Compile and deploy: ./scripts/deploy/deploy_docs
# * Deploy only without docker: ./scripts/deploy/deploy_docs nodocker
# * Compile and deploy: ./packages/eui/scripts/deploy/deploy_docs
# * Deploy only without docker: ./packages/eui/scripts/deploy/deploy_docs nodocker

# Expected env variables:
# * GPROJECT - GCE project name, e.g. elastic-bekitzur
Expand Down Expand Up @@ -81,15 +81,15 @@ publish_to_bucket()
-z js,css,html # enable gzip encoding for these extensions
)

echo "Copying ${PWD}/docs/* to ${full_bucket_path}"
gsutil "${copy_options[@]}" "${PWD}/docs/*" "${full_bucket_path}"
echo "Copying ${PWD}/packages/eui/docs/* to ${full_bucket_path}"
gsutil "${copy_options[@]}" "${PWD}/packages/eui/docs/*" "${full_bucket_path}"

echo "Copying ${PWD}/storybook-static/* to ${full_bucket_path}storybook/"
gsutil "${copy_options[@]}" "${PWD}/storybook-static/*" "${full_bucket_path}storybook/"
echo "Copying ${PWD}/packages/eui/storybook-static/* to ${full_bucket_path}storybook/"
gsutil "${copy_options[@]}" "${PWD}/packages/eui/storybook-static/*" "${full_bucket_path}storybook/"
}

if [[ "$1" != "nodocker" ]]; then
./scripts/deploy/build_docs
./packages/eui/scripts/deploy/build_docs

# Get the latest tag on main, which will determine whether we deploy to the root `eui.elastic.co` bucket
# NOTE: specifying the main branch means we don't override prod with backport or prerelease tags.
Expand All @@ -112,7 +112,7 @@ if [[ "$1" != "nodocker" ]]; then
--volume "${PWD}":/app:ro \
--workdir /app \
"${GCE_IMAGE}" \
/app/scripts/deploy/deploy_docs nodocker "$@"
/app/packages/eui/scripts/deploy/deploy_docs nodocker "$@"
unset GCE_ACCOUNT

# If the branch is not a pull request, Buildkite passes "false"
Expand Down

0 comments on commit d408a55

Please sign in to comment.