Mkdir failing at checkout [SOLVED}


#1

I’ve been trying to get a very simple build to work. I’ve stripped out a lot of my yml to diagnose the issue, but I have failed. It always fails at line 2 in the checkout step, giving the error /bin/sh: 2: mkdir: not found. I’m pretty sure that isn’t the true error, but given that I have no clue how your build system works at the code level, I’m at a loss as to what the error could be. Any ideas?

version: 2
executorType: docker
containerInfo:
  - image: redis:3.2
  - image: postgres:9.6
  - image: elasticsearch:2.4
  - image: python:3.6 # TODO: Make custom image that includes node + go + python deps

stages:
  build:
    parallel: 2
    workDir: ~/themuse
    environment:
      CACHE_DIR: /build-cache
      BIN_CACHE_DIR: /build-cache/bin
      THEMUSE_DEPENDENCY_DIR: /build-cache/lib
      GO_VERSION: 1.7.5
      GOPATH: /build-cache/lib/go
      NODE_VERSION: 6.2.0
    steps:
      - type: checkout

      - type: shell
        name: Setting up environment
        command: make circleci-init

      - type: deploy
        name: Deploying
        command: make circleci-deploy

#2

Nevermind. I fixed the issue. It had to do with the PATH being set globally for use with our CCI 1.0 project. I had to override the PATH variable in the above circle.yml.


#3

Thanks for sharing that. That actually wasn’t what I expected the problem to be. Was there a specific entry in there causing this problem, or does modifying it at all create this issue?


#4

Had the same issue used circleci/node:boron, was wondering how did you override the PATH variable?


#5

If you want to override it for just one command, you should be able to do something like this:

command: PATH=/whatever/you/want make circleci-deploy

#6

manage to reset $PATH in

docker:
      - image: circleci/node:boron
    environment:
      - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

#7