Search code examples
azure-devopsartifactoryon-premise

Installing JFrog on Azure DevOps with multiple build servers


We utilize an on-premise, multi-server Azure DevOps implementation. These servers don't have internet access.

JFrog is our Artifact repository and also registry for NuGet, NPM, etc.

We are looking to install JFrog on our Azure DevOps system and are not sure what to do with the build servers. The JFrog extension for Azure DevOps is a pretty straight forward installation, though we are assuming that some type of installation is required on the build servers to allow them to authenticate to JFrog (JFrog-cli perhaps?). Surprisingly, there isn't any documentation about this on the JFrog site, and we are hoping for some installation guidance here.


Solution

  • According to the DevOps extension document of JFrog published by JFrog, we can install this extension for the Azure DevOps Server and collection; we can then proceed to create JFrog Platform V2 and JFrog Artifactory V2 service connections in the Project settings, so that the pipeline tasks like JFrog CLI V2 and JFrog Tools Installer are able to authenticate access to our JFrog servers against the API keys during a pipeline agent job.

    Image

    Image

    Per this simple pipeline below, it will get the tool jf.exe (for Windows agent machine in my case) into $(Agent.ToolsDirectory) on the agent during the agent job, while my tests with this pipeline so far were enabled with internet access.

    steps:
    - task: JfrogCliV2@1
      inputs:
        jfrogPlatformConnection: 'JFrogPlatFormSvcCnn'
        command: |
          jf help
    - task: JFrogNuGet@1
      inputs:
        command: 'push'
        artifactoryConnection: 'JFrogArtifactorySvcCnn'
        targetDeployRepo: '$(JFrogRepo)-nuget'
        pathToNupkg: '*.nupkg'
    
    

    Image With that being said, if the tool set downloading is blocked by your lack of internet access, you may consider installing JFrogCLI manually for your build servers as agent capability first and running jf commands in script pipeline task instead of using those tasks from JFrog extension.

    For my test below, I simply exported the path to jf.exe as one of the PATH environment variables of my agent machine, restarted my agent service to update agent capabilities, so that the jf command was recognized.

    Image