Configure Azure DevOps for JFrog
Summarize
Summarized using AI
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.
Summary of Configure Azure DevOps for JFrog
This guide outlines how to configure Azure DevOps for integrating with JFrog, enabling the upload and download of artifacts. Key steps include installing the JFrog Artifactory plugin and creating a service connection to your JFrog instance.
Show less
Key Features
- Service Connection Creation: After installing the JFrog Artifactory plugin, a service connection must be established with your JFrog instance using your credentials.
- Artifact Uploading: Use the Artifactory Generic Upload task in your pipeline to upload artifacts to JFrog. Ensure the appropriate file spec is configured.
- Artifact Downloading: The Artifactory Generic Download task allows you to pull artifacts from JFrog to Azure DevOps, with similar configuration requirements.
Key Outcomes
By following this configuration, you enable seamless artifact management between Azure DevOps and JFrog. You can expect efficient uploads and downloads of artifacts, along with the ability to collect build information for tracking and reporting purposes.
Configure your Azure DevOps instance to enable upload and download of JFrog artifacts.
The following settings are required in your Azure DevOps instance:
- Install the plugin JFrog Artifactory.
- Select your project and navigate to .
- Select New service connection, search and select the installed JFrog Artifactory plugin, and select Next.
- Enter your JFrog instance details and create a service connection for JFrog.Note:The Username and Password fields must contain the credentials to your JFrog instance entered in the Server URL field.
Upload artifacts from Azure DevOps to JFrog
To upload artifacts:
- Navigate to your project pipeline.
- In your stage for uploading, add the task Artifactory Generic Upload for uploading artifacts.
- For the Artifactory Generic Upload task:
- Select the service connection you created for JFrog.
- In the Spec field, entire your file spec.
- Select the Collect build info check box.
- The Build number field should contain the BuildId parameter.
- Select Add.
- Add the task Artifactory Publish Build Info for publishing build info.
- For the Artifactory Publish Build Info task:
- Select the service connection you created for JFrog.
- The Build number field should contain the BuildId parameter.
- Select Add.
Sample pipeline to upload artifacts from Azure DevOps to JFrog
trigger:
- none
pool:
vmImage: ubuntu-latest
variables:
- group: Variable Group
stages:
- stage: upload_artifact
jobs:
- job: 'upload'
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- task: ArtifactoryGenericUpload@2
inputs:
artifactoryService: 'JFrogCloud'
specSource: 'taskConfiguration'
fileSpec: |
{
"files": [
{
"pattern": "servicenow-app-devops.zip",
"target": "local-repo"
}
]
}
collectBuildInfo: true
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildId)'
failNoOp: true'
- task: ArtifactoryPublishBuildInfo@1
inputs:
artifactoryService: 'JFrogCloud'
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildId)'
Download artifacts from JFrog to Azure DevOps
To download artifacts:
- Navigate to your project pipeline.
- In your stage for downloading, add the task Artifactory Generic Download for downloading artifacts.
- For the Artifactory Generic Download task:
- Select the service connection you created for JFrog.
- In the Spec field, entire your file spec.
- Select the Collect build info check box.
- The Build number field should contain the BuildId parameter.
- Select Add.
- Add the task Artifactory Publish Build Info for publishing build info.
- For the Artifactory Publish Build Info task:
- Select the service connection you created for JFrog.
- The Build number field should contain the BuildId parameter.
- Select Add.
Sample pipeline to download artifacts from Azure DevOps to JFrog
trigger:
- none
pool:
vmImage: ubuntu-latest
variables:
- group: Variable Group
stages:
- stage: download_artifact
jobs:
- job: 'download'
steps:
- task: ArtifactoryGenericDownload@3
inputs:
connection: 'JFrogCloud'
specSource: 'taskConfiguration'
fileSpec: |
{
"files": [
{
"pattern": "local-repo/servicenow-app-devops.zip",
"target": "/tmp/"
}
]
}
collectBuildInfo: true
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildId)'
failNoOp: true
- task: ArtifactoryPublishBuildInfo@1
inputs:
artifactoryService: 'JFrogCloud'
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildId)'