Skip to content

build: avoid conflicts when publishing snapshot builds #19737

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

Merged
Merged
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
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ var_21: &slack_notify_on_failure
# -----------------------------
version: 2.1

# Configures CircleCI orbs for this pipeline. Orbs allow consumption of publicly shared
# CircleCI commands, jobs, configuration elements or executors. Read more about orbs here:
# https://circleci.com/docs/2.0/orb-intro/
orbs:
# Set up the `queue` orb that allows us to queue up builds across jobs. We use it
# to make sure that snapshot builds are not deployed out of order, resulting in Git
# push conflicts.
queue: eddiewebb/[email protected]

# -----------------------------------------------------------------------------------------
# Job definitions. Jobs which are defined just here, will not run automatically. Each job
# must be part of a workflow definition in order to run for PRs and push builds.
Expand Down Expand Up @@ -427,6 +436,11 @@ jobs:
# as part of this job to the docs-content repository. It's not contained in the
# attached release output, so we need to build it here.
- run: bazel build src/components-examples:npm_package --config=release

# Ensures that we do not push the snapshot artifacts upstream until all previous
# snapshot build jobs have completed. This helps avoiding conflicts when multiple
# commits have been pushed (resulting in multiple concurrent snapshot publish jobs).
- queue/until_front_of_line
- run: ./scripts/circleci/publish-snapshots.sh
- *slack_notify_on_failure

Expand Down