0
CircleCi 1.0からCircleCi 2.0への移行中です。ここに私のcircle.ymlファイルがどのように見えるかです:CircleCi 2.0ビルドでpsqlコマンドを使用
version: 2
environment:
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
jobs:
build:
working_directory: ~/circleci-dashboard
docker:
- image: circleci/ruby:2.3-node
environment:
PGHOST: 127.0.0.1
PGUSER: ubuntu
RAILS_ENV: test
- image: circleci/postgres:9.6-alpine
environment:
POSTGRES_USER: ubuntu
POSTGRES_DB: circle_test
POSTGRES_PASSWORD: ""
steps:
- checkout
- run:
name: 'CircleCI dependencies'
command: bash deploy/circle-dependencies.sh
# Restore bundle cache
- type: cache-restore
key: dashboard-{{ checksum "Gemfile.lock" }}
# Bundle install dependencies
- run: bundle install --path vendor/bundle
# Store bundle cache
- type: cache-save
key: dashboard-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
# Add the Postgres 9.6 binaries to the path.
- run: echo '/usr/lib/postgresql/9.6/bin/:$PATH' >> $BASH_ENV
- run: sudo apt install postgresql-client
- run:
name: Set up Survey Builder database
command: sudo psql -p 5433 -c 'create database survey_builder_test'
- run:
name: Set up database
command: |
bundle exec rake db:create db:schema:load --trace
environment:
DATABASE_URL: "postgres://[email protected]:5432/circle_test"
私は、このコマンドに問題があります。
- run:
name: Set up Survey Builder database
command: sudo psql -p 5432 -c 'create database survey_builder_test'
をし、それが次のエラーを返します。
#!/bin/bash -eo pipefail
sudo psql -p 5432 -c 'create database survey_builder_test'
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Exited with code 2
任意のヒントを歓迎いたします?
答えがあなたのために機能しましたか? – Gerep
私は今日それをチェックして、あなたに知らせるでしょう。 –