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(backend): GitLab on-premise support and multilevel URLs, SSH git repos #1521

Merged
merged 15 commits into from
Jun 21, 2024

Conversation

mbodmer
Copy link
Contributor

@mbodmer mbodmer commented Jun 13, 2024

  • Add support for on-premise hosted GitLab, not only gitlab.com
  • Add support for SSH git repositories -> will be converted to "https" API URL
  • Add support for multi level gitlab groups
  • Respect upper case PRIVATE-TOKEN header
  • Mark PRIVATE-TOKEN header value as sensitive
  • fix bug: release-plz release fails when no "-o json" given as argument

@mbodmer mbodmer force-pushed the gitlab-onprem branch 2 times, most recently from 2cf01bf to 2cbb619 Compare June 13, 2024 14:51
@mbodmer
Copy link
Contributor Author

mbodmer commented Jun 13, 2024

Sorry, I have made a mess with git. Have now force pushed again and fixed the last clippy warning

- keep http/https scheme from git repo
- convert ssh scheme into https
- introduce url encoded project identification

Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
CommitParent is not used anywhere, maybe remove it?

Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
@mbodmer mbodmer changed the title GitLab backend support for On-Premise and multilevel URLs, SSH feat: GitLab backend support for On-Premise and multilevel URLs, SSH Jun 13, 2024
@mbodmer mbodmer changed the title feat: GitLab backend support for On-Premise and multilevel URLs, SSH feat(backend): GitLab backend support for On-Premise and multilevel URLs, SSH Jun 13, 2024
@mbodmer mbodmer changed the title feat(backend): GitLab backend support for On-Premise and multilevel URLs, SSH feat(backend): GitLab on-premise support and multilevel URLs, SSH git repos Jun 13, 2024
@mbodmer
Copy link
Contributor Author

mbodmer commented Jun 17, 2024

Would you mind approving the builds? Or is there anything i can do?

@MarcoIeni
Copy link
Owner

Done! I'll review this asap

@MarcoIeni
Copy link
Owner

I extracted your fix in #1528 because I wanted to merge it asap, thanks!

@MarcoIeni
Copy link
Owner

MarcoIeni commented Jun 18, 2024

I tested this, and I got the error:

Error: failed to release package

Caused by:
    0: Failed to create release
    1: HTTP status client error (403 Forbidden) for url (https://gitlab.com/api/v4/projects/MarcoIeni%2Fmarco-test-gitlab/releases)
  • Is the i%2F correct in the URL?
  • Are these instructions accurate?
  • Maybe I need to select a different role?
image

@mbodmer
Copy link
Contributor Author

mbodmer commented Jun 18, 2024

yes, the project Name is URL encoded, so 2%F is correct for the "/". Also you have to chose Maintainer role or any role with permission to create MR, for the token.
The instructions still apply, just the role could be mentioned, i made the same mistake first. The error is also not very helpful, but I had no idea how to make it more meaningful.
Thanks for reviewing and testing!

@MarcoIeni
Copy link
Owner

MarcoIeni commented Jun 18, 2024

I'll test again, thanks!
For the error, we could link to the docs if gitlab returns a 403.
Do you mind doing this change and updating the docs? If not, I can do it 👍

@mbodmer
Copy link
Contributor Author

mbodmer commented Jun 19, 2024

You seem to have a solution in mind, just go for it

@MarcoIeni MarcoIeni enabled auto-merge (squash) June 21, 2024 06:29
@MarcoIeni MarcoIeni merged commit 25f4129 into MarcoIeni:main Jun 21, 2024
13 checks passed
@release-plz release-plz bot mentioned this pull request Jun 21, 2024
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.

None yet

2 participants