setup-jfrog-cli icon indicating copy to clipboard operation
setup-jfrog-cli copied to clipboard

Support authentication with direct connection config environment variables

Open sverdlov93 opened this issue 3 years ago • 0 comments

  • [ ] All tests passed. If this feature is not already covered by the tests, I added new tests.
  • [ ] I used npm run format for formatting the code before submitting the pull request.

Setting direct connection details environment variables

You can use connection details directly by settings one of the following environment variables combinations:

  1. JF_URL (anonymous)
  2. JF_URL + JF_USER + JF_PASSWORD (basic auth)
  3. JF_URL + JF_ACCESS_TOKEN (access token)

You can use them in the workflow as follows:

- uses: jfrog/setup-jfrog-cli@v2
  env:
    JF_URL: ${{ secrets.JF_URL }}
    JF_USER: ${{ secrets.JF_USER }}
    JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
    # Access token if JF_USER and JF_PASSWORD are not provided
    # JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
- run: |
    jf rt ping
    
    # If both local config(JF_ENV_*) and direct connection details(JF_URL) are provided, the default config will be the local config.
    # To make the direct connection details config as the default config use the following command:
    jf c use setup-jfrog-cil-server
    

sverdlov93 avatar Aug 09 '22 13:08 sverdlov93