-
Notifications
You must be signed in to change notification settings - Fork 67
[ML] Migrate DRA GCS publishing from Release Manager to dra-prep plugin #3161
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
Changes from all commits
9c615bd
ceaa860
a441df6
38c63cd
4f66619
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 |
|---|---|---|
|
|
@@ -8,20 +8,51 @@ | |
| # compliance with the Elastic License 2.0 and the foregoing additional | ||
| # limitation. | ||
| # | ||
| # Upload all artifacts, both platform-specific and all-platforms, to | ||
| # GCS, where release manager builds will download them from. | ||
| # Stage DRA artifacts and trigger unified-release DRA processing via the | ||
| # elastic/dra-prep-buildkite-plugin (replaces the Release Manager Docker step). | ||
| # | ||
|
|
||
| . .buildkite/scripts/common/base.sh | ||
|
|
||
| STACK_VERSION=$(awk -F= '/^elasticsearchVersion/ {print $2}' gradle.properties | xargs echo) | ||
|
|
||
| if [ -n "${VERSION_QUALIFIER:-}" ] ; then | ||
| STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER}" | ||
| fi | ||
|
|
||
| if [ -z "$BUILD_SNAPSHOT" ] ; then | ||
| BUILD_SNAPSHOT=true | ||
| fi | ||
| if [ "$BUILD_SNAPSHOT" = "true" ] ; then | ||
| DRA_WORKFLOW=snapshot | ||
| STACK_VERSION="${STACK_VERSION}-SNAPSHOT" | ||
| else | ||
| DRA_WORKFLOW=staging | ||
| fi | ||
|
|
||
| cat <<EOL | ||
| steps: | ||
| - label: ":rocket: Upload DRA artifacts to GCS :gcloud:" | ||
| key: "upload_dra_artifacts_to_gcs" | ||
| - label: ":package: DRA Prep" | ||
| key: "dra-prep" | ||
| depends_on: create_dra_artifacts | ||
| command: | ||
| - 'buildkite-agent artifact download "build/distributions/*" --step create_dra_artifacts .' | ||
| - '.buildkite/scripts/steps/upload_dra_to_gcs.sh' | ||
| command: ".buildkite/scripts/stage_artifacts.sh" | ||
| env: | ||
| DRA_WORKFLOW: "${DRA_WORKFLOW}" | ||
| agents: | ||
| provider: gcp | ||
| plugins: | ||
| - elastic/dra-prep#v0.1.5: | ||
|
Contributor
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. Two related merge-gate questions:
Also: this step uses a vanilla GCP agent (no JDK image). Please confirm
Contributor
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. WIF is already configured and it should work : https://github.com/elastic/infra/blob/ca83670976b72a26ddfe887834a5f2aae8d9c56d/terraform/providers/gcp/env/release-artifacts/elastic-release.tfvars Plugin Pin:
|
||
| product_id: "ml-cpp" | ||
| stack_version: "${STACK_VERSION}" | ||
| workflow: "${DRA_WORKFLOW}" | ||
|
|
||
| - label: ":pipeline: Trigger DRA processing" | ||
| trigger: "unified-release-dra-processing" | ||
| async: true | ||
|
Contributor
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. The old GCS step ran in-pipeline, so a collect/upload failure failed the snapshot/staging build. This trigger is If that's intentional (unified-release owns retries/visibility) it's worth stating in the PR. If we still want the parent build to fail when processing fails,
Contributor
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. Hey @edsavage This is intentional. In the |
||
| depends_on: "dra-prep" | ||
| build: | ||
| env: | ||
| DRA_PRODUCT_ID: "ml-cpp" | ||
| DRA_STACK_VERSION: "${STACK_VERSION}" | ||
| DRA_WORKFLOW: "${DRA_WORKFLOW}" | ||
| EOL | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| # or more contributor license agreements. Licensed under the Elastic License | ||
| # 2.0 and the following additional limitation. Functionality enabled by the | ||
| # files subject to the Elastic License 2.0 may only be used in production when | ||
| # invoked by an Elasticsearch process with a license key installed that permits | ||
| # use of machine learning features. You may not use this file except in | ||
| # compliance with the Elastic License 2.0 and the foregoing additional | ||
| # limitation. | ||
| # | ||
| # Stage DRA artifacts into artifacts/ for the elastic/dra-prep plugin. | ||
| # | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| WORKFLOW="${DRA_WORKFLOW:?DRA_WORKFLOW is required}" | ||
|
|
||
| echo "--- :compression: Downloading ${WORKFLOW} artifacts from create_dra_artifacts step" | ||
| rm -rf build/distributions artifacts | ||
| mkdir -p build/distributions artifacts | ||
|
|
||
| buildkite-agent artifact download 'build/distributions/*.zip' . --step create_dra_artifacts | ||
|
Contributor
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.
This stager only downloads POSIX Could you confirm against a real snapshot build artifact listing that the combined zips +
Contributor
Author
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 checked the code in |
||
| buildkite-agent artifact download 'build/distributions/*.csv' . --step create_dra_artifacts | ||
|
|
||
| echo "--- :package: Staging ${WORKFLOW} artifacts" | ||
| cp build/distributions/*.zip artifacts/ | ||
| cp build/distributions/*.csv artifacts/ | ||
|
|
||
| if ! ls artifacts/* 1>/dev/null 2>&1; then | ||
| echo "ERROR: no ${WORKFLOW} artifacts found in artifacts/." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Staged artifacts:" | ||
| ls -1 artifacts/ | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.