Auto keep artifacts

Hi,

I need to keep the artifacts from a pipeline that runs weekly.
Searching a little bit, I found that Gitlab struggles for quite a while with this issue. There’s no way to parameterize the value of “expire_in” or call the gitlab API to set the “expire_at” to null afaik.
Can anyone point me to a workaround that doesn’t involves rocket science (like network sending the artifacts to another place)?

Cheers

Nikao

Use something like 100 years

https://docs.gitlab.com/ee/ci/yaml/#artifactsexpire_in

Hi ghost.

I can’t. To achieve this, I should be able to parameterize the expire_in property with an env var, but this property doesn’t accept env vars.

I don’t understand why you need to parametrize that value. Can you elaborate?

Yes I can.

I’ve configured a pipeline (ci.yml) for my project. This pipelne runs every time someone pushes to this repository. To save some disk, I’ve configured the artifacts produced by this pipeline to expire in 4 hours (expire_in: 4 hours), but, I need to keep this artifacts once a week. So, I thought I could parameterize the expire_in in my ci.yml (expire_in: $SOME_TIME where SOME_TIME would have a default value of “4 hours”) and create a weekly schedule that runs with SOMETIME=999 years.

Once expire_in is not parameterizable, I’m looking for different aproaches to my problem.

Any thoughts?