DEBUG set as a variable in a job definition causes random failures

Overview

Use of the DEBUG environment in the variables section of a GitLab pipeline file results in random failures. Other reports indicate that this may also result in changing the order of job execution.

Example:

build:
  variables:
    - DEBUG: "axios"
  script:
    - protractor

Failures reported

  • Artifacts do not upload.

  • Missing gitlab-runner-helper error message

Scenarios for use of a DEBUG variable the the variable section

  • Nodejs: Specify the modules to run in debug mode as this is helpful for running E2E UI tests.

Original issue title:

Artifacts upload is failing with an error - "Missing /usr/bin/gitlab-runner-helper"

Original issue description

After upgrading gitlab-runner v10.4.0 I am experiencing an issue with an artifacts upload step in my CI jobs.

Running with gitlab-runner 10.4.0 (857480b6)
  on Docker Machine Runner (b7027357)
Using Docker executor with image docker:1.11.2 ...
Using docker image sha256:9933d94f0bd7a20ccee42f6954ab3cb4bce21986ff5a3c3fe4b1796c2673011e for predefined container...
Pulling docker image docker:1.11.2 ...
Using docker image docker:1.11.2 ID=sha256:759b83b2afbbda3a88bf27a8e2d573bcce4477e62b69ca6f8ea544ba4f3d6070 for build container...
Running on runner-b7027357-project-8-concurrent-0 via runner-b7027357-gitlab-ci-as-1517831171-34cfbf74...

<here I execute build commands inside containers started from my private images>


Missing /usr/bin/gitlab-runner-helper. Extracting cache is disabled.
...
Missing /usr/bin/gitlab-runner-helper. Uploading artifacts is disabled.

I am using "docker+machine" executor on AWS. (Previously, on v9.5 it was completely OK). I installed the runner using this binary - https://gitlab-runner-downloads.s3.amazonaws.com/v10.4.0/binaries/gitlab-runner-linux-amd64

Here is the config:

concurrent = 20
check_interval = 0

[[runners]]
  name = "Docker Machine Runner"
  url = "https://removed.com/"
  token = "removed"
  executor = "docker+machine"
  limit = 20
  [runners.docker]
    image = "docker:1.12.6"
    volumes = ["/var/run/docker.sock:/var/run/docker.sock:ro"]
    disable_cache = true
  [runners.machine]
    IdleCount = 3
    IdleTime = 1800
    MaxBuilds = 30
    MachineDriver = "amazonec2"
    MachineName = "gitlab-ci-as-%s"
    OffPeakPeriods = ["* * 0-7,19-23 * * mon-fri *", "* * * * * sat,sun *"]
    OffPeakIdleCount = 1
    OffPeakIdleTime = 1200
    MachineOptions = [
      "amazonec2-region=us-west-2",
      "amazonec2-vpc-id=vpc-foo",
      "amazonec2-subnet-id=subnet-bar",
      "amazonec2-instance-type=t2.medium",
      "amazonec2-private-address-only",
      "amazonec2-root-size=30",
      "amazonec2-tags=Name,gitlab-runner-docker-machine-instance",
      "amazonec2-security-group=gitlab-ci-runner-GitlabCIRunnerSecurityGroup-foo",
      "amazonec2-iam-instance-profile=gitlab-ci-runner-GitlabCIRunnerAgentInstanceProfile-bar",
      "amazonec2-ssh-keypath=/etc/gitlab-runner-certs/gitlab-scaler/id_rsa"
    ]
  [runners.cache]
    Type = "s3"
    AccessKey = "foo"
    SecretKey = "bar"
    ServerAddress = "s3.amazonaws.com"
    BucketName = "baz"
    BucketLocation = "us-west-2"
    Insecure = false
Edited by Darren Eastman