Giter Site home page Giter Site logo

jfrog / jfrog-azure-devops-extension Goto Github PK

View Code? Open in Web Editor NEW
47.0 17.0 61.0 7.64 MB

License: Apache License 2.0

JavaScript 70.83% HTML 0.30% C# 0.03% CMake 0.11% C++ 0.11% Python 0.56% C 0.04% Shell 0.71% Go 0.04% Java 0.41% TypeScript 26.81% Dockerfile 0.04%

jfrog-azure-devops-extension's Introduction

JFrog Azure DevOps Extension

Azure DevOps Extension Installs Tests (Master) Tests (Dev)
JFrog Extension Marketplace JFrog Extension Marketplace Installs Build status Build status
JFrog Extension Marketplace Artifactory Extension Marketplace Installs Build status Build status

Overview

JFrog provides tight integration with Azure DevOps through the JFrog Extension Beyond managing efficient deployment of your artifacts to JFrog Artifactory, the extension lets you capture information about artifacts deployed, dependencies resolved, environment data associated with the build runs and more, that effectively facilitates fully traceable builds. JFrog brings continuous integration to Azure DevOps through the JFrog extension.

The JFrog Extension for Azure DevOps supports:

Table of contents

Download and Installation

Installing the Extension

To install the JFrog Extension, execute the following steps:

  • Go to the Visual Studio Marketplace Jfrog Extension Page and sign in to your account.

  • Click on Get It Free

  • Select the account to which you want to apply the extension and confirm installation.

  • In the JFrog Extension page, click Install.

Installing the Build Agent

To run the JFrog tasks, the build agents use three tools:

  • JFrog CLI: Runs all the JFrog tasks.
  • Maven Extractor (Used by the JFrog Maven task)
  • Gradle Extractor (Used by the JFrog Gradle task)
  • Conan client (Used by the JFrog Conan task)

Automatic Installation

If the build agent has access to the internet, JFrog CLI along with the Maven and Gradle Extractors are downloaded and installed automatically on the agent, the first time they are required.

Custom tools Installation

You can configure the pipeline to download JFrog CLI and the Maven Extractor from a JFrog Artifactory instance, which is configured to proxy the download repositories.

  • Create two remote repositories in Artifactory:
  • Create a remote repository in Artifactory for downloading JFrog CLI. Name the repository jfrog-cli-remote and set its URL to https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/
  • Create a remote repository in Artifactory for downloading the Maven and Gradle Extractors. Name the URL extractors and set its URL to: https://releases.jfrog.io/artifactory/oss-release-local/
  • Make sure to configure the Artifactory server with the jfrog-cli-remote and extractors repositories in as a service connection in Azure DevOps of type JFrog Artifactory V2.
  • Add the JFrog Tools Installer task to your build or release pipeline.
  • Select the Artifactory service you configured.
  • Select jfrog-cli-remote as the target repository to download the JFrog CLI.
  • If your pipeline uses the JFrog Maven or JFrog Gradle tasks, select extractors as the repository to download the Maven Extractor.

tool-installer.png

- task: JFrogToolsInstaller@1
  inputs:
    artifactoryConnection: 'jfrog artifactory'
    cliInstallationRepo: 'jfrog-cli-remote'
    installExtractors: true
    extractorsInstallationRepo: 'extractors'

Manual Installation

Installing JFrog CLI

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:

  1. Create the directory structure on your agent's file-system: $(Agent.ToolsDirectory)/_jf/current/
  2. Download the latest JFrog CLI version from here.
  3. Please make sure to download the executable matching your agent's operating system. Make sure to download the jf executable of JFrog CLI and not the legacy jfrog executable.
  4. Copy the downloaded jf executable to the current directory you created.
Installing the Maven Extractor

When triggering the JFrog 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:

  1. Create the directory structure on your agent's file-system: ~/.jfrog/dependencies/maven/2.x.x
  2. Download the latest build-info-extractor-maven3-2.x.x-uber.jar and place it inside the "maven" directory you created.
Installing the Gradle Extractor

When triggering the JFrog Gradle task, JFrog CLI automatically downloads the Gradle 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 Gradle Extractor jar on an agent with no internet access:

  1. Create the directory structure on your agent's file-system: ~/.jfrog/dependencies/gradle/4.x.x
  2. Download the latest build-info-extractor-gradle-4.x.x-uber.jar and place it inside the "gradle" directory you created.
Installing Conan

For the build agent to be able to run conan builds, do the following:

  1. Access the agent and install conan by following these steps.
  2. Confirm that the conan executable is available in the Path environment variable of the user which runs the build on the agent.

The JFrog Conan task uses the Conan client. The Conan client cannot be installed using the Automatic Installation or the JFrog Tools Installer but is required to be manually installed.

Using TFS 2015

Node.JS version 8 and above.

The build agent requires using Node.JS version 8 and above. To check which version of Node.JS is running on the build agent:

  1. Navigate to the Worker\Handlers\Node folder located under the Agent home.
  2. From the terminal, run node -v

To upgrade Node.JS on the build agent:

  • Replace the existing node.exe file on the agent with the node.exe file with the required version located in the Worker\Handlers\Node folder under the agent home.

Configuring the Service Connections

To allow the JFrog tasks to work with your JFrog environment, you'll need to configure the following service connections in Azure DevOps.

Service connection Used by tasks
JFrog CLI V2
JFrog Tools Installer
JFrog Generic Artifacts
JFrog Nuget
JFrog .NET Core
JFrog npm
JFrog Pip
JFrog Maven
JFrog Gradle
JFrog Go
JFrog Conan
JFrog Collect Build Issues
JFrog Discard Builds
JFrog Build Promotion
JFrog Publish Build Info
JFrog Audit
JFrog Build Scan
JFrog Distribution
Not Using a Public CA (Certificate Authority)?

This section is relevant for you, if you're not using a public CA (Certificate Authority) to issue the SSL certificate used to connect to your JFrog instance domain. You may not be using a public CA either because you're using self-signed certificates or you're running your own PKI services in-house (often by using a Microsoft CA). In this case, you'll need to make those certificates available for JFrog CLI, which is used by most of JFrog tasks. To make the certificates available for JFrog CLI, you'll need to place them inside the security/certs directory, which is under JFrog CLI's home directory. The home directory default location is $(Agent.ToolsDirectory)/_jf/

Read more about this in the JFrog CLI.

Can't Access your JFrog instance?

For security reasons, the JFrog SaaS service 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

Note: Make sure matches the name of the user running TFS and the build agents.


Executing JFrog CLI Commands

JFrog CLI V2 Task

The extension support a generic JFrog CLI task, named JFrog CLI V2, which allows executing JFrog CLI commands. The command will use the connection details provided by the selected JFrog Platform service connection configured in Azure DevOps, so there's no need to provide the connection details as command options.

cli-v2-task.png

Single command example:

- task: JfrogCliV2@1
  inputs:
    jfrogPlatformConnection: 'JFrog Platform V2'
    command: |
- task: JfrogCliV2@1
  inputs:
    jfrogPlatformConnection: 'JFrog Platform V2'
    command: |
      jf go-config --repo-resolve=go-remote --repo-deploy=go-local 
      jf go build 
      jf go-publish v1.0.0
      jf rt bce $(Build.DefinitionName) $(Build.BuildNumber)
      jf rt build-publish $(Build.DefinitionName) $(Build.BuildNumber)

Multiple commands example:

- task: JfrogCliV2@1
  inputs:
    jfrogPlatformConnection: 'JFrog Platform V2'
    command: |
      jf rt ping
      jf terraform-config --repo-deploy=terraform-remote 
      jf terraform publish --namespace=example --provider=aws --tag=v0.0.1

Managing Generic Artifacts

JFrog Generic Artifacts task

The JFrog Generic Artifacts task supports following operations with JFrog Artifactory:

  • Uploading artifacts to Artifactory
  • Downloading artifacts from Artifactory
  • Copying artifacts in Artifactory
  • Moving artifacts in Artifactory
  • Deleting artifacts in Artifactory
  • Setting properties on artifacts in Artifactory
  • Deleting properties from artifacts in Artifactory

The task triggers JFrog CLI to perform these actions using File Specs. When the task is used for uploading and downloading artifacts, it can also be configured to capture the build-info, which can be later published to Artifactory using the JFrog Publish Build Info task.

When configuring the task, do the following:

  1. Select your configured JFrog Artifactory V2 service connection.

  2. Specify whether you'd like define the File Spec through the task UI or have the task read the spec from a file.

  3. Set the File Spec content or a path to the File Spec.

  4. Set the other task options.

  5. Check the Advanced section for additional options.

