I am trying to display all the artifacts .html files in a specific directory:
$TOOLS_PATH/terraform_results/html that are generated during a build job stage when my gitlab pipeline is run.
when this is run in the gitlab pipeline I get a warning:
Uploading artifacts... WARNING: tools/terraform_results/html/*: no matching files
I'm invoking this via gitlab-ci.yml file via:
artifacts:
paths:
- "$TOOLS_PATH/terraform_results/html/*"
What am i doing wrong?
Drop the quotes and wildcard, and indent the paths list. This will zip everything in the html folder. You can use wildcards like *.html to filter filenames if needed:
artifacts:
paths:
- $TOOLS_PATH/terraform_results/html/
If that doesn't work, read the gitlab-ci.yml reference on artifacts:paths to make sure you didn't miss anything. For example:
Paths are relative to the project directory ($CI_PROJECT_DIR) and can’t directly link outside it.
Make sure the tools directory is located in the root of your project directory. You can confirm the directory exists by adding ls $CI_PROJECT_DIR to your scripts section and checking the runner logs.
For .html only files
artifacts:
paths:
- $TOOLS_PATH/terraform_results/html/*.html
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