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

Cannot create/import projects within a subgroup on Gitlab #7981

Closed
iamjohnnym opened this issue Oct 26, 2021 · 4 comments
Closed

Cannot create/import projects within a subgroup on Gitlab #7981

iamjohnnym opened this issue Oct 26, 2021 · 4 comments
Assignees
Labels
area/gitlab kind/enhancement An enhancement of an existing feature

Comments

@iamjohnnym
Copy link

Issue

Related to #7980 , I don't know if these two issues are the same root cause or separate.

Cannot import gitlab projects that contain a group/subgroup because webhook fails to use the correct repo path.

Replication

  1. Create repo in gitlab under a group/sub-group
  2. Go through the process of importing that project in jx, any project.

Expected Behavior

  1. Imports into jx
  2. Creates a MR on the jx-cluster that references the correct project path. (this works)
    eg: chore: import repository https://gitlab.com/org/services/react-test.git
  3. jx spins up a boot job
  4. jx creates webhook to repo
  5. job completes
  6. jx merges mr
  7. ...

Actual Behavior

  1. Imports into jx
  2. Creates a MR on the jx-cluster that references the correct project path.
    eg: chore: import repository https://gitlab.com/org/services/react-test.git
  3. jx spins up a boot job
  4. Webhook fails:
WARNING: failed to update webhooks for Owner: org and Repository: react-test in git server: https://gitlab.com: failed to create webhook "http://hook-jx.subdomain.domain.com/hook" on repository 'org/react-test': Not Found

Source Config

I've even attempted to set the URL and httpCloneURL but they don't appear to do anything during this process.

apiVersion: gitops.jenkins-x.io/v1alpha1
kind: SourceConfig
metadata:
  creationTimestamp: null
spec:
  groups:
  - owner: org
    provider: https://gitlab.com
    providerKind: gitlab
    providerName: gitlab
    repositories:
    - name: python-http-test
    - name: react-test
      url: https://gitlab.com/org/services/react-test
      httpCloneURL: https://gitlab.com/org/services/react-test.git
    - name: test
      url: https://gitlab.com/org/services/test
      httpCloneURL: https://gitlab.com/org/services/test.git
    scheduler: in-repo
  slack:
    channel: '#jenkins-x-pipelines'
    kind: failureOrNextSuccess
    pipeline: release

Related

@iamjohnnym
Copy link
Author

It appears the source repository is being set appropriately though:

% kubectl get sr
NAME                          URL                                                        DESCRIPTION
org-python-http-test   https://gitlab.com/org/python-http-test             
org-react-test               https://gitlab.com/org/services/react-test
org-services-test          https://gitlab.com/org/services/test                

@ankitm123
Copy link
Member

Webhooks are now being created, so I think this issue can be closed?
Having said that, there are still some issues aroung importing projects (seems like in-repo scheduler does not get added to the repo, and the import times out waiting for the pr to get auto merged), but that's a different issue.

@ankitm123 ankitm123 self-assigned this Dec 11, 2021
@ankitm123 ankitm123 added area/gitlab kind/enhancement An enhancement of an existing feature labels Jan 8, 2022
@ankitm123
Copy link
Member

/close
closing this as nested gitlab repos are now working with jx

@jenkins-x-bot
Copy link
Contributor

@ankitm123: Closing this issue.

In response to this:

/close
closing this as nested gitlab repos are now working with jx

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gitlab kind/enhancement An enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants