Vaseem W
Vaseem W

Reputation: 89

ERROR: Job failed: build directory needs to be an absolute path

ERROR: Job failed: build directory needs to be an absolute path

Here is the .gitlab-ci.yml :

image: busybox:latest

before_script:
  - echo "Before script section"
  - echo "For example you might run an update here or install a build dependency"
  - echo "Or perhaps you might print out some debugging details"

after_script:
  - echo "After script section"
  - echo "For example you might do some cleanup here"

build1:
  stage: build
  script:
    - echo "Do your build here"

test1:
  stage: test
  script: 
    - echo "Do a test here"
    - echo "For example run a test suite"

test2:
  stage: test
  script: 
    - echo "Do another parallel test here"
    - echo "For example run a lint test"

deploy1:
  stage: deploy
  script:
    - echo "Do your deploy here"

Upvotes: 4

Views: 3557

Answers (2)

Pankaj Awasthi
Pankaj Awasthi

Reputation: 39

On windows it works with double slashes in the path

[[runners]]
  name = "development-server-runner"
  url = "https://*****.com"
  token = "n****tq"
  builds_dir = "E:\\00-gitlab-build"
  executor = "shell"
  shell = "powershell"
  [runners.custom_build_dir]
    enabled = true
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]

Upvotes: 0

Roman Dolgoter
Roman Dolgoter

Reputation: 246

I don't know what type of runner you have, in my case I had the same issue with docker-ssh runner. A workaround for me was to specify build_dir in config.toml

[[runners]]
  name = "jira-ssh-runner"
  executor = "docker-ssh"
  builds_dir = "/home/gitlab-runner/build"

Upvotes: 11

Related Questions