Generic artifacts handling

The JFrog Generic Artifacts task allows performing generic actions on artifacts, such as:

  1. Downloading and uploading from/to Artifactory
  2. Setting or deleting properties on artifacts in Artifactory
  3. Moving, copying and deleting artifacts in Artifactory

Downloading generic build dependencies from Artifactory

The task supports downloading your build dependencies from Artifactory to the build agent. The downloaded dependencies are defined using File Specs and can be also configured to capture the build-info. It will store the downloaded files as dependencies in the build-info which can later be published to Artifactory using the JFrog Publish Build-Info task.

GenericDownload

Uploading generic build artifacts to Artifactory

The task also supports uploading your generated build artifacts from the build agent's local file system to Artifactory. The artifacts are defined using File Specs. The task can be also configured to capture build-info and stores the uploaded files as artifacts in the build-info. The captured build-info can be later published to Artifactory using the JFrog Publish Build-Info task.

GenericUpload

Setting / Deleting properties on files in Artifactory

The JFrog Generic Artifacts task also allows both setting and deleting properties on artifacts in Artifactory.

Props

Moving / Copying / Deleting artifacts in Artifactory

Same task also allows performing generic actions on artifacts in Artifactory.

Copy

YAML Example:

- task: JFrogGenericArtifacts@1
  inputs:
    command: 'Upload'
    connection: 'jfrog artifactory'
    specSource: 'taskConfiguration'
    fileSpec: |
      {
        "files": [
          {
            "pattern": "libs-generic-local/*.zip",
            "target": "dependencies/files/"
          }
        ]
      }
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    projectKey: 'proj'
    includeEnvVars: true
    failNoOp: true

Build tools Tasks

JFrog Maven Task

mvn.png

The JFrog Maven task allows triggering Maven builds, while resolving dependencies and deploying artifacts from and to Artifactory. The task uses the configured JFrog Artifactory V2 service connection. 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 JFrog Publish Build-Info task.

mvn.png

You also have the option of filtering out some of the Maven artifacts that will be deployed to Artifactory. You do this by defining one or more include patterns. You can also define one or more exclude patterns. The patterns can include wildcards and should be separated by a comma followed by a white-space as shown below.

mvn.png

- task: JFrogMaven@1
  inputs:
    mavenPomFile: 'pom.xml'
    goals: 'install'
    artifactoryResolverService: 'jfrog artifactory'
    targetResolveReleaseRepo: 'libs-release'
    targetResolveSnapshotRepo: 'libs-snapshot'
    artifactoryDeployService: 'jfrog artifactory'
    targetDeployReleaseRepo: 'libs-release'
    targetDeploySnapshotRepo: 'libs-snapshot'
    filterDeployedArtifacts: true
    includePatterns: 'artifact-*.jar,artifact-*.pom'
    excludePatterns: 'artifact-*-test.jar,artifact-*-test.pom'
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    includeEnvVars: true

For more information about Maven repositories, see Artifactory Maven Repository

JFrog Gradle Task

gradle.png

The JFrog Gradle task allows triggering Gradle builds, while resolving dependencies and deploying artifacts from and to Artifactory. The task uses the configured JFrog Artifactory V2 service connection.

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 JFrog Publish Build-Info task.

Behind the scenes, the JFrog Gradle task uses the Gradle Artifactory Plugin to integrate with the Gradle build. In case your Gradle script already applies the Gradle Artifactory Plugin, set the Use Artifactory Plugin option, to let the task know that it shouldn't apply the plugin in the Gradle script.

You should set artifactoryPublish as one of the Gradle tasks in the task(s) fields. artifactoryPublish is a task that is exposed by the Gradle Artifactory Plugin, and is used for deploying artifacts as well as publishing build-info to Artifactory.

gradle.png

- task: JFrogGradle@1
  inputs:
    gradleBuildFile: 'build.gradle'
    tasks: 'artifactoryPublish'
    artifactoryResolverService: 'jfrog artifactory'
    sourceRepo: 'gradle-virtual'
    artifactoryDeployerService: 'jfrog artifactory'
    targetRepo: 'gradle-local'

JFrog Npm Task

npm.png

The JFrog Npm task allows triggering npm builds, while resolving npm dependencies and deploying npm packages from and to Artifactory. The task uses the configured JFrog Artifactory V2 service connection.

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 JFrog Publish Build-Info task.

npm.png

- task: JFrogNpm@1
  inputs:
    command: 'install'
    artifactoryConnection: 'jfrog artifactory'
    sourceRepo: 'npm-virtual'
    collectBuildInfo: true
    threads: '1'
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    includeEnvVars: true

For information on npm repositories, see Artifactory npm Registry

JFrog Nuget and .NET Core Task

nuget.png

The JFrog Nuget and JFrog .NET Core tasks allow restoring NuGet packages from Artifactory. These tasks also allow publishing NuGet packages to Artifactory. The task uses the configured JFrog Artifactory V2 service connection. The tasks can be configured to capture build-info. The build-info stores the restored packages as build dependencies and uploaded packages as build artifacts. The captured build-info can be later published to Artifactory using the JFrog Publish Build-Info task.

nuget.png

- task: JFrogDotnetCore@1
  inputs:
    command: 'restore'
    artifactoryConnection: 'jfrog artifactory'
    targetResolveRepo: 'nuget-virtual'
    rootPath: '*/*.sln'
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    includeEnvVars: true

For more information about Nuget repositories, see Artifactory NuGet Repositories

JFrog Pip Task

pip.png

The JFrog Pip task allows installing Pip packages from Artifactory. The task uses the configured JFrog Artifactory V2 service connection. The tasks can also be configured to capture build-info. The build-info stores the installed packages as build dependencies. The captured build-info can be later published to Artifactory using the Publishing Build Info to Artifactory task.

pip.png

- task: JFrogPip@1
  inputs:
    artifactoryConnection: 'jfrog artifactory'
    command: 'install'
    targetResolveRepo: 'pypi'
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'

Recording all dependencies as part of the build-info When running the JFrog Pip task inside a Python environment, which already has some of the packages installed, the installed packages will not be included as part of the build-info, if they were not originally installed from Artifactory. A warning message will be added to the build log in this case.

How to include all packages in the build-info? Running the task for the first time with the Disable local pip cache option checked, should re-download and install these packages, and they will therefore be included in the build-info. It is also recommended to run the command from inside a virtual environment. The Virtual environment setup command field allows this.

pip-advanced.png

Behind the scenes, the task uses JFrog CLI as a wrapper for pip. JFrog CLI also includes a caching mechanism, which stores the details of the dependencies locally, making sure they are included in the build-info, even if they are already cached locally.

JFrog Conan Task

conan.png

Conan is a package manager for C and C++.

The JFrog Conan task allows triggering a conan build while resolving conan dependencies from a conan repository in Artifactory. The task uses the configured JFrog Artifactory V2 service connection. 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 JFrog Publish Build-Info task.

The task 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 Conan is available at the conan website.

conan.png

- task: JFrogConan@1
  inputs:
    conanCommand: 'Install'
    pathOrReference: './'
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'

For more information about Conan repositories, see Artifactory Conan Repositories

JFrog Go Task

The JFrog Go task allows triggering a go build, while resolving go dependencies from a go repository in Artifactory. The task uses the configured JFrog Artifactory V2 service connection. 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 JFrog Publish Build-Info task.

go.png

- task: JFrogGo@1
  inputs:
    command: 'build'
    artifactoryConnection: 'jfrog artifactory'
    resolutionRepo: 'go'
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    includeEnvVars: true
    workingDirectory: 'golang-example/hello'

For more information about Go repositories, see Artifactory Go Repositories


Build Tasks

JFrog Collect Build Issues

Being able to look at the build which was published to Artifactory, and see all JIRA issues associated with it, is one of the most powerful capabilities of Artifactory when it comes to managing metadata about artifacts builds.

