-
Notifications
You must be signed in to change notification settings - Fork 9
add reusable_deployment_npm.yml (build + jfrog login) #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
mbrousset-ledger
commented
Dec 22, 2025
- reusable workflow to deploy npm package on jfrog
| jobs: | ||
| package_and_deploy: | ||
| name: Build and deploy a npm Package | ||
| runs-on: public-ledgerhq-shared-small |
Check failure
Code scanning / octoscan
label "public-ledgerhq-shared-small" is non default and might be a self-hosted runner. Error
| description: If the npm package should be pushed on Ledger Jfrog or not. | ||
| Ignored if `publish` is `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so how can I publish on Jfrog but not on npm ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I thought it would be possible as reusable_pypi_deployment.yml has two separate parameters to handle package deployment : jfrog_deployment and publish. Looks like there is no underlying logic using these parameters to deploy on jfrog and avoid publishing on pypi.
I let @AEnguerrand confirm but i don't think it is possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first it would good to understand if we need this use case when we publish on JFrog and not on npmjs.
For @ledgerhq/ledger-bitcoin we do not seem to need it.
If we do finally then we may consider using 2 different registries for it: green and public ones.
Today the logic in this script checks if a package is already present and it it is then it does not push at all.
Nevertheless I do not understand why this run has pushed @ledgerhq/ledger-bitcoin to JFrogh, but not to https://www.npmjs.com/search?q=%40ledgerhq%2Fledger-bitcoin. Could you explain ?
Also, the mention of publish parameter should be removed from the description if it is not used anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree with your suggestion (having green and public registries), especially since this reusable workflow has a parameter to specify on which registry the package should be pushed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it wasn't published on npmjs.com, i'm wondering if @AEnguerrand enabled jfrog/npmjs sync ?
|
@mbrousset-ledger |
a81c4bf to
0f54d62
Compare
0f54d62 to
01024b8
Compare
| jobs: | ||
| package_and_deploy: | ||
| name: Build and deploy a npm Package | ||
| runs-on: public-ledgerhq-shared-small |
Check failure
Code scanning / octoscan
label "public-ledgerhq-shared-small" is non default and might be a self-hosted runner. Error
| description: If the npm package should be pushed on Ledger Jfrog or not. | ||
| Ignored if `publish` is `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first it would good to understand if we need this use case when we publish on JFrog and not on npmjs.
For @ledgerhq/ledger-bitcoin we do not seem to need it.
If we do finally then we may consider using 2 different registries for it: green and public ones.
Today the logic in this script checks if a package is already present and it it is then it does not push at all.
Nevertheless I do not understand why this run has pushed @ledgerhq/ledger-bitcoin to JFrogh, but not to https://www.npmjs.com/search?q=%40ledgerhq%2Fledger-bitcoin. Could you explain ?
Also, the mention of publish parameter should be removed from the description if it is not used anymore.
951915d to
6ff5f46
Compare
6ff5f46 to
6abc44e
Compare
…/ledger-app-workflows into mbr/reusable-workflow-jfrog-npm
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/uage.md should be updated also 😉
|
|
||
| - `reusable_npm_deployment.yml` \ | ||
| This workflow will build, check and deploy an npm package. This workflow is optional and is meant | ||
| to help developers to deploy application npm clients on `Ledger Jfrog` and `npmjs.com`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the workflow only deploy on Ledger Jfrog, no?