I’m trying to set up CI/CD for a project that uses a user-local configuration placed in $XDF_CONFIG_HOME. I want to set this config in “build” stage and preserve it for later. I tried to include configuration into “artifacts”, but the problem is that the “paths” is relative to the project root, so i cannot use absolute path to the config. I even tried to access $XDG_CONFIG_HOME via “…” symbolic link but it didn’t work. Any ideas about preserving files that are created outside project directory?
Personally, I’d copy or move the file into the project root (or a subdirectory) and then place that path in the artifacts. I appreciate that there may be circumstances where that’s not ideal, but I’d guess it’s the simplest solution.
1 Like
How to make logs accessible? If a command fails, it’s not always possible to copy them to the project root. For example, ~/.npm/_logs
. NPM logs can be moved to the project root by setting the cache
property, but logs from other tools will be troublesome.
In the artifacts
section of your job definition you can say:
myjob:
...
artifacts:
paths:
- ...
expire_in: 2 weeks
when: always
to always create the artifact, or on_failure
if you only want to download logs for failed jobs.