Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #15530
Closed
Open
Created Apr 22, 2016 by Auke Willem Oosterhoff@OrangeTux

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
Assignee
Assign to
Time tracking