If the build agent has access to the internet, JFrog CLI and the Maven Extractor are downloaded and installed automatically on the agent the first time they are required.
If your agent has no internet access, you can configure the pipeline to download JFrog CLI and the Maven Extractor from an Artifactory instance, which is configured to proxy Bintray.
The extension runs JFrog CLI in the background to run many of its operations. The extension automatically downloads and installs the JFrog CLI on the build agent the first time it's required. However, if your build agent does not have access to the internet, the build will fail when attempting to download JFrog CLI and you'll need to download and install it manually.
To install JFrog CLI on an agent with no internet access:
When triggering the Artifactory Maven task, JFrog CLI automatically downloads the Maven Extractor jar to the build agent the first time it's required. However, if your build agent does not have access to the internet, the build will fail when attempting to download the file. You'll therefore need to download and install it manually.
To install the Maven Extractor jar on an agent with no internet access:
For the build agent to be able to run conan builds, do the following:
The build agent requires using Node.JS version 8 and above. To check which version of Node.JS is running on the build agent:
To upgrade Node.JS on the build agent:
To allow your builds to work with Artifactory, you'll need to configure your Artifactory instance as a Service endpoint.
Failing to access Artifactory
Make sure that the URL of the Artifactory instance does not end with a slash.
Still cannot access Artifactory?
For security reasons, Artifactory SaaS supports only TLS 1.2. Since not all TFS versions support TLS 1.2, you may need to enable TLS 1.2 on TFS.
To enable TLS 1.2 on TFS:
1. Create a file and name and name it: Microsoft.PowerShell_profile.ps1
2. Add the following line to the file:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
3. Place the file in the following location on the TFS machine: C:\Users\<username>\Documents\WindowsPowerShell
Make sure <username> matches the name of the user running TFS and the build agents. |
The Artifactory Generic Download task supports downloading your build dependencies from Artifactory to the build agent.
The task triggers JFrog CLI to perform the download in the background and is defined using File Specs and can also be configured to capture the build-info.
The task stores the downloaded files as dependencies in the build-info which can later be published to Artifactory using the Artifactory Publish Build-Info task.
When configuring the task, do the following:
The Artifactory Generic Upload task supports uploading your generated build artifacts from the build agent's local file system to Artifactory.
The task triggers JFrog CLI to perform the upload in the background.
The artifacts are defined using File Specs and can also be configured to capture build-info as it stores the uploaded files as artifacts in the build-info. The captured build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
When configuring the task, do the following:
Artifactory allows you to place properties on files. Setting (and deleting) properties is supported by local repositories or local-cache repositories. While you cannot set or delete properties on virtual repositories, you can retrieve them.
The Artifactory Properties task supports setting and deleting properties on files using File Specs.
For more information about managing properties in Artifactory, see Properties.
You can trigger the following builds.
The Artifactory Maven task allows triggering Maven builds, while resolving dependencies and deploying artifacts from and to Artifactory.
The task can also be configured to capture build-info and store the downloaded and uploaded artifacts as build dependencies and build artifacts. The captured build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
For more information about Maven repositories, see Artifactory Maven Repository.
The Artifactory Npm task allows triggering npm builds, while resolving npm dependencies and deploying npm packages from and to Artifactory.
The task can be also configured to capture build-info and store the uploaded files as artifacts in it. The captured build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
For information on npm repositories, see Artifactory Npm Registry.
The Artifactory Nuget task allows triggering nuget restore while resolving nuget dependencies from Artifactory. It also allows publishing nuget packages to Artifactory. The task can be also configured to capture build-info and store the uploaded files as artifacts in it. The captured build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
For more information about Nuget repositories, see Artifactory Nuget Repositories.
Conan is a package manager for C and C++.
The Artifactory Conan task allows triggering a conan build while resolving conan dependencies from a conan repository in Artifactory. It also allows publishing conan packages to an Artifactory conan repository. The task can be also configured to capture build-info and store the downloaded and uploaded packages as build dependencies and artifact. The captured build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
The tasks supports the config install, add remote, create and upload conan commands. In addition, it supports a custom option, allowing to configure the task to execute any conan command. The full documentation of cona is available at the conan web site.
For more information about Conan repositories, see Artifactory Conan Repositories.
The Artifactory Go task allows triggering a go build, while resolving go dependencies from a go repository in Artifactory. It also allows publishing go packages to an Artifactory go repository. The task can be also configured to capture build-info and store the downloaded and uploaded packages as build dependencies and artifact. The captured build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
For more information about Go repositories, see Artifactory Go Repositories.
The Artifactory Docker task allows pushing and pulling docker images to and from a docker repository in Artifactory. The task can be also configured to capture build-info for the pushed or pulled image. In addition to details about the build and the build environment, the build info includes the image layers as build dependencies and build artifacts. The task stores build info locally on the build agent. The stored build-info can be later published to Artifactory using the Artifactory Publish Build-Info task.
For more information about Docker and Artifactory, see Artifactory Docker Registry.
The Artifactory Generic Download and Artifactory Generic Upload tasks can be configured to collect and store build-info locally. The collected build info can be then published to Artifactory using the Artifactory Publish Build Info task.
For more information about Build Info, see Artifactory Build Integration.
When configuring the task, select your configured Artifactory service endpoints and specify whether you'd like to collect environment variables from the agent and add them to the build-info.
After the build-info is published to Artifactory, it can be accessed from the Artifactory tab in the Build Results.
To support the artifacts life-cycle, Artifactory supports promoting published builds from one repository to another.
The Artifactory Build Promotion task promotes a build, by either copying or moving the build artifacts and/or dependencies to a target repository.
This task can be added as part of a Build or Release pipeline.
Run these steps to configure the Artifactory Build Promotion task:
You can control the life cycle of your artifacts by promoting them from one Artifactory repository to another. Build Promotion can come in handy when embedding it as part of release pipeline in Azure DevOps. To help you achieve this, follow these steps for creating a release which includes the Artifactory Build Promotion task.
The Artifactory Xray Scan task allows triggering a build scan with JFrog Xray. For the build to be scanned, it first needs to be published to Artifactory using the Artifactory Publish BuildInfo task. When the scan is triggered, Artifactory will pass on the build to Xray, which will then scan the build artifacts. The scan is synchronous, meaning it will wait for the scan to finish.
If the Allow fail build task option is set and Xray is configured to fail the build, the build pipeline will fail, if vulnerabilities are found.
After the Xray scan is completed, the report can be accessed from the Artifactory tab in the Build Results.
Artifacts which were published to Artifactory can be made available for a Release Pipeline. There are two ways to achieve this.
The first way is to use the Artifactory Download task to download the files during the release. Read more about this in the Downloading Generic Dependencies from Artifactory section.
You can also set Artifactory as an artifact source for the release. This allows downloading the artifacts for a build which was previously published to Artifactory. Read more about publishing builds to Artifactory in the Publishing Build Info to Artifactory section.
Follow these steps to add Artifactory as an artifact source to a Release.
To discard old runs of a build from Artifactory, add the Artifactory Discard Builds to the pipeline.
Run these steps to configure the task.