我一直在我的Github存储库中试用CircleCI,但是它的配置文件中有一些问题。我查看了Node.js管道的模板,并据此设计了自己的测试。它要做的就是安装Node.js,检查其版本,然后安装最新的npm软件包。提交文件后,CircleCI告诉我我的构建失败。当我查看日志时,我注意到YAML配置文件本身未正确解析。通过在Google上四处浏览,我找不到任何有用的信息,对我的代码结构进行一些基本调整似乎也无济于事。
这是我的配置文件:
version: 2.0
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:12.15.0
# 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/mongo:3.4.4
working_directory: ~/repo
steps:
- checkout
- run:
name: "Update files"
command: |
curl -sSL "https://nodejs.org/dist/v12.15.0/node-v12.15.0.tar.gz"
npm @latest -g
- run:
name: "Check current version of Node.js"
command: node -v
这是日志文件:
#!/bin/sh -eo pipefail
#!/bin/sh -eo pipefail
# Unable to parse YAML
# while parsing a block mapping
# in 'string', line 7, column 3:
# build:
# ^
# expected <block end>, but found '-'
# in 'string', line 21, column 3:
# - run:
# ^
#
# -------
# Warning: This configuration was auto-generated to show you the message above.
# Don't rerun this job. Rerunning will have no effect.
false
答案 0 :(得分:1)
u.name = new(string)
*u.name = myname
...
对于缩进/空格数量非常严格。就您而言,问题在于步骤缩进
Picasso.with(activity)
.load(path)
.placeholder(R.drawable.thumbnail_placeholder)
.resize(width,height)
.into(imageView);
replace it with this below code
Picasso.get()
.load(path)
.placeholder(R.drawable.thumbnail_placeholder)
.resize(width,height)
.into(imageView);