Git 'submodules' checkbox
complete
E
Energetic Herring
In a pipeline that has a Build stage, could you add a 'git submodules' option to Checking out Codebase?
Log In
N
Nofar Bluestein
complete
This capability is now deployed to production, and is behind the feature flag CI_GIT_CLONE_ENHANCED.
please see release notes:
Also please see documentation for more information : https://developer.harness.io/docs/continuous-integration/use-ci/codebase-configuration/git-clone-step
Thank you ,
Nofar Bluestein
CI product team
E
Ebony Ocelot
Hi Team,
When can we anticipate the release of this particular feature?
Thank you for your prompt attention to this matter.
M
Mere Reptile
- We clone from private repositories
- We store and SSH key in harness secrets and write it out before the clone. Yes they can be different repos, but we make sure that the credentials have permissions to clone from all needed repos.
Setup SSH key needed for submodules
mkdir -p ~/.ssh
cat << EOT > ~/.ssh/id_rsa
<+secrets.getValue("org.harnesscicd_bitbucket_ssh_key")>
EOT
Then we do git submodule update --remote --recursive
- How are you doing the clone today? are you using the stage-clone (implicit clone) followed by another git-clone step or a run step for cloning submodules? Yes, doing as you explained.
E
Energetic Herring
Hi,
- No, I clone them all from private repositories.
- Currently, I have the following step in my CI stage before a building step.
command: |-
git config --global http.https://github.com/.extraheader "AUTHORIZATION: Basic $(echo -n <+stage.variables.GITHUB_TOKEN> | base64)"
git submodule update --init --recursive
- Yes
Thanks,
Chan Park
N
Nofar Bluestein
Hey, we're going to work on git-clone enhancements this quarter, and it would be helpful to get additional information about your use case, would you mind answering a few questions :
- When cloning submodule - do you clone them from a public repository of a private one?
- if your submodules are in private repositories - how do you provide authentication data for the clone operation? can these submodules be in multiple private repositories, each requiring different credentials?
- How are you doing the clone today? are you using the stage-clone (implicit clone) followed by another git-clone step or a run step for cloning submodules?
Thank you ,
Nofar Bluestein,
CI product team
W
Weekly Capybara
Nofar Bluestein
When cloning submodule - do you clone them from a public repository of a private one?
- Private repos only (we are using Bitbucket Data Center now)
if your submodules are in private repositories - how do you provide authentication data for the clone operation? can these submodules be in multiple private repositories, each requiring different credentials?
- Typically use the same credentials used by the connector by either configuring the git client credential helper or using creating a .netrc file.
How are you doing the clone today? are you using the stage-clone (implicit clone) followed by another git-clone step or a run step for cloning submodules?
- We have created a template from a Run Step. Usually we do a stage-clone followed by the Run Step template.
N
Nofar Bluestein
N
Nofar Bluestein
this fiscal quarter
Pranav Rastogi
long-term