Where is the working/repos directory?

Hi,

I search where is my working/repos directory because I got No such file or directory.

With my config, I tried to run a script present in my repo but I got No such file or directory.

I searched on google and the doc but I didn’t found and I don’t understand why. Do you know why I got this error ?

1 Like

If working_directory is not specified it will default to ~/project/. Otherwise, you can set working_directory to specify the location to work from.

More information on working_directory is here.

I don’t understand how I can use working_directory I tried with zds-site/ and project/

1 Like

Sorry, forgot to provide the link for working_directory, it’s here: https://circleci.com/docs/2.0/configuration-reference/#executors-requires-version-21

To prevent further confusion, just remove the . from the path.

Example:


# ~/.circleci/config.yml
version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.6.8
      - image: circleci/mysql:5.6
    steps:
      - run:
          name: Setup Environment Variables
          command: echo "export ZDS_TEST_JOB=zds.tutorialv2" >> $BASH_ENV
      - run:
          name: Setup Environment Variables
          command: ls
      - run:
          name: before_install
          command: source /scripts/travis_header.sh # Need to be sourced
      - run:
          name: install
          command: /scripts/install_zds.sh --answer-yes --detect-os-version --travis-output $zds_install_argument
      - run:
          name: script
          command: source /scripts/travis_run.sh

I got the same result : https://circleci.com/gh/A-312/zds-site/18#config/containers/0

I find why :

version: 2
jobs:
  build:
    working_directory: ~/zds-site
    docker:
      - image: circleci/python:3.6.8
      - image: circleci/mysql:5.6
    steps:
      - checkout

checkout :smiley:

2 Likes