Skip to content
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

feat(sbt-package): Fallback to Maven datasource for GitLab packages #16817

Merged
merged 9 commits into from Aug 1, 2022

Conversation

zharinov
Copy link
Collaborator

Changes

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@zharinov zharinov requested a review from viceice July 27, 2022 16:16
@zharinov zharinov requested a review from viceice July 27, 2022 16:42
@zharinov zharinov dismissed a stale review via bcd03e6 August 1, 2022 06:26
@zharinov zharinov requested a review from viceice August 1, 2022 06:56
@zharinov
Copy link
Collaborator Author

zharinov commented Aug 1, 2022

@sschoebinger Please, check this out again

@sschoebinger
Copy link

@sschoebinger Please, check this out again

I have tested it with my private gitlab and it seems that the gitlab detection is working but now the authorisation with my hostRules config seems not to work anymore.

config

"hostRules": [
    {
      "hostType": "maven",
      "matchHost": "gitlab.privatedomain.com",
      "token": "...",
      "authType": "Bearer"
    }
  ]

logs

DEBUG: Dependency lookup unauthorized. Please add authentication with a hostRule (repository=user1/test-renovate)
       "failedUrl": "https://gitlab.privatedomain.com/api/v4/projects/1117/packages/maven/com/example/scala-base-lib_2.13/maven-metadata.xml"

I also checked that the token which I use still works with curl.

Let me know if you see any problem with my config. I dig a bit deeper now to see what is the problem.

@zharinov
Copy link
Collaborator Author

zharinov commented Aug 1, 2022

Can you please change maven to sbt for hostType?

@viceice
Copy link
Member

viceice commented Aug 1, 2022

config

"hostRules": [
    {
      "hostType": "maven",
      "matchHost": "gitlab.privatedomain.com",
      "token": "...",
      "authType": "Bearer"
    }
  ]

remove "authType": "Bearer", it's the default value.

@sschoebinger
Copy link

ok, now it worked with both public and private gitlab package registry 🥳

this is my config.js file

module.exports = {
  endpoint: "https://gitlab.privatedomain.com/api/v4/",
  platform: "gitlab",
  repositories: ["user1/test-renovate"],
  "hostRules": [
    {
      "hostType": "sbt",
      "matchHost": "gitlab.privatedomain.com",
      "token": "..."
    }
  ]
};

@zharinov zharinov requested a review from viceice August 1, 2022 10:55
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? Why approval again? it's still approved.

@viceice viceice enabled auto-merge (squash) August 1, 2022 10:59
@viceice viceice merged commit 765a763 into renovatebot:main Aug 1, 2022
@viceice viceice deleted the feat/sbt-package-gitlab-fallback branch August 1, 2022 11:10
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.137.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Private gitlab maven repository doesn't work with sbt-package datasource
5 participants