sysota migration: permission denied on moving go cache
see include file: https://gitlab.com/zygoon/go-gitlab-ci/-/raw/master/go.yml
after_script:
- |
if [ ! -d /cache ]; then
echo "Moving Go caches for collection as GitLab cache"
if [ -d "$(go env GOCACHE)" ]; then
echo "Moving Go build cache to .cache/go-build"
mkdir -p "$CI_PROJECT_DIR"/.cache
mv "$(go env GOCACHE)" "$CI_PROJECT_DIR"/.cache/go-build
fi
if [ -d "$(go env GOMODCACHE)" ]; then
echo "Moving Go module cache to .cache/go/pkg/mod"
mkdir -p "$CI_PROJECT_DIR"/.cache/go/pkg
mv "$(go env GOMODCACHE)" "$CI_PROJECT_DIR"/.cache/go/pkg/mod
fi
fi
Running after script...
$ if [ ! -d /cache ]; then # collapsed multi-line command
Moving Go caches for collection as GitLab cache
Moving Go build cache to .cache/go-build
Moving Go module cache to .cache/go/pkg/mod
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/.gitlab-ci.yml': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/.reuse/dep5': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/.vscode/settings.json': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/.vscode/settings.json.license': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/LICENSE': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/README.md': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/check.sh': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/cmdr.go': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/doc.go': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/go.mod': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/go.mod.license': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/go.sum': Permission denied
mv: cannot remove '/go/pkg/mod/gitlab.com/zygoon/go-cmdr@v1.2.0/go.sum.license': Permission denied
Edited by Sébastien Heurtematte