11

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.

Shantanu Deshpande
  • 185
  • 1
  • 1
  • 11

1 Answers1

3

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250