diff options
Diffstat (limited to 'doc/ci/pipelines/job_artifacts.md')
-rw-r--r-- | doc/ci/pipelines/job_artifacts.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/ci/pipelines/job_artifacts.md b/doc/ci/pipelines/job_artifacts.md index b0336d0499f..c8babe3320d 100644 --- a/doc/ci/pipelines/job_artifacts.md +++ b/doc/ci/pipelines/job_artifacts.md @@ -430,3 +430,24 @@ successful_test_job: paths: - bin/results ``` + +### Error message `FATAL: invalid argument` when uploading a dotenv artifact on a windows runner + +The PowerShell `echo` command writes files with UCS-2 LE BOM (Byte Order Mark) encoding, +but only UTF-8 is supported. If you try create the dotenv artifact with `echo`, it causes a +`FATAL: invalid argument` error. + +Use PowerShell `Add-Content` instead, which uses UTF-8: + +```yaml +test-job: + stage: test + tags: + - windows + script: + - echo "test job" + - Add-Content -Path build.env -Value "MY_ENV_VAR=true" + artifacts: + reports: + dotenv: build.env +``` |