jfrog/setup-jfrog-cli

What type of repository should I setup in Artifactory to use this action?

callum-tait-pbx opened this issue · 5 comments

What type of repository should I setup in Artifactory to use this action?

@callum-tait-pbx,
Can you please elaborate more about your use case?

Just starting to look at using this with our Artifactory. We want to use Artifactory to be able to upload a build in 1 job and in a downstream job download the build again. We don't want to upload to Github's servers al la:

https://github.com/actions/upload-artifact
https://github.com/actions/download-artifact

I've setup a generic repository as I think that is right. I am a little confused how to use this though, we use your saas product, I was expecting to have to provide an API key and an endpoint to authenticate as part of using the action? I already have an API key generated but the docs are written as if you make one via action and then put that in your secrets?

@callum-tait-pbx,
Using the JFrog CLI, you can upload and download artifacts from all repository types, including generic ones.
This Action downloads, installs, and configures the JFrog CLI in your workflow.

To use this action, please follow the following steps:

  1. Download JFrog CLI to your local machine https://jfrog.com/getcli/.
  2. Configure your Artifactory server in your local machine by running jfrog config add.
  3. Create a server token: jfrog config export. This token contains all of the required server details - Artifactory URL, API key, etc.
  4. In your GitHub repository under Settings/Secrets, create a secret JF_ARTIFACTORY_SECRET_1 and fill it with your server token (requires admin privileges in your GitHub repository).
  5. Use this action:
- uses: jfrog/setup-jfrog-cli@v1
  env:
    JF_ARTIFACTORY_1: ${{ secrets.JF_ARTIFACTORY_SECRET_1 }}
- run: |
    # Upload
    jfrog rt upload <path to a file> <full path in Artifactory>

    # Download
    jfrog rt download <full path in Artifactory> <path to download>

Read more:

Please let us know if you need any further assistance.

Ah, that makes much more sense! Cheers, I'll give that a go! To be honest the docs make it clear I just got confused somehow

@callum-tait-pbx -
I'm closing this issue for now, but please let us know if you have additional questions.