CLI for JFrog Pipelines

Overview

This page describes how to use JFrog CLI with JFrog Pipelines.

Read more about JFrog CLI here.

Syntax

$ jf pl command-name arguments command-options

Where:

command-name

The command to execute. Note that you can use either the full command name or its abbreviation.

command-options

A set of options corresponding to the command

arguments

A set of arguments corresponding to the command


Commands

The following sections describe the commands available in the JFrog CLI for use with JFrog Pipelines.

Checking Pipelines Version

Commands Params

Command name

pl version

Abbreviation

v

Command arguments

The command accepts no arguments.

Command options

--server-id

[Optional] Specify Pipelines server for which the version is to be fetched. If not specified, the default configured server is used.

Example

Check the version of Pipelines installation.

jf pl version --server-id repo21

Getting Run Status

Get the status of the run for the specified pipeline

Commands Params

Command name

pl status

Abbreviation

s

Command arguments

The command accepts no arguments.

Command options

--pipeline-name

[Optional] Name of the pipeline.

--branch

[Optional] Name of the multi branch.

--monitor

[Optional] Continuous monitoring until pipeline reaches end state. Default time is 1 hour and 30 minutes.

--server-id

[Optional] Name of the server.

--single-branch

[Optional] To be used when using a single branch.

Example 1

Get the status of the run for the specified pipeline in case of Single Branch.

jf pl status --pipeline-name myPipeline --single-branch --server-id repo21 --monitor --single-branch

Example 2

Get the status of the run for the specified pipeline in case of Multi Branch.

jf pl status --pipeline-name myPipeline --branch main/jobs --server-id repo21 --monitor

Triggering a Pipeline

Trigger a pipeline run.

Commands Params

Command name

pl trigger

Abbreviation

t

Command options

--server-id

[Optional] Name of the server.

--single-branch

[Optional] To be used when using a single branch. When used, branch_name argument is ignored.

Command arguments

pipeline_name

Name of the pipeline to be triggered.

branch_name

Name of the multi branch.

Example 1

Trigger a pipeline run in case of Single Branch.

jf pl trigger myPipeline main/jobs --single-branch --server-id repo21

Example 2

Trigger a pipeline run in case of Multi Branch.

jf pl trigger myPipeline main/jobs --server-id repo21

Syncing Pipeline Source

Commands Params

Command name

pl sync

Abbreviation

sy

Command options

--server-id

[Optional] Name of the server.

--repository

[Optional] Full name of the repository where the pipeline source is stored.

--branch

[Optional] Name of branch that has the pipeline source.

Example

Perform a sync to load the latest pipeline source.

jf pl sync --repository jfrog/artifactory --branch main/jobs --server-id repo21

Sync Status of Pipeline Source

Commands Params

Command name

pl sync-status

Abbreviation

ss

Command options

--server-id

[Optional] Name of the server.

Command arguments

full_repo_name

Full name of the repository where the pipeline source is stored.

branch_name

Name of the branch.

Example

Get the current status of the pipeline source sync.

jf pl sync-status jfrog/artifactory main/jobs --server-id repo21

Last updated

© 2024 JFrog Ltd All Rights Reserved