Cache with SSH runner cache-archiver Fatal error
Summary
Using cache with SSH runner
Steps to reproduce
.gitlab-ci.yml
stages:
- build
build:
stage: build
tags:
- <tag>
before_script:
- mkdir to_cache
script:
- echo "test" > to_cache/test.txt
- pwd
cache:
paths:
- to_cache/
except:
- master
config.toml
concurrent = 5
check_interval = 0
[[runners]]
name = "<name>"
url = "https://<gitlab-selfhosted-url>/"
token = "<token>"
executor = "ssh"
builds_dir = "/tmp/gitlab-ci-builds"
environment = ["GIT_SSL_NO_VERIFY=1", "SHELL=/bin/bash"]
[runners.ssh]
user = "<user>"
password = "<password>"
host = "<target hostname>"
[runners.cache]
Actual behavior
Getting that strange error
Checking cache for default...
Successfully extracted cache
$ mkdir to_cache
$ echo "test" > to_cache/test.txt
$ pwd
/tmp/gitlab-ci-builds/8e86e190/0/<namespace>/<project>
Creating cache default...
to_cache/: found 2 matching files
FATAL: open ../../../../../../<namespace>/<project>/default/archive_037918990: no such file or directory
Failed to create cache
Job succeeded
Expected behavior
No issue with creating <namespace>/<project>/default/archive_037918990
Relevant logs and/or screenshots
I created a wrap on /usr/local/bin/gitlab-runner
#!/usr/bin/env bash
echo "$@" > /tmp/args
/usr/bin/gitlab-runner "$@"
and passed arguments are same on error
cache-archiver --file ../../../../../../<namespace>/<project>/default/cache.zip --timeout 10 --path to_cache/
Environment description
-
GitLab Community Edition
10.8.2
-
GitLab CI runner docker image
gitlab/gitlab-runner:alpine
(pulled today) -
GitLab CI runner
10.8.0
on target machine
Used GitLab Runner version
On docker container
Version: 10.8.0
Git revision: 079aad9e
Git branch:
GO version: go1.8.7
Built: 2018-05-22T03:24:56+00:00
OS/Arch: linux/amd64
on <target hostname>
local installation
Version: 10.8.0
Git revision: 079aad9e
Git branch:
GO version: go1.8.7
Built: 2018-05-22T03:24:56+00:00
OS/Arch: linux/amd64
Edited by Thibaud Lepretre