jfrog / jfrog-azure-devops-extension

Apache License 2.0
46 stars 61 forks source link

ArtifactoryNpm@2 'pack and publish' package within a monorepo of yarn workspaces? #466

Open ghost opened 6 months ago

ghost commented 6 months ago

(Where is the documentation for Azure DevOps "ArtifactoryNpm@2" task?)

In a Yarn workspaces monorepo, the root workspace is necessarily private and not publishable.

I have:

as a CI bash script, I could just run yarn workspace @my/lib npm publish but the CI agent doesn't have the credentials there. I assume we need to use the specialized ArtifactoryNpm@2 yaml pipeline task, but I can't find documentation/examples/discussions/bugs about how this should be accomplished. I'm not even sure this is the right github repo to ask about this. Any help, please?

JasonKleban commented 6 months ago

This kinda works, except the guess of arguments: '--tag next' is ineffective

- task: ArtifactoryNpm@2
  inputs:
    command: 'pack and publish'
    artifactoryService: 'Artifactory'
    workingFolder: "lib/"
    arguments: '--tag next'
    targetRepo: 'jfroggy'
  displayName: Publish Next