Artifact paths can't start with a wildcard

Summary

When an artifacts paths value starts with *, the build doesn't run, having an invalid yaml tag and the error:

  • (<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line X column Y

Steps to reproduce

Include a job like the following in your .gitlab-ci.yml file (key part is the artifacts section):

testjob:
  script:
  - touch 1.txt
  - touch 2.txt
  artifacts:
    paths:
    - *.txt

Actual behavior

The build is not started, with:

  • (<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line X column Y

as the error

Expected behavior

Expecting the build to run, and generate 2 artifacts (1.txt, 2.txt).

Relevant logs and/or screenshots

N/A

Environment description

The runner is a custom docker image, but it's never used.

Used GitLab Runner version

$ gitlab-ci-multi-runner --version
Version:      1.8.1
Git revision: a2efdd4
Git branch:   1-8-stable
GO version:   go1.7.3
Built:        Tue, 29 Nov 2016 13:53:55 +0000
OS/Arch:      linux/amd64