Getting repository tar.gz from inside a pipeline

Is it possible to download the tar.gz of the whole project, just like you could by “hand” from a project’s landing page, from inside a pipeline?
We’d like to do this such that we can deploy it in our deploy stage. We’re a kind of in between old school deployment and deploying in a kubernetes environment. By being able to just push a project’s tar.gz we’d be able to leverage current tooling from there.

You have the CI_PROJECT_URL with which you might be able to construct the download url, or maybe you can find some other variable that might suit your purpose better on:

Not sure whether that works without any hurdles if the project is behind authentication.