Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Deepakanandrao/jfrog-cli

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JFrog CLI Connect v3

JFrog CLI Connect is simple Docker container-based GitHub action that allows users to connect to Artifactory and executes commands. It downloads, installs, and configures JFrog CLI with the given details.

Usage

Inputs

Required
Variable Value
ACCESS_TYPE 'username-password', 'access-token', 'api-key'
SERVER_URL The URL for your Artifactory instance e.g. https://server.com/artifactory
USERNAME Conditionally required if access type is username-password
PASSWORD Conditionally required if access type is username-password
ACCESS_TOKEN Conditionally required if access type is access-token
API_KEY Conditionally required if access type is api-key
  name: Connect to Artifactory
    uses: Deepakanandrao/jfrog-cli@v3
    with:
      cli_cmd: |                                      # commands to be excuted
      'jfrog rt ping'
    env:  
      SERVER_URL: ${{ secrets.SERVER_URL }}           # Required (e.g. https://jfrogy.com/artifactory)
      SERVER_ID: ${{ secrets.SERVER_ID }}             # Optional - Name to be recognized server with
      DISTRIBUTION_URL: ${{ secrets.SERVER_URL }}     # Optional
      ACCESS_TYPE: ${{ secrets.ACTION_TYPE }}         # Required  (username-password, access-token, api-key)
      USERNAME: ${{ secrets.USERNAME }}               # Required any of one of the following
      PASSWORD: ${{ secrets.PASSWORD }}
      API_KEY: ${{ secrets.API_KEY }}
      ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} 
General format
$ jfrog rt command-name global-options command-options arguments

Uploading Files

Upload all files to the target repository
$ jfrog rt u "(*).tgz" my-local-repo/{1}/ --recursive=false

Downloading Files

Download an artifact called cool-froggy.zip
$ jfrog rt dl my-local-repo/cool-froggy.zip

Copying Files

Copy all artifacts located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository
jfrog rt cp source-frog-repo/rabbit/ target-frog-repo/rabbit/

Moving Files

Move all artifacts located under /rabbit in the source-frog-repo repository into the same path in the target-frog-repo repository
jfrog rt mv source-frog-repo/rabbit/ target-frog-repo/rabbit/

Deleting Files

jfrog rt del frog-repo/rabbit/

Note

This is a Docker container action Please note that if you are using this action to move artifacts generated by another step then your workspace home path is mapped to /github/workspace

This action is a slight modification of Kat Cosgrove's jfrogcli-action. I encourage you to check it out here.

License

MIT