Configure Renovate to Manage SHA-Pinned Dependencies for Multiple Packages in a Monorepo #33627
Replies: 1 comment
-
We were able to figure out the config.
Closing this discussion here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How are you running Renovate?
A Mend.io-hosted app
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
No response
Please tell us more about your question or problem
Body:
### Description
I'm managing a GitHub monorepo, which contains multiple sub-projects/packages managed with Lerna and pnpm. Each sub-package is released independently, and downstream applications pin their dependencies to the specific commit SHAs of these releases.
### Current Setup
Monorepo Structure:
ghaccount/shared-security
security-actions-semgrep
security-actions-sign-docker-image
code-check-action-rust-lint
Downstream Application GH Workflow Example:
### Renovate Configuration Attempt
I've attempted to configure Renovate to handle SHA-pinned dependencies for each sub-package using a custom (regex) manager. Here's the current
renovate.json
:Another version of the Renovate config file to adjust specifically for SHAs.
### Issues Encountered
Incorrect SHA Updates: Even after configuring Renovate to track SHAs using the
github-tags
datasource, Renovate raises PRs that update to the latest commit SHA of the repository, not the commit SHA corresponding to the specific sub-package release.Existing release of a package
Security-actions-semgrep_2.0.0 SHA 4fe74ae4ae
Security-actions-semgrep_2.1.0 SHA 36e74a5000
Security-actions-sign-docker-image_3.0.0 SHA 66674ae443
Downstream application pinned SHA
`- uses: ghaccount/shared-security/security-actions/semgrep@4fe74ae4ae…. #2.0.0
`
`
- uses: ghaccount/shared-security/security-actions/sign-docker-image@66674ae443…. #3.0.0
`
Now if a new release is made for semgrep, lets say a minor release 2.2.0.
Security-actions-semgrep_2.2.0 SHA 8ge37ghe0
Renovate goes ahead and raises a PR for all the downstream packages which are being used with the latest release of semgrep SHA digest that is
8ge37ghe0.
Meaning a PR is raised forsign-docker-image@8ge37ghe0
as well.### Desired Behavior
Package-Level Updates: Renovate should only raise PRs for a specific sub-package when a new release/tag is created for that sub-package.
SHA Pinning: Downstream applications should continue to pin to the exact commit SHA corresponding to the latest release of each specific sub-package, not to the latest commit of the entire monorepo.
### What I've Tried
customManagers
: I attempted to use customManagers regex.packageName
andcurrentValue
, but Renovate either raises errors or updates to incorrect SHAs.### Request for Assistance
### Additional Information
### Example Tagging
When releasing
security-actions-semgrep_5.2.0
, a Git tag likesecurity-actions-semgrep_5.2.0
is created, pointing to commit4fe74ae4aeeaad36d0ad768e1079beba00000000
.### Summary
I aim to have Renovate intelligently manage SHA-pinned dependencies for each sub-package within my monorepo, ensuring that only relevant PRs are raised when specific sub-packages are updated. Current configurations causes Renovate to misbehave. Assistance in achieving this setup would be greatly appreciated.
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions