Improve required Git modification process.
These changes seek to ensure that alterations to the underlying get_sources script is made in a supported manner.
- Updated configuration of Git to align with runner generated script and account for differences between fetch and clone.
- Move
GIT_ASKPASS
file removal to the augmenter package to follow similar workflow as creation. - Created
CreateFile
&CreateScript
user tools to support the creation of associated files with correct permissions regardless of underlying user environment settings.
The change to configuration should ensure that regardless of clone
or fetch
configured in the server the empty credential helper will be set. Setting this is very helpful as we have to account for unknown settings in the user/system Git configs.
$cat git-template/config
[fetch]
recurseSubmodules = false
[http "https://gitlab.exmaple.com"]
sslCAInfo = .../CI_SERVER_TLS_CA_FILE
[credential]
helper =
We should also be able to see the script creation when GIT_TRACE=1
:
Getting source from Git repository
GIT_ASKPASS script created created: /home/user/.jacamar-ci/builds/Udg3Gxqq/000/.credentials/group/project/pass
Fetching changes with git depth set to 50...
Also correction have been made to ensure uniqueness of the .credentials
folder in cases of conflicting
builds or errors in file creation/removal. Of additional note, the migration into the base of the builds
directory will avoid the potential of unexpected issues including the file within .git
.