#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
build:
working_directory: ~/mocking-service # directory where steps will run
docker:
- image: circleci/postgres:9.6.5-alpine-ram
environment:
TEST_DATABASE_URL: postgresql://root@localhost/circle_test
- image: circleci/postgres:9.6.5-alpine-ram
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install postgresql-client-9.6
- run: whoami
- run: |
psql \
-d $TEST_DATABASE_URL \
-c "CREATE TABLE test (name char(25));"
- run: |
psql \
-d $TEST_DATABASE_URL \
-c "INSERT INTO test VALUES ('John'), ('Joanna'), ('Jennifer');"
- run: |
psql \
-d $TEST_DATABASE_URL \
-c "SELECT * from test"
# specify the version you desire here
- image: circleci/openjdk:8-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- mocking-service-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: mvn clean install
- save_cache:
paths:
- ~/.m2
key: mocking-service-{{ checksum "pom.xml" }}
# run tests!
- run: mvn integration-test
我希望这是语法/格式或顺序错误的问题。 Circleci日志显示以下错误 !/ bin / sh -eo pipefail 无法解析YAML 在解析块映射时 在“字符串”的第8行第5列中: working_directory:〜/ mocking-ser ... 预期的,但发现'' 在“字符串”的第31行第7列中: -图片:circleci / openjdk:8-jdk
我正在尝试通过circleci运行此yaml文件,并且看到上述错误。
我在做什么错了?