feat!: install the standalone CLI and authenticate via native OIDC#19
Open
BartoszBlizniak wants to merge 1 commit into
Open
feat!: install the standalone CLI and authenticate via native OIDC#19BartoszBlizniak wants to merge 1 commit into
BartoszBlizniak wants to merge 1 commit into
Conversation
Rewrites the orb around the standalone Cloudsmith CLI binary: - install-cli downloads the standalone binary via a vendored installer script (SHA-256 verified); no Python, pip, or jq required on the image. - configure-oidc replaces authenticate-with-oidc: the CLI performs the OIDC token exchange itself on its first authenticated command, and CLOUDSMITH_API_KEY is no longer exported. - The publish command is removed in favour of running cloudsmith push directly after install and authentication. - The default executor moves from cimg/python to cimg/base. - README documents the new commands and includes a full v2-to-v3 migration table, including a mapping for every removed publish parameter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
d100506 to
8d9a521
Compare
There was a problem hiding this comment.
Pull request overview
Updates the CircleCI orb to v3 by switching from the Python-based Cloudsmith CLI install/auth flow to a standalone CLI binary with SHA-256 verification and CLI-native OIDC authentication, reducing executor dependencies and removing token export behavior.
Changes:
- Replace
install-cliwith a bundled installer that downloads/verifies a standalone Cloudsmith CLI binary and adds it toPATHvia$BASH_ENV. - Replace
authenticate-with-oidcwithconfigure-oidc, exporting only CLI context variables and relying on the CLI to perform OIDC token exchange on first authenticated use. - Refresh docs/examples and CircleCI config to reflect v3 usage and add installer drift checking + integration test workflow.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/scripts/post-install.sh |
Reads installer results, adds CLI to PATH, and writes optional ~/.cloudsmith/config.ini. |
src/scripts/install.sh.version |
Records the vendored installer “version” and checksum for drift checking. |
src/scripts/install.sh |
New standalone CLI installer: target detection, manifest fetch, SHA-256 verification, safe extraction, versioned install layout. |
src/scripts/configure-oidc.sh |
Exports CLI OIDC context variables for later steps; validates CircleCI token presence. |
src/executors/default.yml |
Switch default executor image from cimg/python to cimg/base. |
src/examples/install-with-oidc.yml |
New v3 example using install-cli + configure-oidc. |
src/examples/install-with-api-key.yml |
New v3 example using ensure-api-key + install-cli. |
src/examples/command-publish.yml |
Removes v2 example that used the orb publish wrapper command. |
src/examples/cli-with-oidc.yml |
Removes v2 OIDC example based on authenticate-with-oidc. |
src/examples/authenticate-with-oidc.yml |
Removes v2 example for token-exchange command. |
src/commands/publish.yml |
Removes deprecated v2 publish wrapper command. |
src/commands/install-cli.yml |
Reworks install to call bundled installer + post-install step; updates parameters and defaults. |
src/commands/configure-oidc.yml |
Adds new configure-oidc command with optional verify-auth step. |
src/commands/authenticate-with-oidc.yml |
Removes v2 OIDC token-exchange command that exported CLOUDSMITH_API_KEY. |
src/@orb.yml |
Updates orb description to reflect standalone CLI + direct CLI usage. |
README.md |
Major documentation refresh: v3 quickstart, configuration, and v2→v3 migration guide. |
.circleci/test-deploy.yml |
Adds/updates integration tests (install matrix, pinned version check, API key + OIDC flows) and publishing workflow. |
.circleci/config.yml |
Converts to setup workflow, adds ShellCheck + installer drift check, and continues into test/deploy pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces version 3 of the Cloudsmith CircleCI orb. It replaces the Python-based installation with the standalone Cloudsmith CLI and moves OIDC authentication into the CLI, reducing executor dependencies and keeping credential exchange within the supported client.
cloudsmith pushdirectly instead of an orb wrapper commandcimg/pythonto the smallercimg/baseimageNote
OIDC remains the recommended authentication method. Jobs using OIDC must use at least one CircleCI context so CircleCI issues an identity token.
Type of Change
Breaking Changes
Important
Version 3 removes commands and parameters that depended on Python or exposed a Cloudsmith API token. Existing version 2 configurations must be updated before changing the orb version.
pip-installinstall-clinow installs the standalone binary.authenticate-with-oidcconfigure-oidc. The CLI performs the token exchange on first use.CLOUDSMITH_API_KEYoidc-audienceandoidc-auth-retrypublishcommandcloudsmith pushdirectly after installation and authentication.install-pathpoints to a single binary locationcimg/pythoncimg/base; add Python only if other job steps require it.Additional Notes
The orb has been packed and validated with the CircleCI CLI. Shell syntax and ShellCheck validation pass for all bundled scripts, and the generated orb matches the source configuration.
Tip
See the v2-to-v3 migration guide for command examples and parameter-level migration details.