Hello! I have a small side project that used to run 1.0 and am looking to update to 2.0. I’ve tried updating on my own through the docs as well as by using the transition generated file from CircleCI, but am hitting a bit of a roadblock. Below is my original yml
, as well as where I am in trying to migrate over to 2.0. Any help/advice is appreciated! I’m also happy to provide more details as necessary. Thanks!
EDIT
To give further detail on some of the issues I’m experiencing, the error I’m currently running into is the following:
$ #!/bin/bash -eo pipefail
sudo -u postgres psql -p 5432 -c "create database app_test;"
/bin/bash: sudo: command not found
Exited with code 127
Original 1.0
machine:
timezone:
America/Denver
node:
version: 8.3.0
environment:
DATABASE_URL: postgresql://ubuntu:@127.0.0.1:5432/app_test
database:
override:
- sudo -u postgres psql -p 5432 -c "create database app_test;"
- knex migrate:latest
test:
override:
- npm test
- npm run eslint
deployment:
staging:
branch: master
heroku:
appname: app
Attempted 2.0
version: 2
jobs:
build:
docker:
- image: node:8.3.0
environment:
DATABASE_URL: postgresql://ubuntu:@127.0.0.1:5432/app_test
working_directory: ~/repo
steps:
- checkout
- run: sudo -u postgres psql -p 5432 -c "create database app_test;"
- run: knex migrate:latest
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
# run tests
- run: npm test
# run eslint
- run: npm run eslint