Skip to content

[Feature] Support submodule_override for nested submodules #64

@amrsoll

Description

@amrsoll

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions