feat(JFrogCliV2): allow persisting and reusing JFrog CLI config across steps#637
Open
SierraNL wants to merge 1 commit into
Open
feat(JFrogCliV2): allow persisting and reusing JFrog CLI config across steps#637SierraNL wants to merge 1 commit into
SierraNL wants to merge 1 commit into
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
…s steps
Adds opt-in inputs so downstream pipeline steps (e.g. dotnet restore) can
reuse the CLI config this task creates instead of each step configuring
its own connection:
- registerInPath: adds jf's directory to PATH for later steps
- keepConfig: skips cleanup so the config survives after this task
- configurationName: reuse an existing named config instead of creating one
- enablePackageAlias / packageAliasTools: installs JFrog CLI's
package-alias ("Ghost Frog") shims (CLI >= 2.93.0) so native build tool
calls route through jf for the rest of the job
jfrogPlatformConnection is now optional (required only when
configurationName isn't set), and the resolved config name is exposed via
the JFROG_CLI_CONFIG_NAME variable for teardown tasks to reference.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SierraNL
force-pushed
the
feat/jfrog-cli-v2-persist-config
branch
from
July 10, 2026 09:03
4725e4a to
97ebbd9
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Reasons
I created this PR as an implementation of my feature request #636
It is a combination of a few features, if you prefer seperate PR's I can split it up.
But together they give the option of doing a big migration to JFrog a lot easier, by just adding the task in the front of the pipeline, and in the end to gather and push the buildinfo and keep the rest of the pipeline in place.
Summary
JFrogCliV2so downstream pipeline steps (e.g.dotnet restore) can reuse the CLI config this task creates, instead of every step needing its own JFrog Platform service connection.registerInPath(defaultfalse) — addsjf's directory to the agent's PATH for later steps.keepConfig(defaultfalse) — skips the cleanup step so the config survives after this task finishes.configurationName(optional) — reuse an existing named config instead of creating a new one;jfrogPlatformConnectionbecomes optional when this is set (the task fails clearly if neither is provided).enablePackageAlias/packageAliasTools(defaultfalse) — installs JFrog CLI'spackage-alias("Ghost Frog") shims (requires CLI ≥ 2.93.0; warns and skips on older versions) so native build tool calls route throughjffor the rest of the job.JFROG_CLI_CONFIG_NAMEpipeline variable, intended for a paired "teardown" task at the end of the pipeline (configurationName=$(JFROG_CLI_CONFIG_NAME),keepConfig=false) to delete the persisted config.minSupportedPackageAliasCliVersion(2.93.0) constant tojfrog-tasks-utils/utils.js, following the existingminSupported*CliVersionpattern.All new behavior is off by default, so existing pipelines using
JFrogCliV2are unaffected.Test plan
node --checkontasks/JFrogCliV2/jfrogCliRun.jsandjfrog-tasks-utils/utils.jstasks/JFrogCliV2/task.jsonparses as valid JSON.prettierrc)configurationNameempty,keepConfig=true,registerInPath=true; teardown withconfigurationName=$(JFROG_CLI_CONFIG_NAME),keepConfig=falseenablePackageAlias=trueon a CLI version below2.93.0logs a warning and the task still succeeds