Skip to content

Artifacts not uploading/downloading for Windows Docker executor

Summary

When a job has artifacts specified and the Windows Docker executor is being used artifacts are not being uploaded. There seems to be no error shown in the job log either.

Originally reported in:

Steps to reproduce

.gitlab-ci.yml
build:
  image: mcr.microsoft.com/windows/servercore:1809 
  script:
  - New-Item -Path 'newfile.txt' -ItemType File 
  - dir
  artifacts:
    paths:
    - newfile.txt
    when: always
    expire_in: 2 week

Actual behavior

GitLab Runner completely ignores the artifacts and does not upload them.

Expected behavior

The artifact is uploaded and available for browse/download from the sidebar or API.

Relevant logs and/or screenshots

job log
Running with gitlab-runner 11.12.0~beta.1500.gd319e943 (d319e943)
  on windows-docker-2019 vGvfck1g
Using Docker executor with image mcr.microsoft.com/windows/servercore:1809 ...
Pulling docker image mcr.microsoft.com/windows/servercore:1809 ...
Using docker image sha256:43c05724e30b3106e67824df4d6abca762974cb28a2dbda9627758b6d66c7246 for mcr.microsoft.com/windows/servercore:1809 ...
Running on RUNNER-VGVFCK1G via 
vagrant-2019...
Initialized empty Git repository in C:/builds/root/ci-scratch-pad/.git/
Fetching changes...
Created fresh repository.
From http://192.168.1.79:3000/root/ci-scratch-pad
 * [new branch]      4250                    -> origin/4250
 * [new branch]      4269                    -> origin/4269
 * [new branch]      cache                   -> origin/cache
 * [new branch]      custom-project-dir      -> origin/custom-project-dir
 * [new branch]      dirty-repo              -> origin/dirty-repo
 * [new branch]      forever-build           -> origin/forever-build
 * [new branch]      git-log                 -> origin/git-log
 * [new branch]      kaniko                  -> origin/kaniko
 * [new branch]      master                  -> origin/master
 * [new branch]      multiline-script        -> origin/multiline-script
 * [new branch]      scripts                 -> origin/scripts
 * [new branch]      services                -> origin/services
 * [new branch]      windows-docker-artifacts -> origin/windows-docker-artifacts
 * [new branch]      windows-docker-executor -> origin/windows-docker-executor
Checking out 6745e35f as windows-docker-artifacts...
$ New-Item -Path 'newfile.txt' -ItemType File


    Directory: C:\builds\root\ci-scratch-pad


Mode                LastWriteTime         Length Name                          
----                -------------         ------ ----                          
-a----        5/28/2019   6:33 AM              0 newfile.txt                   


$ dir


    Directory: C:\builds\root\ci-scratch-pad


Mode                LastWriteTime         Length Name                          
----                -------------         ------ ----                          
-a----        5/28/2019   6:32 AM             47 .gitignore                    
-a----        5/28/2019   6:32 AM            217 .gitlab-ci.yml                
-a----        5/28/2019   6:32 AM             63 Dockerfile                    
-a----        5/28/2019   6:33 AM              0 newfile.txt                   


Job succeeded

Environment description

config.toml contents
[[runners]]
  name = "windows-docker-2019"
  url = "xxx"
  token = "xxxxx"
  executor = "docker-windows"
  [runners.docker]
    tls_verify = false
    image = "alpine:3.9"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["c:\\cache"]
    shm_size = 0
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]

Used GitLab Runner version