version: 2.1 jobs: rspec: working_directory: ~/portfolio docker: - image: circleci/ruby steps: - checkout - setup_remote_docker - run: name: Setup environment variable command: | echo "export COMPOSE_FILE=docker-compose.yml" >> $BASH_ENV - run: name: Start containers and verify it is working command: | set -x docker-compose up -d docker exec portfolio_web curl -4 --retry 10 --retry-delay 3 --retry-connrefused http://localhost:3000 - run: name: Setup database command: | docker-compose exec portfolio bash -c 'yes n | bundle exec rails g spree:install --migrate --seed --sample --auto_accept' - run: name: Run rspec command: docker-compose exec portfolio rspec rubocop: working_directory: ~/portfolio docker: - image: circleci/ruby:2.7.0 environment: BUNDLER_VERSION: 2.1.2 steps: - checkout - run: name: setup bundler command: | sudo gem update --system sudo gem install bundler -v 2.1.2 - restore_cache: keys: - gemfiles-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - gemfiles-{{ .Branch }}- - gemfiles-master- - run: bundle config --local path vendor/bundle - run: name: bundle install command: bundle check || bundle install --jobs=8 --clean - run: name: Run rubocop command: bundle exec rubocop - save_cache: key: gemfiles-{{ .Branch }}-{{ checksum "Gemfile.lock" }} paths: - vendor/bundle heroku_deploy: working_directory: ~/portfolio docker: - image: sue445/heroku-cli steps: - checkout - build-tools/install-ci-tools - jq/install - run: name: Identify who I am command: echo 'export MY_EMAIL=`heroku auth:whoami | tail -n 1`' >> $BASH_ENV - run: name: Identify Heroku app names to destroy command: echo 'export APP_NAMES_TO_REMOVE=`heroku apps --json | jq -r "map(select(.owner.email == "\"$MY_EMAIL\"" and (.name | contains(\"portfolio\")))) | sort_by(.updated_at) | reverse | .[5:] | .[].name"`' >> $BASH_ENV - run: name: Delete old apps if needed command: for app_name in $APP_NAMES_TO_REMOVE; do heroku apps:destroy -a $app_name -c $app_name; done - run: name: Identify current branch name command: echo 'export CURRENT_BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`' >> $BASH_ENV - run: name: Define Heroku app name to create command: timestamp=`date +%Y%m%d%H%M%S` && echo "export HEROKU_APP_NAME=potepanec-$timestamp" >> $BASH_ENV - run: name: Create fresh Heroku app command: heroku apps:create $HEROKU_APP_NAME --stack heroku-18 --addons=jawsdb:kitefin - run: name: Deploy command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git $CURRENT_BRANCH_NAME:master - run: name: Run post-deploy tasks command: | heroku config:set AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY heroku run bin/rails db:migrate orbs: build-tools: circleci/build-tools@2.6.3 jq: circleci/jq@1.9.1 workflows: version: 2.1 build: jobs: - rspec - rubocop - heroku_deploy: requires: - rspec - rubocop
手元の開発環境ではエラーはでなかったのですが、
circleciに通すと画像のようなエラーが出てしまいます、、。
何か原因などわかる方いらっしゃいましたらアドバイスお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。