I'm using a shared runner, on gitlab.com. The guide here shows a section for job artifacts. But when I run my job and look at my job page, I just see this:
There's no section for job artifacts.
What should I try?
Here's my .gitlab-ci.yml
:
image: node:7.9
stages:
- lint
- test
cache:
paths:
- node_modules/
before_script:
- npm install
- npm install -g grunt-cli
lint:
stage: lint
script:
- grunt lint
test:
stage: test
script:
- grunt
- grunt test
- grunt coveralls
artifacts:
paths:
- dist/project*.min.js*
Are your artifacts created in failing test runs (e.g. screenshots when a test fails)?
If so, you have to take into account, that artifacts in Gitlab are as a default only collected for successful tests.
You have to explicitly configure Gitlab CI to always collect them, e.g.
test:
...
artifacts:
when: always
paths:
- ...
There is another reason for which you would not find your artifact, with GitLab 13.8 (January 2021):
Project configuration to control storage of latest artifacts
Keeping the latest artifact from the most recent successful job is a useful default behavior but can also result in significant amounts of storage usage.
This can cause an unexpected surge in disk space usage if you have pipelines that generate large artifacts.To improve storage consumption management, you can now disable this behavior for any project in the settings.
Coming up next, gitlab#276583 will allow you to entirely disable keeping the latest artifacts at the instance level.
See Documentation and Issue.
So If you don't have selected that option, there would be no artifact for you to find.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With