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

[Feature] Support submodule_override for nested submodules #64

Open
amrsoll opened this issue Mar 14, 2023 · 0 comments
Open

[Feature] Support submodule_override for nested submodules #64

amrsoll opened this issue Mar 14, 2023 · 0 comments

Comments

@amrsoll
Copy link

amrsoll commented Mar 14, 2023

Would be suuper cool to support nested submodule path overrides

clone:
  git:
    image: woodpeckerci/plugin-git
    settings:
      recursive: true
      submodule_override:
        first_submodule_path: <url for first_submodule_path>
        # The following does not apply when git recurses into first_submodule_path
        first_submodule_path/other_dir/nested_submodule: <url for nested_submodule>

I am trying to override the github url of my submodules to a local git server

Example output:

+ git submodule update --init --recursive
Cloning into '/woodpecker/src/{woodpecker_url}/{main_repo_path}'...
Submodule path '{first_submodule}': checked out 'f5a8687e04965c597e534f9afe2935aedd1a4753' 
Cloning into '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of '{{nested_module_url}}' into submodule path '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule' failed
Failed to clone 'other_dir/nested_submodule'. Retry scheduled 
Cloning into '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of '{{nested_module_url}}' into submodule path '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule' failed
Failed to clone 'other_dir/nested_submodule' a second time, aborting
fatal: Failed to recurse into submodule path '{first_submodule}'
exit status 1 
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