Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Submodule support #4

Open
apobekiaris opened this issue Oct 22, 2018 · 7 comments
Open

Submodule support #4

apobekiaris opened this issue Oct 22, 2018 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@apobekiaris
Copy link

does it fetch submodules?

@fakhrulhilal
Copy link
Owner

Can you tell me why submodule is important to you? The exisiting tfs/azure devops has already supported that scenario.

@apobekiaris
Copy link
Author

I have a group of tasks shared between my pipelines with which I download aditional repos. So I wish to download a container repo rather individual. I do not see how devops covers this case at least in a straightforward as this task.

@fakhrulhilal
Copy link
Owner

Personally, I don’t recommend downloading submodule with this task. There are a lot of things to handle when downloading submodule, such as auth stuff. I recommend using built-in get source task to do that.

If I assume the submodule repo doesn’t contain auth to download, will it suit you?

@apobekiaris
Copy link
Author

I want to to download this container repo https://github.com/eXpandFramework/github. I prefer the container so I can add remove projects to it rather individual repos

@apobekiaris
Copy link
Author

I do not want to auth or anything this a public repo

@fakhrulhilal
Copy link
Owner

I see. You make container repo as a shortcut for downloading multiple repo. Based on my experience, container repo will not contain latest update for all submodules. Whenever submodule repo updated, the container repo must be updated also to get the latest version. Suppose submodule IssueNotifier last update is yesterday, and the container repo is created at that time. When there's a commit to repo IssueNotifier next day, then the container repo still contains yesterday update for submodule IssueNotifier. You need to maintain the container repo to keep it updated, either update it manually (pull update submodule IssueNotifier inside container repo) or use another task to sync between submodule repo with container repo.

Second issue, the CI build will not work for submodule path also. For example if you create CI build to be triggered whenever all repos (IssueNotifier, OctokitEx, ReleaseNoteGenerator) updated, that won't work, because the build can't filter submodule path. At least with built-in azure devops feature. Perhaps you need another extension to get this works.

These are the reason behind creating this extension, which supporting download multiple git repo in 1 build (which TFVC can do this but the git version does not). Of course, the second issue (CI build) is still not resolved. I suggest to create 3 tasks to download each repo, rather than using 1 task to download container repo with submodules. It has benefit where you can specify difference branch for each repo without commiting to container repo. For example, you can download ReleaseNoteGenerator with master branch while the other repos use the same branch as Get Source task.

Let me know your comment.

@apobekiaris
Copy link
Author

apobekiaris commented Oct 24, 2018

You need to maintain the container repo to keep

Yes I am aware of this and have been using submodules for long time. I am using Git-Extensions and I push only the container ass below.
image
it's super fast process just a few keyboard shortcuts.

Second issue, the CI build will not work for submodule path also

I am not interested to trigger a CI build although it works fine (already setup in another pipeline and different repos). The cool thing of this task is that I can download extra repos, meaning by this that my pipeline triggers on CI of repo A and can use this task to download additional repos e.g. a container repo on the same pipeline. The alternative would be to create a 2nd pipeline for the container repo and trigger it when repo A pipeline finished. But then I have to pass variables, artifacts etc to the 2nd. This task simplifies the process

I suggest to create 3 tasks to download each repo,

Yes I already did this, however if I had the option to go for the container I would use it and stop maintain the pipeline and focus on my GitHub container repos. Also it may useful to have a branch options as u said but for my cases is not. There are small projects on the master and I do not plan to branch them. I could create another repo instead of branching.

@fakhrulhilal fakhrulhilal self-assigned this Oct 30, 2018
@fakhrulhilal fakhrulhilal added the enhancement New feature or request label Oct 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants