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

Gitlab import project with --nested-repo doesn't work #8430

Open
lczupryn-tibco opened this issue Oct 13, 2022 · 0 comments
Open

Gitlab import project with --nested-repo doesn't work #8430

lczupryn-tibco opened this issue Oct 13, 2022 · 0 comments

Comments

@lczupryn-tibco
Copy link

Can not import git repository by jx project import --nested-repo --git-kind gitlab --no-collaborator

Expected Behavior

repository properly imported

Current Behavior

the generated SourceRepository urls are wrong - only the direct subgroup is included
http://server.gitlab/sub-group2/repository-name.git
instead
http://server.gitlab/group/sub-group1/sub-group2/repository-name.git

Context (Environment)

jx version
version: 3.5.6
shaCommit: 8f65d0ef62ed82f846323b4484ea78ae72da2d8c
buildDate: Tue Sep 13 18:32:33 UTC 2022
goVersion: 1.17.9
branch: main
gitTreeState: clean

jenkisX cluster repository
http://server.gitlab/devops/jenkinsx-dev01.git

Detailed Description

Logs

$ jx project import --nested-repo --git-kind gitlab --no-collaborator
DEBUG: using the plugin command: /home/domain/lczupryn/.jx3/plugins/bin/jx-project-0.2.52 import --nested-repo --git-kind gitlab --no-collaborator
DEBUG: loading git credentials file /home/domain/lczupryn/.git-credentials
DEBUG: using git kind gitlab server http://server.gitlab/ and user lczupryn
DEBUG: loading git credentials file /home/domain/lczupryn/.git-credentials
DEBUG: cloning http://server.gitlab/devops/jenkinsx-dev01.git to directory /tmp/jx-git-4182903235
DEBUG: about to run: git clone http://server.gitlab/devops/jenkinsx-dev01.git /tmp/jx-git-4182903235 in dir /tmp
DEBUG: Cloning into '/tmp/jx-git-4182903235'...

we are now going to create a Pull Request on the development cluster git repository to setup CI/CD via GitOps

DEBUG: cloning http://lczupryn/:PASS$@server.gitlab/devops/jenkinsx-dev01.git to directory /tmp/jx-git-1721748164
DEBUG: about to run: git clone http://lczupryn/:PASS$@server.gitlab/devops/jenkinsx-dev01.git /tmp/jx-git-1721748164 in dir /tmp
DEBUG: Cloning into '/tmp/jx-git-1721748164'...
DEBUG: cloned http://server.gitlab/devops/jenkinsx-dev01.git to /tmp/jx-git-1721748164
DEBUG: about to run: git rev-parse HEAD in dir /tmp/jx-git-1721748164
DEBUG: dff06f06edb8ef627cba0f79f71abb533244e446
modified file /tmp/jx-git-1721748164/.jx/gitops/source-config.yaml
DEBUG: checking if the new repository is an Environment: http://server.gitlab/group/sub-group1/sub-group2/repository-name.git
DEBUG: about to run: git rev-parse HEAD in dir /tmp/jx-git-1721748164
DEBUG: dff06f06edb8ef627cba0f79f71abb533244e446
DEBUG: about to run: git status -s in dir /tmp/jx-git-1721748164
DEBUG: about to run: git status -s in dir /tmp/jx-git-1721748164
no changes detected so not creating a Pull Request on http://server.gitlab/devops/jenkinsx-dev01.git
DEBUG: Created pull request  on the development git repository http://server.gitlab/devops/jenkinsx-dev01.git
DEBUG: about to run: jx pipeline wait --owner group --repo repository-name
DEBUG: using the plugin command: /home/domain/lczupryn/.jx3/plugins/bin/jx-pipeline-0.5.4 wait --owner group --repo repository-name
found SourceRepository group-repository-name for http://server.gitlab/group/repository-name
webhook status annotation is: failed
waiting up to 20m0s the webhook to be registered for the SourceRepository group-repository-name in namespace jx for repository: group/repository-name
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

No branches or pull requests

1 participant