Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add symlink file to a gitlab repo

How can I add symlink to file to gitlab repository?

Every time I run a pipeline from gitlab, the local symlink gets destroyed.

Any suggestions on how to create a symlink for a folder which resides inside of gitlab repo would be great.

like image 759
Shantanu Deshpande Avatar asked Oct 01 '17 07:10

Shantanu Deshpande


1 Answers

You can store in a Git repo a symlink (special entry 12000), but, as seen in this test, that would make the GitLab pipeline fail.
See gitlab-ce issue 27542 (though it is for the particular case of .gitlab-ci.yml being a symlink).

It is best if the pipeline first recreate the symlink, then process in its subsequent steps, with the normal build: regenerating it seems better than storing it.

like image 79
VonC Avatar answered Oct 08 '22 16:10

VonC