Skip to content

Bad K8s environment variable file fails builds #155

@akutz

Description

@akutz

Hi,

I've seen the K8s environment variable file fail the stable build on a not inconsistent basis. For example, here's one of today's log files:

Running with gitlab-ci-multi-runner 1.11.5 (cbfcb5c)
  on CNCF (a7809678)
Using Docker executor with image registry.cncf.ci/cncf/cross-cloud/provisioning:production ...
Pulling docker image registry.cncf.ci/cncf/cross-cloud/provisioning:production ...
Running on runner-a7809678-project-2-concurrent-6 via f520add1ed8e...
Fetching changes...
Removing data/
HEAD is now at 3d50d2f Merge branch 'staging' of github.com:crosscloudci/cross-cloud into production
Checking out 3d50d2f6 as production...
Skipping Git submodules setup
Downloading artifacts for Build-Source (106096)...
Downloading artifacts from coordinator... ok        id=106096 responseStatus=200 OK token=4VJVcR2o
$ export BASE_URL=${BASE_URL:-$(echo $CI_PROJECT_URL |  cut -d'/' -f1-3)}
$ mkdir -p ./data ; touch ./data/empty.env
$ for envfile in data/*env ; do source $envfile ; echo ----- $envfile ---- ; cat $envfile ; done
----- data/empty.env ----
data/kubernetes.env: line 1: syntax error near unexpected token `newline'
Uploading artifacts...
./data/: found 3 matching files                    
Uploading artifacts to coordinator... ok            id=106097 responseStatus=201 Created token=7KRFyCsu
ERROR: Job failed: exit code 2

The line data/kubernetes.env: line 1: syntax error near unexpected token 'newline' seems to be the smoking gun.

The primary cause of concern is that as it stands today there is no good way for people looking at the dashboard to know, at a glance, if the platform is the reason a build fails or if it's because of an error out of the control of said platform.

We at VMware, as I imagine others, have every desire to help prevent these types of errors that are beyond our control. To that end, this issue is for tracking:

  • Why does this keep happening?
  • What can we do to help you prevent it from happening?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions