jfrog-azure-devops-extension icon indicating copy to clipboard operation
jfrog-azure-devops-extension copied to clipboard

[email protected] with JFrog CLI 2.56.0?

Open VictorRos opened this issue 10 months ago • 1 comments

Hello!

In my Team we are using JFrogNPM@1 to pack and publish NPM libraries.

Task is failing in version 1.9.4 but works fine before that. In version 1.9.4, JFrog CLI is 2.54.0.

I have this output when JFROG_CLI_LOG_LEVEL is set to DEBUG.

##[section]Starting: Pack and publish (staging)
==============================================================================
Task         : JFrog 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 "JFrog Publish Build Info" task.
Version      : 1.9.4
Author       : JFrog
Help         : [More Information](https://github.com/jfrog/jfrog-azure-devops-extension#JFrog-npm-Task)
==============================================================================
Found tool in cache: jf 2.54.0 x64
Running jfrog-cli from /agent/_work/_tool/jf/2.54.0/x64/jf
JFrog CLI version: 2.54.0
Executing JFrog CLI Command:
/agent/_work/_tool/jf/2.54.0/x64/jf c add "repository - NPM publish_20240416.8_npmpack and publish_deployer_1713290303610" --artifactory-url="https://company.jfrog.io/company" --interactive=false --access-token-stdin
17:58:23 [Debug] JFrog CLI version: 2.54.0
17:58:23 [Debug] OS/Arch: linux/amd64
17:58:23 [Debug] Using access-token provided via Stdin
17:58:23 [Debug] Locking config file to run config AddOrEdit command.
17:58:23 [Debug] Creating lock in: /home/AzDevOps/.jfrog/locks/config
17:58:23 [Debug] Releasing lock: /home/AzDevOps/.jfrog/locks/config/jfrog-cli.conf.lck.47268.1713290303620839471
17:58:23 [Debug] Config AddOrEdit command completed successfully. config file is released.
Executing JFrog CLI Command:
/agent/_work/_tool/jf/2.54.0/x64/jf c use "repository - NPM publish_20240416.8_npmpack and publish_deployer_1713290303610"
17:58:23 [Debug] JFrog CLI version: 2.54.0
17:58:23 [Debug] OS/Arch: linux/amd64
17:58:23 [Debug] Locking config file to run config Use command.
17:58:23 [Debug] Creating lock in: /home/AzDevOps/.jfrog/locks/config
17:58:23 [Info] Using server ID 'repository - NPM publish_20240416.8_npmpack and publish_deployer_1713290303610' (https://company.jfrog.io/company/)
17:58:23 [Debug] Releasing lock: /home/AzDevOps/.jfrog/locks/config/jfrog-cli.conf.lck.47274.1713290303630499127
17:58:23 [Debug] Config Use command completed successfully. config file is released.
Executing JFrog CLI Command:
/agent/_work/_tool/jf/2.54.0/x64/jf npmc --server-id-deploy="repository - NPM publish_20240416.8_npmpack and publish_deployer_1713290303610" --repo-deploy="registry-npm-staging"
17:58:23 [Debug] JFrog CLI version: 2.54.0
17:58:23 [Debug] OS/Arch: linux/amd64
17:58:23 [Info] npm build config successfully created.
Executing JFrog CLI Command:
/agent/_work/_tool/jf/2.54.0/x64/jf npm p
17:58:23 [Debug] JFrog CLI version: 2.54.0
17:58:23 [Debug] OS/Arch: linux/amd64
17:58:23 [Debug] Using npm executable: /agent/_work/_tool/node/20.12.1/x64/bin/npm
17:58:23 [Debug] Running 'npm --version' command.
17:58:23 [Debug] npm '--version' standard output is:
10.5.1
17:58:23 [Debug] Preparing to read the config file /agent/_work/3/repository/.jfrog/projects/npm.yaml
17:58:23 [Debug] Found deployer in the config file /agent/_work/3/repository/.jfrog/projects/npm.yaml
17:58:23 [Info] Running npm Publish
17:58:23 [Debug] Working directory set to: /agent/_work/3/repository
17:58:23 [Debug] Reading Package Json.
17:58:23 [Debug] Usage Report: Sending info...
17:58:23 [Debug] Sending HTTP GET request to: https://company.jfrog.io/company/api/repositories/registry-npm-staging
17:58:23 [Debug] Sending HTTP GET request to: https://company.jfrog.io/company/api/system/version
17:58:23 [Debug] Setting Package Info.
17:58:23 [Debug] Creating npm package.
17:58:23 [Debug] Artifactory response: 200 
17:58:23 [Debug] JFrog Artifactory version is: 7.82.2
17:58:23 [Debug] Sending HTTP POST request to: https://company.jfrog.io/company/api/system/usage
npm notice 
npm notice 📦  @product/[email protected]
npm notice === Tarball Contents === 
npm notice 46B   LICENSE        
npm notice 2.0kB README.md      
npm notice 0B    dist/index.d.ts
npm notice 24B   dist/index.js  
npm notice 2.4kB package.json   
npm notice === Tarball Details === 
npm notice name:          @product/package-name                  
npm notice version:       1.1.17-alpha2                           
npm notice filename:      product-package-name-1.1.17-alpha2.tgz 
npm notice package size:  2.1 kB                                  
npm notice unpacked size: 4.6 kB                                  
npm notice shasum:        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
npm notice integrity:     sha512-G/YKOovKb4IfW[...]muFXURiNrKV/g==
npm notice total files:   5                                       
npm notice 
17:58:24 [Debug] Deploying npm package.
17:58:24 [Debug] Extracting info from npm package: [/agent/_work/3/repository/> @product/[email protected] prepare /agent/_work/3/repository/> bash scripts/prepare.sh /agent/_work/3/repository /agent/_work/3/repository/Do not run husky in pipeline /agent/_work/3/repository/product-package-name-1.1.17-alpha2.tgz]
{
  "status": "failure",
  "totals": {
    "success": 0,
    "failure": 0
  }
}
17:58:24 [Error] open /agent/_work/3/repository/> @product/[email protected] prepare: no such file or directory
remove /agent/_work/3/repository/> @product/[email protected] prepare: no such file or directory
##[error]Error: Command failed: /agent/_work/_tool/jf/2.54.0/x64/jf npm p
Executing JFrog CLI Command:
/agent/_work/_tool/jf/2.54.0/x64/jf c remove "repository - NPM publish_20240416.8_npmpack and publish_deployer_1713290303610" --quiet
17:58:24 [Debug] JFrog CLI version: 2.54.0
17:58:24 [Debug] OS/Arch: linux/amd64
17:58:24 [Debug] Locking config file to run config Delete command.
17:58:24 [Debug] Creating lock in: /home/AzDevOps/.jfrog/locks/config
17:58:24 [Debug] Releasing lock: /home/AzDevOps/.jfrog/locks/config/jfrog-cli.conf.lck.47319.1713290304429550716
17:58:24 [Debug] Config Delete command completed successfully. config file is released.
##[section]Finishing: Pack and publish (staging)

Notes:

  • Data have been rendered anonymous (company, product, repository, package name)
  • We use a NPM script prepare to init Husky on local machines but not in pipeline

I didn't post it as a "bug" because I saw a fix about tarball in JFrog CLI 2.56.0 that may fix this problem.

Our temporary solution is to change JFrogNPM@1 to [email protected].

My question, when [email protected] with JFrog CLI 2.56.0 would be available?

EDIT: Change JFrog CLI version from 2.55.0 to 2.56.0

VictorRos avatar Apr 16 '24 18:04 VictorRos

Hi @VictorRos , Sorry for the inconvenience caused by this issue. The regression is in 2.54.0, and the issue should be completely fixed in 2.56.0. We plan to release a new extension with the latest CLI in the upcoming days. Note that you can install a custom JFrog CLI version in the meantime using the Tools Installer Task.

RobiNino avatar Apr 17 '24 09:04 RobiNino

Hi @VictorRos , Extension version 2.9.5 was just released and sets the default JFrog CLI version to 2.56.1. Sorry for the delay in releasing it. We'd appreciate your feedback for it.

RobiNino avatar May 12 '24 06:05 RobiNino

Hi @RobiNino I confirmed it's working again. We removed the task JFrogToolsInstaller@1 we added temporarily to install JFrogCLI in version 2.56.0, to let JFrogNPM@1 installed version 1.9.5 and its JFrogCLI in version 2.56.1. I will close the issue. Thanks for the help for the temporary solution.

VictorRos avatar May 21 '24 13:05 VictorRos