<p>As Casey Vega commented: provide the complete path.</p>

CC BY-SA 4.0
2020-04-17T21:13:49.310Z
2020-04-18T03:44:51.463Z
2020-04-18T03:44:51.463Z
Aleksey Tsalolikhin
<p>In the <a href="https://gitlab.com/open-source-ventilator/ventilator" rel="nofollow noreferrer">Open Source ventilator project</a>, we aim to provide those who focus on testing with a ready-to-go flash file for the Arduino controller board.</p>

<p>While the binaries seem to be there, for some reason the CI job can't pickup the artifacts.</p>

<p>What is happening:</p>

<ul>
<li>a CI/CD pipeline creates two files which can be listed using <code>find</code></li>
<li>in the next step, this pipeline reports it can't find these artifacts. It says, "no matching files/no files to upload".</li>
</ul>

<p>What's the error and how to fix/troubleshoot? Why does this job end up as successful?</p>

<p><a href="https://gitlab.com/open-source-ventilator/ventilator/controller_ci/-/blob/master/.gitlab-ci.yml" rel="nofollow noreferrer">CI job definition</a>:</p>

<pre><code>compile:
  stage: build
  tags:
    - docker
  script:
    -  |

        git clone -b ci-gh https://github.com/mattd3v/Open-Source-Ventilator.git
        cd Open-Source-Ventilator/OpenSourceVentilator/
        arduino-cli compile --warnings all --fqbn arduino:avr:uno -o osv-controller-uno.bin OpenSourceVentilator.ino
        find .
  artifacts:
    paths:
    - ./osv-controller-uno.bin.hex
    - ./osv-controller-uno.bin.elf
</code></pre>

<p><a href="https://gitlab.com/open-source-ventilator/ventilator/controller_ci/-/jobs/507996642" rel="nofollow noreferrer">Pipeline output</a>:</p>

<pre><code>.
./test
./test/RMVS_TestCaseData.xlsx
./OpenSourceVentilator.ino
./osv-controller-uno.bin.hex
./osv-controller-uno.bin.elf
./README.md

section_end:1586713988:build_script
[0Ksection_start:1586713988:after_script
[0;msection_end:1586713990:after_script
[0Ksection_start:1586713990:archive_cache
[0K[0K[36;1m Saving cache[0;m
[0;msection_end:1586713991:archive_cache
[0K section_start:1586713991:upload_artifacts_on_success
[0K [0K [36;1m

Uploading artifacts for successful job[0;m
[0;m[32;1m
Uploading artifacts...[0;m

[0;33m WARNING: ./osv-controller-uno.bin.hex: no matching files[0;m 
[0;33m WARNING: ./osv-controller-uno.bin.elf: no matching files[0;m 

[31;1mERROR: No files to upload                         [0;m 
section_end:1586713993:upload_artifacts_on_success
[0K[32;1mJob succeeded
[0;m
</code></pre>

CC BY-SA 4.0
2020-04-13T21:28:50.150Z
I assume the runner uses the root of the build dir. I would try `- Open-Source-Ventilator/OpenSourceVentilator/osv-controller-uno.bin.hex`
casey vega
<continuous-integration><gitlab><linux>
How comes a GitLab CI/CD job cant' find its artifacts?
Ta Mu
# How comes a GitLab CI/CD job cant' find its artifacts?

(Asked by: username_0 on 2020-04-13)

In the Open Source ventilator project, we aim to provide those who focus on testing with a ready-to-go flash file for the Arduino controller board.
While the binaries seem to be there, for some reason the CI job can't pickup the artifacts.
What is happening:

a CI/CD pipeline creates two files which can be listed using find
in the next step, this pipeline reports it can't find these artifacts. It says, "no matching files/no files to upload".

What's the error and how to fix/troubleshoot? Why does this job end up as successful?
CI job definition:
compile:
  stage: build
  tags:
    - docker
  script:
    -  |

        git clone -b ci-gh https://github.com/mattd3v/Open-Source-Ventilator.git
        cd Open-Source-Ventilator/OpenSourceVentilator/
        arduino-cli compile --warnings all --fqbn arduino:avr:uno -o osv-controller-uno.bin OpenSourceVentilator.ino
        find .
  artifacts:
    paths:
    - ./osv-controller-uno.bin.hex
    - ./osv-controller-uno.bin.elf

Pipeline output:
.
./test
./test/RMVS_TestCaseData.xlsx
./OpenSourceVentilator.ino
./osv-controller-uno.bin.hex
./osv-controller-uno.bin.elf
./README.md

section_end:1586713988:build_script
[0Ksection_start:1586713988:after_script
[0;msection_end:1586713990:after_script
[0Ksection_start:1586713990:archive_cache
[0K[0K[36;1m Saving cache[0;m
[0;msection_end:1586713991:archive_cache
[0K section_start:1586713991:upload_artifacts_on_success
[0K [0K [36;1m

Uploading artifacts for successful job[0;m
[0;m[32;1m
Uploading artifacts...[0;m

[0;33m WARNING: ./osv-controller-uno.bin.hex: no matching files[0;m 
[0;33m WARNING: ./osv-controller-uno.bin.elf: no matching files[0;m 

[31;1mERROR: No files to upload                         [0;m 
section_end:1586713993:upload_artifacts_on_success
[0K[32;1mJob succeeded
[0;m

**Tags:** continuous-integration, gitlab, linux

> **Comments:**
> **username_1**: I assume the runner uses the root of the build dir. I would try `- Open-Source-Ventilator/OpenSourceVentilator/osv-controller-uno.bin.hex`  

---

## 1 answers

### Answer by username_2 on 2020-04-17. Score: 1

As Casey Vega commented: provide the complete path.


---

