I am working on a large project. I need to publish several Angular libraries whose code is in Azure DevOps to JFrog Artifactory.
From previous developers, I found the task: ArtifactoryNpm@2 command in pipeline YAML file, which publishes a package to JFROG using command: 'pack and publish'. This works if you need to package and publish from the root directory. In Angular, libraries are created in the subdirectory projects/library-name, which breaks the behavior I want.
My attempts to link to folder or a .tgz file like command:
'publish $(Build.SourcesDirectory)/projects/library-name'
were also unsuccessful.
I have asked the developers for a detailed description of this task, but did not find any help from them.
Link here https://github.com/jfrog/artifactory-azure-devops-extension/issues/209
If you've had a similar experience, let me know how you resolved this issue.
You can check the json file in source code of this task in the following link:
https://github.com/jfrog/artifactory-azure-devops-extension/blob/master/tasks/ArtifactoryNpm/Ver2/task.json
There is an argument named
workingFolder
, which path to the folder containing the targetpackage.json
and.npmrc
files. Select the folder, not the file e.g./packages/mypackage
. You can addworkingFolder
argument in your YAML file.