The JFrog Collect Build Issues task collects the list of tracked project issues (for example, issues stored in JIRA, GitHub or any other bug tracking systems, and adds these issues to the build-info. The task uses the configured JFrog Artifactory V2 service connection. The issues are collected by reading the git commit messages from the local git log. Each commit message is matched against a pre-configured regular expression, which retrieves the issue ID and issue summary. The information required for collecting the issues is retrieved from a yaml configuration, which is set as part for the task.

collect-issues.png

Here's the yaml configuration structure.

version: 1
issues:
  trackerName: JIRA
  regexp: (.+-[0-9]+)\s-\s(.+)
  keyGroupIndex: 1
  summaryGroupIndex: 2
  trackerUrl: https://my-jira.com/issues
  aggregate: true
  aggregationStatus: RELEASED
Configuration properties
Property name Description
Version The schema version is intended for internal use. Do not change!
trackerName The name (type) of the issue tracking system. For example, JIRA. This property can take any value.
regexp A regular expression used for matching the git commit messages. The expression should include two capturing groups - for the issue key (ID) and the issue summary. In the example above, the regular expression matches the commit messages as displayed in the following example:
HAP-1007 - This is a sample issue
keyGroupIndex The capturing group index in the regular expression used for retrieving the issue key. In the example above, setting the index to "1" retrieves HAP-1007 from this commit message:
HAP-1007 - This is a sample issue
summaryGroupIndex The capturing group index in the regular expression for retrieving the issue summary. In the example above, setting the index to "2" retrieves the sample issue from this commit message:
HAP-1007 - This is a sample issue
trackerUrl The issue tracking URL. This value is used for constructing a direct link to the issues in the Artifactory build UI.
aggregate Set to true, if you wish all builds to include issues from previous builds.
aggregationStatus If aggregate is set to true, this property indicates how far in time should the issues be aggregated. In the above example, issues will be aggregated from previous builds, until a build with a RELEASE status is found. Build statuses are set when a build is promoted using the jfrog rt build-promote command.

The yaml configuration can be either be stored as text as part of the task configuration, or stored in a file. The file can be saved in the source control, and fetched, together with the rest of the sources to the build agent. It can then be accesses and used by this task.

JFrog Publish Build Info

Most of the JFrog tasks can be configured to collect and store build-info locally. The task uses the configured JFrog Artifactory V2 service connection. The collected build info can be then published to Artifactory using the JFrog 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.

collect-issues.png

- task: JFrogPublishBuildInfo@1
  inputs:
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    excludeEnvVars: '*password*;*psw*;*secret*;*key*;*token*;*auth*;'

After the build-info is published to Artifactory, it can be accessed from the Artifactory tab in the Build Results.

build-results.png bi-in-artifactory.png

JFrog Build Promotion

To support the artifacts life-cycle, Artifactory supports promoting published builds from one repository to another.

The JFrog 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 JFrog Build Promotion task:

  1. Select the configured JFrog Artifactory V2 service connection, to which the build has been published.

  2. Specify the name of a* target repository* to which the build should be promoted.

  3. Set the status of the build and optionally add a Comment. These details will be visible as part of the Build History in the Artifactory UI.

  4. (Optional) Set a source repository for the promotion.

  5. Select the include build dependencies if you want the build dependencies to be promoted.

  6. To copy and not to move the artifacts to the target repository, select the Use copy option to copy the artifacts to the target repository.

  7. Select Dry run to test the promotion prior to running the build promotion.

build-promotion.png

- task: JFrogBuildPromotion@1
  inputs:
    artifactoryConnection: 'jfrog artifactory'
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    targetRepo: 'staging-local'
    status: 'Released'
    comment: 'Promoting release candidate'
    sourceRepo: 'Dev1-local'
    includeDependencies: false
    copy: true
    dryRun: false
Using Build Promotion in a Release

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 JFrog Build Promotion task.

  1. Create a new Release. promotion.png
  2. Click environment and select a template for the release. promotion.png
  3. Click Artifact and select Build as the source type.
  4. Fill out the rest of the form details.
  5. If you'd like this release to always use the latest build from Artifactory, select specify a specific build number as the Default version and select one of the available build number i the Build number list box.
  6. If you'd like to promote a specific build number during the release, select specify at the time of release creation as the Default version: promotion.png
  7. If you wish to promote the latest build number, select specify a specific build number as the Default version and then select any build number. Then, click on the Variables tab and add the ARTIFACTORY_RELEASE_BUILD_NUMBER pipeline variable with LATEST as the value. promotion.png
  8. Configure the Artifactory Build Promotion task as one of your release pipeline tasks. The task uses a build number which will be selected later on, upon creating a release. promotion.png
  9. That's it, you're done! Now you can create the release. The build number that you'll choose is that one which will be promoted in Artifactory. promotion.png

Discarding Published Builds from Artifactory

To discard old runs of a build from Artifactory, add the JFrog Discard Builds task to the pipeline.

Run these steps to configure the task.

  1. Select the configured JFrog Artifactory V2 service connection, on which you'd like the builds to be discarded.

  2. Type the name of the build.

  3. Optionally set the maximum days to keep build runs. Build runs which are older will be discarded.

  4. Optionally set the maximum number of builds to keep.

  5. Optionally set of build runs in the form of 10,11,12,... to keep and not to discard.

  6. Check the Delete artifacts checkbox, to also delete the build artifacts and not only the build meta-data.

  7. Check the Async checkbox, to make the action asynchronous. In this case, the pipeline will not wait for the action to finish, but the pipeline will not be notified in case of a failure. build-discard.png

- task: JFrogDiscardBuilds@1
  inputs:
    artifactoryConnection: 'jfrog artifactory'
    buildName: '$(Build.DefinitionName)'
    maxDays: '60'
    maxBuilds: '400'
    excludeBuilds: '10,11,12'
    deleteArtifacts: true

JFrog Xray tasks

Audit project's dependencies for Security Vulnerabilities

The JFrog Audit task triggers an audit of your project dependencies for security vulnerabilities with JFrog Xray. The task uses the configured JFrog Xray V2 service connection. The scan is synchronous, meaning the tasks waits for the scan to finish. To determine the policy for identifying the vulnerabilities, you can either set a list for Xray Watches or select a JFrog Project or path in Artifactory associated with the policy.

This functionality requires version 3.29.0 or above of JFrog Xray.

audit.png violations-table.png

- task: JFrogAudit@1
  inputs:
    xrayConnection: 'jfrog xray token'
    watchesSource: 'watches'
    watches: 'watch1,watch2'
    allowFailBuild: true

Scanning Published Builds for Security Vulnerabilities

The JFrog Build 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 JFrog Publish Build-Info task. The task uses the configured JFrog Xray V2 service connection. When the scan is triggered, Xray starts scanning the build artifacts and dependencies. The scan is synchronous, meaning the tasks waits 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.

This functionality requires version 3.37.0 or above of JFrog Xray.

build-scan.png

- task: JFrogBuildScan@1
  inputs:
    xrayConnection: 'jfrog xray token'
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    allowFailBuild: true
    vuln: false

After the Xray scan is completed, a vulnerabilities table is printed to the task run logs, along with a link to the build-info report.

violations-table.png violations-table.png


JFrog Docker tasks

Pushing and Pulling Docker Images to and from Artifactory

The JFrog 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 JFrog Publish Build Info task.

This functionality requires version 7.33.3 or above of Artifactory.

For more information about Docker and Artifactory, see Artifactory Docker Registry

docker-pull.png

- task: JFrogDocker@1
  inputs:
    command: 'Pull'
    artifactoryConnection: 'jfrog artifactory'
    imageName: 'myjfrog.jfrog.io/docker-local/hello-world:latest'
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    skipLogin: false

Scanning Local Docker Images with JFrog Xray

The JFrog Docker task allows scanning local docker images using JFrog Xray. The scan results is displayed in the build log.

By default, the result will include all vulnerabilities found. You may however configure the task to show only violations configured in Xray.

You do this by configuring the task to use:

  1. Your JFrog Project. If there are Xray Watches associated with this Project, these Watches will be used.

  2. Xray Watch or a list of Watches.

  3. Repository path in Artifactory which has Xray Watches associated with it.

This functionality requires version 3.40.0 or above of JFrog Xray.

docker-scan.png

- task: JFrogDocker@1
  inputs:
    command: 'Scan'
    xrayConnection: 'jfrog xray token'
    watchesSource: 'none'
    licenses: true
    allowFailBuild: true
    threads: '3'
    skipLogin: false

Using Published Artifacts in a Release

Artifacts which were published to Artifactory can be made available for a Release Pipeline. There are two ways to achieve this:

Using JFrog Generic Artifacts task

The first way is to use the JFrog Generic Artifacts task to download the files during the release. Read more about this in the Downloading Generic Dependencies from Artifactory section.

Using Azure Artifact source

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.

  1. Create a new Release and click on Artifacts Add

    release1.png

  2. Select the Artifactory source type.

    release2.png

  3. Select an Artifactory service, a build name, and the default version to use.

    release3.png

    That's it! You're done.

    Now, when initiating the Release, the artifacts associated with the defined build are downloaded to the release agent.


Managing and Distributing Release Bundles

JFrog Distribution V2 Task

JFrog Distribution is a centralized platform that lets you provision software release distribution. It is a core part of JFrog Enterprise+, managing Release Bundles and their distribution processes, including release content, permission levels, and target destinations. Distribution provides a secure and structured platform to distribute release binaries to multiple remote locations and update them as new release versions are produced. As part of the release flow, release bundles are verified by the target destination to ensure that they are signed correctly and safe to use. JFrog DistributionDistributing Release Bundles

The JFrog Distribution task allows creating, updating, signing and deleting release bundles. It also allows distributing the release to the edge nodes.

  • The task requires configuring your JFrog Distribution V2 instance as a service connection in Azure DevOps.
  • You can then set the instance you configured as the Distribution service value in the task.
  • The task triggers JFrog CLI to execute the distribution actions.
  • When creating or updating a release bundle, you need to provide File Specs defining the artifacts to be included in the release bundle.
  • When distributing a release bundle, you can control the distribution destinations by defining rules distribution rules in a JSON format.

Distribution Rules JSON structure Here's an example:

   {
  "distribution_rules": [
    {
      "site_name": "DC-1",
      "city_name": "New-York",
      "country_codes": [
        "1"
      ]
    },
    {
      "site_name": "DC-2",
      "city_name": "Tel-Aviv",
      "country_codes": [
        "972"
      ]
    }
  ]
}

The Distribution Rules format also supports wildcards. For example:

   {
  "distribution_rules": [
    {
      "site_name": "*",
      "city_name": "*",
      "country_codes": [
        "*"
      ]
    }
  ]
}

distribution.png

- task: JFrogDistribution@1
  inputs:
    command: 'distribute'
    distributionConnection: 'distCon'
    rbName: 'myReleaseBundle'
    rbVersion: '$(Build.BuildNumber)'
    distRulesSource: 'taskConfiguration'
    distSync: true
    maxWaitSync: '40'

Contribution

We welcome pull requests from the community!

Building

Building

To build and run the extension sources, please follow these steps:

  1. Clone the code from git.
  2. To Build and create the JFrog Artifactory extension vsix file, run the following command.
    npm i
    npm run create
    

After the build process is completed, you'll find the vsix file in the project directory. The vsix file can be loaded into Azure DevOps and TFS.

Testing

Testing

To run the tests, please make sure you are using node 14 or above.

Use the following commands to run from terminal:

  1. Set the ADO_JFROG_PLATFORM_URL, ADO_JFROG_PLATFORM_USERNAME and ADO_JFROG_PLATFORM_PASSWORD environment variables with your JFrog Platform URL, username and password:

    export ADO_JFROG_PLATFORM_URL='https://myrepo.jfrog.io/'
    export ADO_JFROG_PLATFORM_USERNAME=admin
    export ADO_JFROG_PLATFORM_PASSWORD=password
    
  2. Run the following commands:

    npm i -g jfrog-cli-v2-jf
    npm t
    

Note: If you are running tests via your IDE, make sure you are registering tests with ts-node: mocha -r ts-node/register tests.ts -t 1000000.

Skipping Tests

In order to skip tests, set the ADO_SKIP_TESTS environment variable with the tests you wish to skip, separated by commas. The supported values are: maven, gradle, npm, go, nuget, dotnet, conan, pip, proxy, distribution, unit, installer and generic.

For example, for skipping the nuget and dotnet tests:

export ADO_SKIP_TESTS=nuget,dotnet
Pull request guidelines
  • Pull requests should be created on the dev branch.
  • Please make sure the code is covered by tests.
  • Please run npm run format for formatting the code before submitting the pull request.
  • Please run npm run lint and make sure no new tslint warnings were introduced.

Reporting issues

Please help us improve jfrog-azure-devops-extension by reporting issues you encounter.

jfrog-azure-devops-extension's People

Contributors

alexeivainshtein avatar asaf-federman avatar attiasas avatar barbelity avatar dependabot[bot] avatar derekscp avatar dimanevelev avatar eyalb4doc avatar eyalbe4 avatar eyaldelarea avatar flcdrg avatar hightoxicity avatar jfrog-ecosystem avatar jfrogsolutionci avatar joeced avatar liron-shalom avatar omerzi avatar or-geva avatar robinino avatar sdohle avatar shahyads avatar simonalling avatar sverdlov93 avatar talarian1 avatar tynutsu avatar yahavi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jfrog-azure-devops-extension's Issues

Nuget restore fail when project root dir include more than one .sln file.

Since we pass the project root dir and not the path to the select .sln file to JFrog CLI, when we execute "nuget restore" the client complain about the fact that there are few .sln files.

In order to fix the issue, we need to pass the full path to the .sln file which we selecting at the task configuration.

"Artifactory response: 400 Bad Request" since 1.9.4

Since yesterday, our CI pipeline have been failing when pushing Docker images to Artifactory. We see that this occurred at the same time as this task was upgraded from 1.9.2 to 1.9.4. Posting this here mostly in case anyone else has the same problem.

Artifactory in Release pipeline doesn't have continues deployment feature

With the default source type "Build", after the setup, you can see a little "lightning" icon at the top right of the "Build" as artifacts. Click there, you can see the options to setup CD pipeline:
Once a new build successful, it will automatically create a new release based on the new build output, then do the release pipeline.

However I couldn't find this feature while using Artifactory as the option of Source for Artifacts.

Is there anything I missed, or is there any other way we can get this CI/CD done in one click?

Thanks
River

Azure DevOps Extension - Conan Package only contains sources after publish to Artifactory

I create a conan package in an Azure DevOps pipeline with the conan create task.

- task: ArtifactoryConan@1
  displayName: 'Create Conan Package'
  inputs:
    conanCommand: 'Create'
    extraArguments: '--profile=$(conanProfile)'
    createPath: 'src'
    createReference: 'username/development'
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'

Conan creates a package in the folder '.conan\data\packagename\1.1.0\user\development\package\3fb49604f9c2f729b85ba3115852006824e72cab' that contains the lib and header files, a tgz archive, a conaninfo and conanmanifest. So everything looks good.

Put if I publish the package to Artifactory using the upload task, only the sources get uploaded

- task: ArtifactoryConan@1
  displayName: 'Upload Conan Package'
  inputs:
    conanCommand: 'Upload'
    patternOrReference: 'packagename'
    extraArguments: '--all --force'
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'

I tried the --all and --force switch - but now my sources get uploaded two times. Am i Missing here something?

Artifactory Python Task

Similar to our offerings for NPM, Docker, Maven, Go, etc, it would be ideal to have a Python Task as well to allow for the gathering of Build Info on Python builds + later on scan with Xray after the build info is published.

Artifactory Maven task does have a Jdk version selection

Artifactory Maven task doesn’t have a jdk version selection option( drop down ) so it is picking up the default version jdk 8 on the build server. Since we have multiple versions installed on the server(Jdk 8 and Jdk 11). Is it possible to select different versions of jdk using this task?

Error: Cannot find module 'azure-***s-task-lib/task'

Release 1.9.1 seems to have broken our pipeline.

Starting: Push Docker image to Artifactory
==============================================================================
Task         : Artifactory Docker
Description  : Pull and push docker images from and to Artifactory, while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
Version      : 1.9.1
Author       : JFrog
Help         : [More Information](https://www.jfrog.com/confluence/display/RTF/Docker+Registry)
==============================================================================
module.js:478
    throw err;
    ^

Error: Cannot find module 'azure-***s-task-lib/task'
    at Function.Module._resolveFilename (module.js:476:15)
    at Function.Module._load (module.js:424:25)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/vsts/work/_tasks/ArtifactoryDocker_07fc5c20-6882-a1c2-cbcd-6531d5a72113/1.9.1/dockerBuild.js:1:74)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
##[error]Exit code 1 returned from process: file name '/home/vsts/agents/2.165.2/externals/node/bin/node', arguments '"/home/vsts/work/_tasks/ArtifactoryDocker_07fc5c20-6882-a1c2-cbcd-6531d5a72113/1.9.1/dockerBuild.js"'.
Finishing: Push Docker image to Artifactory

Pipeline configuration:

- task: ArtifactoryDocker@1
  displayName: Push Docker image to Artifactory
  condition: >
    and(
      succeeded(),
      or(
        ne(variables['DONT_PUSH_TO_ARTIFACTORY'], 'true'),
        eq(variables['Build.SourceBranch'],'refs/heads/master')
      )
    )
  inputs:
    command: push
    artifactoryService: Artifactory
    targetRepo: docker
    imageName: $(IMAGE_NAME):$(Build.BuildId)
    collectBuildInfo: true
    buildName: $(Build.DefinitionName)
    buildNumber: $(Build.BuildNumber)
    includeEnvVars: true

ArtifactoryGenericDownload not working in version 1.9.1

Please Help..
Log:

2020-04-23T14:16:48.2820183Z ##[debug]Evaluating condition for step: 'ArtifactoryGenericDownload'
2020-04-23T14:16:48.2822182Z ##[debug]Evaluating: SucceededNode()
2020-04-23T14:16:48.2822958Z ##[debug]Evaluating SucceededNode:
2020-04-23T14:16:48.2824097Z ##[debug]=> True
2020-04-23T14:16:48.2824817Z ##[debug]Result: True
2020-04-23T14:16:48.2825565Z ##[section]Starting: ArtifactoryGenericDownload
2020-04-23T14:16:48.2940275Z ==============================================================================
2020-04-23T14:16:48.2940750Z Task : Artifactory Generic Download
2020-04-23T14:16:48.2941440Z Description : Download artifacts from Artifactory using FileSpecs, while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
2020-04-23T14:16:48.2942071Z Version : 2.9.1
2020-04-23T14:16:48.2942383Z Author : JFrog
2020-04-23T14:16:48.2942707Z Help :
2020-04-23T14:16:48.2943081Z ==============================================================================
2020-04-23T14:16:48.4287478Z module.js:478
2020-04-23T14:16:48.4290551Z throw err;
2020-04-23T14:16:48.4291096Z ^
2020-04-23T14:16:48.4291531Z
2020-04-23T14:16:48.4292046Z Error: Cannot find module 'azure-pipelines-task-lib/task'
2020-04-23T14:16:48.4292678Z at Function.Module._resolveFilename (module.js:476:15)
2020-04-23T14:16:48.4293335Z at Function.Module._load (module.js:424:25)
2020-04-23T14:16:48.4293894Z at Module.require (module.js:504:17)
2020-04-23T14:16:48.4294438Z at require (internal/module.js:20:19)
2020-04-23T14:16:48.4295503Z at Object. (d:\a_tasks\ArtifactoryGenericDownload_07fc5c20-6772-11e5-abde-6901d3c00755\2.9.1\downloadArtifacts.js:1:74)
2020-04-23T14:16:48.4297572Z at Module._compile (module.js:577:32)
2020-04-23T14:16:48.4299049Z at Object.Module._extensions..js (module.js:586:10)
2020-04-23T14:16:48.4299774Z at Module.load (module.js:494:32)
2020-04-23T14:16:48.4300335Z at tryModuleLoad (module.js:453:12)
2020-04-23T14:16:48.4300941Z at Function.Module._load (module.js:445:3)
2020-04-23T14:16:48.4506254Z ##[error]Exit code 1 returned from process: file name 'C:\agents\2.166.3\externals\node\bin\node.exe', arguments '"d:\a_tasks\ArtifactoryGenericDownload_07fc5c20-6772-11e5-abde-6901d3c00755\2.9.1\downloadArtifacts.js"'.
2020-04-23T14:16:48.4522870Z ##[debug]Microsoft.VisualStudio.Services.Agent.Util.ProcessExitCodeException: Exit code 1 returned from process: file name 'C:\agents\2.166.3\externals\node\bin\node.exe', arguments '"d:\a_tasks\ArtifactoryGenericDownload_07fc5c20-6772-11e5-abde-6901d3c00755\2.9.1\downloadArtifacts.js"'.
at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.NodeHandler.RunAsync()
at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync()
at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
2020-04-23T14:16:48.4529021Z ##[section]Finishing: ArtifactoryGenericDownload

Set Working Directory from Artifactory Generic Upload Task

I have discovered an issue when wanting to upload a Folder structure from the Artifactory Generic Upload Task from Azure DevOps. When choosing not to have a flat structure so you preserve the folder hierarchy, it adds the entire filesystem path to your repo in Artifactory which is untidy.

Using the following file spec returns the result below:

{ "files": [ { "pattern": "C:\\agent\\_work\\3\\s\\Output\\build_agent_1_\\dqplus-help\\", "target": "docs-release-local/d3s-dq+/3.2.0/docs/", "flat": "false" } ] }

image

See above - i actually wanted all my folders to be under a folder heading of dqplus-help but i have no way of setting this as the working directory.

If i copy the exact commands from the log and run from the local Command Line on the build agent, i am able to set the working directory as C:\agent\work\3\s\Output\build_agent_1 change the file spec slightly and get the exact result i want by running the following command:

C:\agent\_work\_tool\jfrog\1.23.1\x64\jfrog.exe rt u --url="https://artifactory.companyname.com/artifactory" --spec="C:\temp\spec.json" --user=USERNAME --password=TOKEN --fail-no-op=true

{ "files": [ { "pattern": "dqplus-help\\*", "target": "docs-release-local/d3s-dq+/3.2.0/docs/", "flat": "false" } ] }

image

Generic JFrog CLI Task

Similar to other CLI tasks available in Azure DevOps, I see value in adding a JFrog CLI task that takes in an artifactory connection and allows you to run jfrog cli commands.

This allows for end users to have more control over their pipelines, rather than rely on the workflows that are established in the currently existing tasks.

Artifactory npm fails with minimum required version message

##[section]Starting: Artifactory npm install
==============================================================================
Task         : Artifactory npm
Description  : Install, pack and publish npm packages from and to Artifactory while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
Version      : 1.4.1
Author       : JFrog
Help         : [More Information](https://www.jfrog.com/confluence/display/RTF/Npm+Registry)
==============================================================================
Downloading: https://api.bintray.com/content/jfrog/jfrog-cli-go/1.23.1/jfrog-cli-windows-amd64/jfrog.exe?bt_package=jfrog-cli-windows-amd64
Caching tool: jfrog 1.23.1 x64
Running jfrog-cli from C:\Server\vstsagent\work\_tool\jfrog\1.23.1\x64\jfrog.exe.
JFrog CLI version: 1.23.1
[Info] Running npm Install.
[Error] This operation requires Artifactory version 5.5.2 or higher.
##[error]Error: Command failed: C:\Server\vstsagent\work\_tool\jfrog\1.23.1\x64\jfrog.exe rt npmi "npm" --url="https://hub.chemaxon.com/artifactory" --user=*** --password=***

Chemaxons artifactory has the following version:
image

So it should work.

Extra properties when uploading a nuget package

I'm trying to upload a nuget-package with ArtifactoryNuget task but can't find a way to add extra properties like $(Build.SourceVersion). Previously with deprecated jfrog-vso-extension it was possible.

Enable env vars in file spec

Hi guys,

I want to upload a created a zip archive called "$(System.TeamProjectId)_$(Build.BuildId).zip" with the Generic Upload task. Unfortunately I see no way to use variables in the json spec. "*.zip" doesn't work as my ArtifactsDirectory contains additional zips I don't want to upload.

Thank you in advance and
best regards,

Gereon

Go support

Looking at the available tasks, I'm not seeing an implementation for Go.

Support regexp=true for Windows

Hi Team,

It seems that starting with version 1.27.0 (was working with 1.26.2) we stopped supporting regexp=true for Windows as per commit:
6a99fb0

Are there plans to support regexp for Windows in the near future?

Thanks!

Build Promotion Task fails if an artifact exists twice in Build Info JSON

We have a problem with the build promotion task when we try to promote builds with docker artifacts. The problem arises when one artifact (layer) is referenced twice with build properties.

Setting properties step in Artifactory Docker Task (1.6.2) with collectBuildInfo:
artifactProperties

Corresponding Build Info JSON (duplicate entry):
buildinfojson

Docker Info in Artifactory (same sha256):
dockerinfo

Due to the duplicate, it is impossible to promote the build via the Build Promotion Task (or jfrog cli).
promotionfail

It is, however, possible to promote the build via REST-API (Build Promotion and Promote Docker Image both work).

There is also a RTFACT created on 08 Aug 2016 about this issue. https://www.jfrog.com/jira/browse/RTFACT-12087

Plugin doesn't work without /artifactory in the url path

So none of the task features (looking up feeds in artifactory or the verify even) work if you have removed the /artifactory from the url being used by artifactory. This causes the /api/plugin endpoint to fail because the url cannot be url//api/plugin.

Artifactory NPM publish doesnt work

I'm tried to publish artifact from Azure devops using Artifactory NPM task and command pack and publish, and have error, this fails from today.

Attach support image.

image

[Error] error parsing regexp: invalid escape sequence: `\1`

When I try to use the 'Artifactory NuGet push' I ran in the error below (similar to the issue #5 ).
If I modify the Path to NuGet package(s) to publish from '$(Build.ArtifactStagingDirectory)/*.nupkg' to the complete name of the package (i.e. $(Build.ArtifactStagingDirectory)/Module.$(FullVersion).nupkg) everything is ok.

Here are the logs:
2018-09-07T10:14:26.2810656Z ##[section]Starting: Artifactory NuGet push
2018-09-07T10:14:26.2819160Z ==============================================================================
2018-09-07T10:14:26.2820002Z Task : Artifactory Nuget
2018-09-07T10:14:26.2820679Z Description : Restore and push NuGet packages from and to Artifactory while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
2018-09-07T10:14:26.2821367Z Version : 1.1.0
2018-09-07T10:14:26.2821728Z Author : JFrog
2018-09-07T10:14:26.2822222Z Help : More Information
2018-09-07T10:14:26.2822783Z ==============================================================================
2018-09-07T10:14:27.3066415Z Running jfrog-cli from D:\vsts\agents\1_work_jfrog\current\jfrog.exe.
2018-09-07T10:14:42.3783116Z JFrog CLI version: 1.19.1
2018-09-07T10:14:42.4310653Z Collecting environment variables...
2018-09-07T10:14:46.4534661Z [Info] Collecting environment variables...
2018-09-07T10:14:46.4601282Z [Info] Collected environment variables for Scripts/20180907.8.
2018-09-07T10:14:46.5471874Z [Error] error parsing regexp: invalid escape sequence: \1
2018-09-07T10:14:46.5473961Z {
2018-09-07T10:14:46.5474986Z [Error] Upload finished with errors. Please review the logs
2018-09-07T10:14:46.5475423Z "status": "failure",
2018-09-07T10:14:46.5478208Z "totals": {
2018-09-07T10:14:46.5478926Z "success": 0,
2018-09-07T10:14:46.5479637Z "failure": 0
2018-09-07T10:14:46.5480215Z }
2018-09-07T10:14:46.5480859Z }
2018-09-07T10:14:46.5568056Z ##[error]Error: Command failed: D:\vsts\agents\1_work_jfrog\current\jfrog.exe rt u D:\vsts\agents\1_work\13\a*.nupkg repository/Scripts/20180907.8/Module/ --build-name="Scripts" --build-number="20180907.8" --url="http://artifactory.net/artifactory" --user=*** --password=***
2018-09-07T10:14:46.5572186Z Error: Command failed: D:\vsts\agents\1_work_jfrog\current\jfrog.exe rt u D:\vsts\agents\1_work\13\a*.nupkg repository/Scripts/20180907.8/Module/ --build-name="Scripts" --build-number="20180907.8" --url="http://artifactory.net/artifactory" --user=*** --password=***
2018-09-07T10:14:46.5734030Z ##[section]Finishing: Artifactory NuGet push

The backslashes of the Windows path on the server seems to not be correctly escaped.
Can you please check?

Artifactory Generic Download - Script error on TFS 2018u3

Hi,

I just tried to use the Artifactory Generic Download task in our build, but I get some javascript errors when the task is run. I used both version 1.* and version 2.* of the task.

Error for version 1.*:

2019-05-13T09:09:52.6424980Z ==============================================================================
2019-05-13T09:09:52.6447830Z Task         : Artifactory Generic Download
2019-05-13T09:09:52.6480710Z Description  : Download artifacts from Artifactory using FileSpecs, while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
2019-05-13T09:09:52.6513730Z Version      : 1.5.0
2019-05-13T09:09:52.6538660Z Author       : JFrog
2019-05-13T09:09:52.6563150Z Help         : 
2019-05-13T09:09:52.6596700Z ==============================================================================
2019-05-13T09:09:53.1299200Z /vsts/agent/_work/_tasks/ArtifactoryGenericDownload_07fc5c20-6772-11e5-abde-6901d3c00755/1.5.0/downloadArtifacts.js:10
2019-05-13T09:09:53.1333700Z     let buildDefinition = tl.getVariable('Build.DefinitionName');
2019-05-13T09:09:53.1360380Z     ^^^
2019-05-13T09:09:53.1369820Z 
2019-05-13T09:09:53.1393740Z SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
2019-05-13T09:09:53.1420480Z     at exports.runInThisContext (vm.js:53:16)
2019-05-13T09:09:53.1442510Z     at Module._compile (module.js:387:25)
2019-05-13T09:09:53.1461970Z     at Object.Module._extensions..js (module.js:422:10)
2019-05-13T09:09:53.1482440Z     at Module.load (module.js:357:32)
2019-05-13T09:09:53.1503090Z     at Function.Module._load (module.js:314:12)
2019-05-13T09:09:53.1526550Z     at Function.Module.runMain (module.js:447:10)
2019-05-13T09:09:53.1545690Z     at startup (node.js:146:18)
2019-05-13T09:09:53.1566350Z     at node.js:404:3

Version 2.*:

2019-05-13T09:08:40.8778690Z ==============================================================================
2019-05-13T09:08:40.8800730Z Task         : Artifactory Generic Download
2019-05-13T09:08:40.8825560Z Description  : Download artifacts from Artifactory using FileSpecs, while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
2019-05-13T09:08:40.8853230Z Version      : 2.5.0
2019-05-13T09:08:40.8874320Z Author       : JFrog
2019-05-13T09:08:40.8896700Z Help         : 
2019-05-13T09:08:40.8915820Z ==============================================================================
2019-05-13T09:08:41.3244970Z /vsts/agent/_work/_tasks/ArtifactoryGenericDownload_07fc5c20-6772-11e5-abde-6901d3c00755/2.5.0/downloadArtifacts.js:10
2019-05-13T09:08:41.3276200Z     let workDir = tl.getVariable('System.DefaultWorkingDirectory');
2019-05-13T09:08:41.3298620Z     ^^^
2019-05-13T09:08:41.3308060Z 
2019-05-13T09:08:41.3337300Z SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
2019-05-13T09:08:41.3362320Z     at exports.runInThisContext (vm.js:53:16)
2019-05-13T09:08:41.3381180Z     at Module._compile (module.js:387:25)
2019-05-13T09:08:41.3402900Z     at Object.Module._extensions..js (module.js:422:10)
2019-05-13T09:08:41.3424780Z     at Module.load (module.js:357:32)
2019-05-13T09:08:41.3445570Z     at Function.Module._load (module.js:314:12)
2019-05-13T09:08:41.3464840Z     at Function.Module.runMain (module.js:447:10)
2019-05-13T09:08:41.3486760Z     at startup (node.js:146:18)
2019-05-13T09:08:41.3505530Z     at node.js:404:3

Possible relevant information about the environment I am using:

  • TFS 2018 update 3: Version 16.131.28106.2
  • Agent version: 2.116.1
  • Agent os: Linux
  • Node.JS version: v8.11.2

Any idea what could have caused this issue and how it can be solved?

Azure DevOps Artifactory Downloads fails:

[Error] Post https:///artifactory/api/search/aql: EOF
[Error] Post https://
/artifactory/api/search/aql: EOF
{
"status": "failure",
"totals": {
"success": 0,
"failure": 0
}
}

jfrog.exe rt dl "" "C:\vsts\Agent\_work\r4\a/_Deployment%2520Tools/" --build="Deployment%2520Tools/Deployment%2520Tools-develop-20200115.2" --url="https:///artifactory" --flat=true --user=* --password=***

But while using next command with pre-configured jfrog-cli.conf it works:
.\jfrog.exe rt dl "<relative_path_in_artifactory>/Deployment_Tools/develop-42-35630.zip"

VSTS artifactory and artifact layout

Does the VSTS artifactory plugin support sending tokens for artifact layout ? This is an option in UI of artifactory. This is listed as Layout Tokens with org, module ,baseRev etc in Artifactory.

Artifactory Generic Upload - Add a target to the filepicker ui

Hey guys,
in your deprecated "JfrogArtifactDeployer", I had the opportunity to set the "Target Repository" and the file picker.

I migrated to the new plugin and need to write such custom json file for uploading my artifacts to a target repository in artifactory.

I think this is a retrogression to your old plugin.

[Error] error parsing regexp: invalid escape sequence: `\3`

I am using YAML templates and most projects work, there are some exceptions such as the below: i think its usually \1 and \3

Found tool in cache: jfrog 1.26.2 x64
Running jfrog-cli from G:\AzureDevOpsAgent-0_work_tool\jfrog\1.26.2\x64\jfrog.exe.
JFrog CLI version: 1.26.2
Using file spec:
{ "files": [ { "pattern": "G:\AzureDevOpsAgent-0\_work\39\a/Lodgement.Api-develop-20191021.4.zip", "target": "ADV-build/Podium/SalesTools/Lodgement.Api-develop/20191021.4/" } ] }
[Error] error parsing regexp: invalid escape sequence: \3
{
"status": "failure",
[Error] error parsing regexp: invalid escape sequence: \3
[Error] Upload finished with errors, Please review the logs.
"totals": {
"success": 0,
"failure": 0
}
}

Artifactory NuGet Restore not including local package cache

When using the Artifactory NuGet task with the restore command, the local cache is not being included as a source. This results in every package being downloaded on every execution, which is incredibly inefficient.

The logs for the Artifactory NuGet task show (values masked for privacy):

NuGet Config files used:
C:\Users\*\AppData\Local\Temp\jfrog.cli.751553911\jfrog.cli.nuget.343174762

Feeds used:
https://*/api/nuget/*_nuget

The standard NuGet task does properly include the local cache, and logs show (values masked for privacy):

NuGet Config files used:
D:\*\Agent1_work\16\Nuget\tempNuGet_8519.config

Feeds used:
C:\Users\*\.nuget\packages\
https://*/nuget/v3/index.json

The logs clearly show the local package cache is not being included by the Artifactory NuGet task. The checkbox on the task to "Disable local NuGet cache" appears to have no impact on the local cache being excluded.

TFS On-Prem 2018
JFrom Extension version 1.6.2

Restoring NuGet packages listed in packages.config seem broken in Nuget restore version 2

When using the build task Artifactory Nuget restore version 2.* with a packages.config file and we provide a destination directory or specify the complete path to the file in this field "Path to the root directory of the solution or to a file inside the root directory". - The restore command fails with the below exception

Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory.
System.InvalidOperationException: Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory.
   at NuGet.CommandLine.RestoreCommand.GetPackagesFolder(PackageRestoreInputs packageRestoreInputs)
   at NuGet.CommandLine.RestoreCommand.<PerformNuGetV2RestoreAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.CommandLine.RestoreCommand.<ExecuteCommandAsync>d__34.MoveNext()

While in version 1, it works as expected.

It seems like when working with version 1, we send the below command with the JFrog CLI:

C:\hostedtoolcache\windows\jfrog\1.35.3\x64\jfrog.exe rt nuget restore docker --solution-root="D:\a\1\s\nuget-example\multi-example\core" --nuget-args="-NoCache -PackagesDirectory D:\\a\\1\\s -Verbosity Detailed" --url="<ART-URL>" --user=*** --password=***

While with version 2 when we fail, we only send the below command without any arguments:
C:\hostedtoolcache\windows\jfrog\1.35.3\x64\jfrog.exe rt nuget restore -NoCache -Verbosity Detailed

It seems like if we manually pass the -PackagesDirectory argument with version 2, this fixes the issue.
It could be that the issue is not sending the complete arguments with the CLI when working with version 2

x509: certificate signed by unknown authority

This seems similar to already closed issue #44 But specifically I cannot get the agent to respect our company root cert (not self-signed).

I have added the root cert to ~/.jfrog/security for the user under which the agent is running and also to /path_to_agent/_work/_jfrog/.jfrog/security

I am not sure of the correct format for the root cert so I've added the .cer, .pem and .der.

As far as I can tell the CLI is Go and Go should respect the keychain anyway (the root cert is added to the keychain and always trusted).

Regardless of what I do I get the error: x509: certificate signed by unknown authority.

Version 1.6.2
jfrog CLI version: 1.26.2

Full log with some info redacted:

2019-10-11T01:28:04.5299030Z ##[section]Starting: Build from pom
2019-10-11T01:28:04.5680390Z ==============================================================================
2019-10-11T01:28:04.5704160Z Task         : Artifactory Maven
2019-10-11T01:28:04.5728050Z Description  : Build with Apache Maven, while resolving dependencies and deploying artifacts from and to Artifactory and while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
2019-10-11T01:28:04.5752020Z Version      : 1.6.2
2019-10-11T01:28:04.5774050Z Author       : JFrog
2019-10-11T01:28:04.5796460Z Help         : [More Information](https://www.jfrog.com/confluence/display/RTF/Maven+Repository)
2019-10-11T01:28:04.5819440Z ==============================================================================
2019-10-11T01:28:05.2173040Z Found tool in cache: jfrog 1.26.2 x64
2019-10-11T01:28:05.2207650Z Running jfrog-cli from /Users/robin/Downloads/vstsagent/_work/_tool/jfrog/1.26.2/x64/jfrog.
2019-10-11T01:28:05.2816500Z JFrog CLI version: 1.26.2
2019-10-11T01:28:05.2852730Z M2_HOME is not defined. Retrieving Maven home using mvn --version.
2019-10-11T01:28:05.7536900Z The Maven home location: /usr/local/Cellar/maven/3.3.9/libexec
2019-10-11T01:28:05.7712390Z [Info] Encrypting password...
2019-10-11T01:28:05.7726620Z
2019-10-11T01:28:06.2294260Z [Error] Get https://webappartifactory.asbbank.co.nz/artifactory/api/security/encryptedPassword: x509: certificate signed by unknown authority
2019-10-11T01:28:06.2431360Z ##[error]Error: Command failed: /Users/**********/vstsagent/_work/_tool/jfrog/1.26.2/x64/jfrog rt c --url="https://********************/artifactory" --user=*** --password=***
2019-10-11T01:28:06.2536110Z [Info] "****************-deployer" configuration could not be found.
2019-10-11T01:28:06.2636290Z [Info] "undefined" configuration could not be found.
2019-10-11T01:28:06.2691110Z Collecting environment variables...
2019-10-11T01:28:06.2806980Z [Info] Collecting environment variables...
2019-10-11T01:28:06.2861250Z [Info] Collected environment variables for *************************
2019-10-11T01:28:06.3791860Z ##[section]Finishing: Build from pom

Howto overwrite BuildName TFS/VSTS

Hi
If we publish build Informations we do not have the possibility to change the Name of the Build Definition. The tasks always uses Build.DefinitionName
Is there a possibility to change this behavior?
Thanks
Martin

Invalid character 'A' in string escape code

We are trying to use the Generic Upload task to upload to Artifactory and are always met with an error. Our agent is running on a Windows server.

Our file spec is below:
{
"files": [
{
"pattern": "$(Build.SourcesDirectory)\ci-utils\pom.xml",
"target": "libs-release-local/test/"
}
]
}

When the variable is expanded, our file spec looks like this:
{
"files": [
{
"pattern": "E:\Agents\11_work\331\s\ci-utils\pom.xml",
"target": "libs-release-local/test/"
}
]
}

When we execute this build, the Artifactory step fails with the error:

invalid character 'A' in string escape code

It seems that the task assumes that the agent may be running on a Linux host and cannot properly handle Windows paths.

Add Proxy Support

We use an on-prem Artifactory Enterprise instance, so a lot of our VSTS builds/releases execute on VSTS agents running on-prem (within our corporate network) as well.

Several of the tasks in this extension attempt to download the CLI if it does not already exist, which is done by the downloadCli function in task-utils lib, here specifically. However, the download attempts fail on our private/on-prem VSTS agent because that request does not utilize the HTTP Proxy environment variables (which are correctly set on all our build servers) like most VSTS tasks do. Many VSTS tasks use the request lib to make http requests which honors those environment variables, but I do not believe the request-promise-lite lib being used by the task-lib does.

I know we can work around this (temporarily) by manually downloading the CLI and adding it to the workspace directory (for each agent, for each build server), but this isn't a viable long term approach.

Please consider adding Proxy support so that the CLI can be downloaded on-demand from private/on-premise VSTS agents as well.

x509: certificate signed by unknown authority error when windows agent is used

Connecting to our artifactory causes a Certificate Error: x509: certificate signed by unknown authority when using a windows agent (I use windows latest). But it works with the Ubuntu agent (ubuntu-latest).

There have been similar issues (e.g. 44 and 88) raised and closed previously, but the problem is still very much alive.

Regards,
Dominic Buschi

Artifactory Discard build task fails after upgrading to 1.7.0 -- strconv.Atoi: parsing "undefined": invalid syntax

Our builds used to finish successfully until we upgraded the TFS Artifactory extension to 1.7.0

Artifactory server is version 6.10.1

2019-11-04T21:54:42.9006504Z ##[section]Starting: Artifactory Discard old Builds
2019-11-04T21:54:42.9012883Z ==============================================================================
2019-11-04T21:54:42.9013470Z Task : Artifactory Discard Builds
2019-11-04T21:54:42.9014032Z Description : Discard old builds from Artifactory.
2019-11-04T21:54:42.9014511Z Version : 1.7.0
2019-11-04T21:54:42.9014971Z Author : JFrog
2019-11-04T21:54:42.9015413Z Help :
2019-11-04T21:54:42.9015910Z ==============================================================================
2019-11-04T21:54:43.6797911Z Running jfrog-cli from c:\agent\w1_jfrog\current\jfrog.exe.
2019-11-04T21:54:43.7246804Z JFrog CLI version: 1.26.0
2019-11-04T21:54:43.7892229Z [Info] Discarding builds...
2019-11-04T21:54:43.7893461Z [Error] strconv.Atoi: parsing "undefined": invalid syntax
2019-11-04T21:54:43.7986137Z ##[error]Error: Command failed: c:\agent\w1_jfrog\current\jfrog.exe rt bdi "XXXXXXXXXXX" --url="https://XXXXXXXX/" --user=******** --password=*** --delete-artifacts=true --async=true
2019-11-04T21:54:43.8130573Z ##[section]Finishing: Artifactory Discard old Builds

NuGet support is not available on Linux hosts

Is it possible to add support for NuGet operations when using Linux hosts? We're using .Net Core on Linux extensively, so this would be a big win for us. Looking at the code, it seems like it should be possible using the .Net Core/NuGet CLI for Linux.

Artifactory Docker pull task fails

Artifactory Docker pull task fails with the following error

"no matching manifest for unknown in the manifest list entries"

Please review the attached log file for the entire log trace. The CLI version installed was 1.23.1.

Tried the same command on a windows server with the same version of CLI, it works without any issues. Hence it does not look like its an issue with the CLI.

Looks like its an issue with the agent pool.

The issue occurs on using the agent Pool: Hosted VS2017. However, it works fine with agent pool: Hosted ubuntu 1604

dockertask.log

Jfrog Artifactory plugin not handling Windows paths by default

Hi,

I'm using JFrog Artifactory plugin 1.0.4 in VSTS.

I've experienced that plugin is not handling windows paths with spaces and backslashes.

In following example plugin failed to reach JFrog CLI because VSTS Agent has been installed inside D:\Program Files directory and space inside path seems to be the problem. There is rather no way around it different than moving Agent to another directory.

2018-08-13T06:55:38.0646094Z ==============================================================================
2018-08-13T06:55:38.0646782Z Task         : Artifactory Generic Upload
2018-08-13T06:55:38.0647522Z Description  : This task uploads generic build artifacts to Artifactory
2018-08-13T06:55:38.0648228Z Version      : 1.0.4
2018-08-13T06:55:38.0648794Z Author       : JFrog
2018-08-13T06:55:38.0649553Z Help         : Upload artifacts to JFrog Artifactory using FileSpecs.
2018-08-13T06:55:38.0650392Z ==============================================================================
2018-08-13T06:55:38.7828406Z Running jfrog-cli from D:\Program Files\VSTSagents\Agent01\_work\_jfrog\1.17.1\jfrog.exe.
2018-08-13T06:55:38.7985155Z 'D:\Program' is not recognized as an internal or external command,
2018-08-13T06:55:38.7986543Z operable program or batch file.
2018-08-13T06:55:38.7990966Z Failed to get JFrog CLI version: Error: Command failed: D:\Program Files\VSTSagents\Agent01\_work\_jfrog\1.17.1\jfrog.exe --version
2018-08-13T06:55:38.7992054Z 'D:\Program' is not recognized as an internal or external command,
2018-08-13T06:55:38.7992809Z operable program or batch file.
2018-08-13T06:55:38.7993308Z 
2018-08-13T06:55:38.8027563Z Using file spec:
2018-08-13T06:55:38.8028125Z {
2018-08-13T06:55:38.8028585Z   "files": [
2018-08-13T06:55:38.8029053Z     {
2018-08-13T06:55:38.8029696Z       "pattern": "D:\\Program Files\\VSTSagents\\Agent01\\_work\\1\\a\\*.nupkg",
2018-08-13T06:55:38.8030463Z       "target": "nuget/Schroders/DevOpsEnablers/HelloVstsPoc/"
2018-08-13T06:55:38.8031048Z     }
2018-08-13T06:55:38.8031467Z   ]
2018-08-13T06:55:38.8031891Z }
2018-08-13T06:55:38.8134320Z 'D:\Program' is not recognized as an internal or external command,
2018-08-13T06:55:38.8135051Z operable program or batch file.

The same problem is related to paths in the configuration JSON. It's not big deal to carefully escape every space and backslash in the path when is typed into configuration by hand, but if we would like to use VSTS build variables (where spaces and backslashes aren't escaped), it result with necessity of adding additional script task to the pipeline to prepare such path containing variable to be used with the plugin (escaping spaces and backslashes).

It seems quite reasonable to handle it like old plugin does.

Artifactory Gradle Task

Similar to our offerings for NPM, Docker, Maven, Go, etc, it would be ideal to have a Gradle Task as well to allow for the gathering of Build Info on Gradle builds.
Since the JFrog CLI offers build commands for Gradle, and being that the Tools Task takes care of the Maven Extractor dependency, this would fit in really well with the existing tasks.

Currently the workaround is to create a POM from the Gradle build and use the Maven Task to collect dependency information.

Installation fails on TFS 2018

I am trying to install the extension version 1.4.1 on Team Foundation Server 2018 RTW (version 16.122.27102.1) but it fails with the following message:

Something's gone wrong
Following errors were found in artifact contribution:defaultVersionType is not supported for Artifact source contribution.

I have tried on two different instances of TFS 2018, both give the same error.

performArtifactSourceDownload silently fails on v1.8.1

When using the Artifactory Artifact Type in an AZDO release pipeline, the 'Downoad Artifacts' task silently fails (successfully downloads nothing) with extension v1.8.1 when leveraging the Artifactory 'Publish Build Info' task as part of the build:

2019-12-04T16:10:53.7727212Z Running jfrog-cli from D:\tfs-digitalbuild1_work_tool\jfrog\1.31.2\x64\jfrog.exe.
2019-12-04T16:10:53.7727394Z JFrog CLI version: 1.31.2
2019-12-04T16:10:53.7727796Z Artifact source download...
2019-12-04T16:10:53.9808588Z {
2019-12-04T16:10:53.9815104Z "status": "success",
2019-12-04T16:10:53.9816525Z "totals": {
2019-12-04T16:10:53.9820174Z "success": 0,
2019-12-04T16:10:53.9820688Z "failure": 0
2019-12-04T16:10:53.9820838Z }
2019-12-04T16:10:53.9820933Z }

It appears to be failing because the buildName parameter passed to the jfrog cli has a leading slash. This commit seemed to remove that sanitization:

bba1f32#diff-cd9d1e660edb561afa7a3eddfcb351ba

I have submitted a PR to the dev branch to reintroduce the fix.

#114

Getting Status 403 when "Collect Build Info" is not "true"

Hey guys,
we are getting a 403 on the generic upload task in Azure Pipelines if we don´t se "Collect Build Info"

Log:

Starting: Generic upload

Task : Artifactory Generic Upload

Description : Upload build artifacts to Artifactory using FileSpecs while allowing to collect build-

info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build

Info" task.

Version : 1.7.4

Author : JFrog
Help :

Found tool in cache: jfrog 1.30.3 x64
Running jfrog-cli from d:\a_tool\jfrog\1.30.3\x64\jfrog.exe.
JFrog CLI version: 1.30.3
Using file spec:
{
"files": [
{
"pattern": "d:\a\1\a/xxxx.zip",
"target": "xxxxx"
}
]
}
[Info] [Thread 2] Uploading artifact: d:\a\1\a\xxxx.zip
[Error] [Thread 2] Artifactory response: 403 Forbidden
{
"status": "failure",
{
"totals": {
"errors": [
"success": 0,
{
"failure": 1
"status": 403,
}
"message": ""
}
}
]
}
[Error] Failed uploading 1 artifacts.
##[error]Error: Command failed: d:\a_tool\jfrog\1.30.3\x64\jfrog.exe rt u --url="https://xxxx" --spec="d:\a\1\s\uploadSpec1573232531243.json" --user=*** --password=*** --fail-no-op=true
Finishing: Generic upload

x509: certificate signed by unknown authority

So when using the extension I am getting the "x509: certificate signed by unknown authority" error. At the same time if I login to the box I can run the command line version that matches and it works fine? Seems like the extension is doing something to prevent the .jfrog folder next to the jfrog.exe from being read and also does not seem to interpret JFROG_CLI_HOME.

Empty Principal information

Hi
The build build info Task does not publish the Principal information
image

Old Version was fine:
image

Could you please fix this. Thanks
Martin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.