Files exists but can't be used to build artifacts.
I want to create build artifacts, but Gitlab CI keeps telling me no matching files
, although I explicitly check if the files exists.
This is the output of the Gitlab CI runner:
gitlab-ci-multi-runner 1.0.1 (cffb5c7)
Using Docker executor with image golang:latest ...
Running on runner-e67c915c-project-38-concurrent-0 via ip-172-31-24-144...
Fetching changes...
HEAD is now at ca8a993 Add full path to artifact.
Checking out ca8a9932 as master...
HEAD is now at ca8a993... Add full path to artifact.
$ export PROJECT_DIR=$GOPATH/src/gitlab.xxx.nl/rio/iris-api.go
$ mkdir -p $GOPATH/src/gitlab.xxx.nl/rio/
$ cp -r $(pwd) $PROJECT_DIR
$ cd $PROJECT_DIR
$ go get github.com/stretchr/testify
$ go get ./...
$ make build-arm
$ ls -la /go/src/gitlab.xxx.nl/rio/iris-api.go/build/read_digital
-rwxr-xr-x 1 root root 7962904 Apr 22 14:53 /go/src/gitlab.xxx.nl/rio/iris-api.go/build/read_digital
Archiving artifacts...
WARNING: /go/src/gitlab.xxx.nl/rio/iris-api.go/build/read_digital: no matching files
No files to archive.
Build succeeded.
My Gitlab CI configuration:
image: golang:latest
before_script:
## Location of our project.
- export PROJECT_DIR=$GOPATH/src/gitlab.xxx.nl/rio/iris-api.go
## Now create workspace for our project.
- mkdir -p $GOPATH/src/gitlab.xxx.nl/rio/
## Currently our projects is in the current working directory, but Go
## expects it in its GOPATH at $GOPATH/src/gitlab.xxx.nl/rio/.
## So let's move it there.
- cp -r $(pwd) $PROJECT_DIR
- cd $PROJECT_DIR
# Install dependencies.
- go get github.com/stretchr/testify
- go get ./...
test:
script: make test
build_binaries:
stage: deploy
script:
- make build-arm
- ls -la /go/src/gitlab.xxx.nl/rio/iris-api.go/build/read_digital
artifacts:
paths:
- /go/src/gitlab.xxx.nl/rio/iris-api.go/build/read_digital