Error migrating config to version 2

Hello all,
I am trying to migrating to 2.0 ,
and I got this error.
in job ‘build’: steps is not a list
can someone help me what is the reason ?

version: 2
jobs:
  build:
    docker:
      - image: circleci/ruby:2.2.3-jessie
    environment:
      AWS_REGION: eu-central-1
    steps:
      - checkout
      - run: echo "Tests are skipped because of static site."
      - run: mkdir -p /tmp/test-data
deploy:
  production:
    branch: master
    commands:
      - bundle exec middleman s3_sync

I’d guess that your steps key needs four spaces to the right to be valid - see the examples in the manual.

Thanks for your response,
actually the problem is that i am totally new in CircleCi , what do you mean by preformatted text in YAML ?(I have searched but couldn’t find helpful topic) can you explain more. also i changed the spaces to 4, but the problem still is remain.

oh, okay . I got it :slight_smile: I hope that other guys can help me to solve my problem .

The keys version and jobs should have no indentation, and yet you have four. Are you sure that what you have presented is an accurate representation of what is in your file?

If you changed the file on your side, please change it above too - it needs four additional spaces. That is aside from the problem that the whole file appears to be indented four spaces, which is incorrect.

One of my files looks like this:

version: 2
jobs:
  build:
    working_directory: /app
    docker:
      - image: docker/compose:1.20.1
    steps:
      - checkout

You need to ensure your YAML file has exactly the same indentation, starting from zero for version and jobs.

oh , it was my mistake, when i uploaded them .
so now i edited my post , and copy accurate file .
the main file does not have additional spaces.
maybe now you can realize better. :slight_smile:

I did changes, and now I got new error :

Build-agent version 0.1.1301-dd8e9365
Starting container circleci/ruby:2.2.3-jessie
image cache not found on this host, downloading circleci/ruby:2.2.3-jessie

Error response from daemon: manifest for circleci/ruby:2.2.3-jessie not found

The string circleci/ruby:2.2.3-jessie must be a valid Docker image on Docker Hub. Have a look at CircleCI’s Docker Hub page to find all the valid image names.

I checked Docker Hub , how can I realize which version of Ruby should I use ?
ruby:2.2.3-jessie this version was not available
(I did not do this configuration, someone else did it and I am trying to migrating, that’s why i have a lot of question :slight_smile: )

Find out from your application documentation what version it needs.

If that documentation does not exist, ask a colleague (and then write the documentation).

If your colleagues do not know, then choose the latest version that allows all your test to pass.

If you do not have any tests, find out what you are using in production, and then hope for the best. :grin:

thank you very much for your help,
I changed ruby 2.2.3 to 2.3 , and then the problem is gone :)))

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.