Skip to content

Conversation

@mbrousset-ledger
Copy link
Contributor

  • 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

label "public-ledgerhq-shared-small" is non default and might be a self-hosted runner.
Comment on lines 37 to 25
description: If the npm package should be pushed on Ledger Jfrog or not.
Ignored if `publish` is `false`.
Copy link
Contributor

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 ?

Copy link
Contributor Author

@mbrousset-ledger mbrousset-ledger Dec 23, 2025

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.

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@mbrousset-ledger mbrousset-ledger Dec 23, 2025

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 ?

@tdejoigny-ledger
Copy link
Contributor

@mbrousset-ledger readme.md and docs/usage.md will have to be updated

@mbrousset-ledger mbrousset-ledger force-pushed the mbr/reusable-workflow-jfrog-npm branch 2 times, most recently from a81c4bf to 0f54d62 Compare December 23, 2025 10:34
@mbrousset-ledger mbrousset-ledger force-pushed the mbr/reusable-workflow-jfrog-npm branch from 0f54d62 to 01024b8 Compare December 23, 2025 10:39
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

label "public-ledgerhq-shared-small" is non default and might be a self-hosted runner.
Comment on lines 37 to 25
description: If the npm package should be pushed on Ledger Jfrog or not.
Ignored if `publish` is `false`.

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.

…/ledger-app-workflows into mbr/reusable-workflow-jfrog-npm
@ledger-wiz-cspm-secret-detection

Wiz Scan Summary

Scanner Findings
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 4 Medium 2 Info
SAST Finding SAST Findings -
Software Supply Chain Finding Software Supply Chain Findings -
Total 4 Medium 2 Info

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Copy link
Contributor

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`.
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants