Bitbucket Repo Not Being Cloned On Fresh Build

bitbucket
git
circle.yml

#1

Hi there,

This is our first time setting up a circle/config.yml file. Things were working beautifully and then something when wrong and we can’t seem to understand what caused the issue. It’s a very simple yaml file but it’s simply not cloning the Bitbucket repo .

The build does get triggered when we push to Bitbucket - but it fails on composer cache .

Here are the two errors that we receive:

Error computing cache key: template: cacheKey:1:15: executing “cacheKey” at <checksum "~/btcsaver…>: error calling checksum: open /home/circleci/btcsaver/frontend2/composer.json: no such file or directory

!/bin/bash -eo pipefail
cd ~/btcsaver/frontend2 && composer install -n --prefer-dist
/bin/bash: line 0: cd: /home/circleci/btcsaver/frontend2: No such file or directory

When we rebuild with ssh access and take look on the box the reason for these failing is clear. There’s no composer.json . No code has been cloned to the server.

version: 2

jobs:
build:
docker:
- image: notnoopci/php:7.1.5-browsers

working_directory: ~/mbssaver
steps:
  - run: composer self-update
  - restore_cache:
      keys:
          - composer-v1-{{ checksum "~/mbssaver/frontend2/composer.json" }}
          - composer-v1-
  - run:
      command: cd ~/mbssaver/frontend2 && composer install -n --prefer-dist

  - save_cache:
      key: composer-v1-{{ checksum "~/mbssaver/frontend2/composer.json" }}
      paths:
          - ~/mbssaver/frontend2/vendor

  - run:
      working_directory: ~/mbssaver/frontend2
      command: php artisan migrate --env=testing --force

Any thoughts on this would be much appreciated.

Thanks
Sam


#3