Migrating issue on Circle ci 1.0 to 2.0 configuration

I’m trying to migrating 1.0 to 2.0. Seem like I have a lot of issues. Somebody please help me.

Here is my 1.0 Config file.

general:
  branches:
    only:
     - develop
     - /hotfix.*/

dependencies:
  cache_directories:
    - "app/webroot/node_modules"
  override:
    - cd app/webroot && npm install

test:
  pre:
    - git config --global user.email "developers@llcompanyname.com" && git config --global user.name "Circle CI"
  override:
    - cd app/webroot && npm run minify

deployment:
  automerge:
    branch: [develop, /hotfix.*/]
    commands:
      - git add -A
      - git diff --quiet --exit-code --cached || git commit -m 'Javascript Minification [skip ci]'
      - git push origin $CIRCLE_BRANCH

After I change to 2.0

version: 2
  jobs:
  general:
    branches:
      only:
       - develop
       - /hotfix.*/

dependencies:
  cache_directories:
    - "app/webroot/node_modules"
  override:
    - cd app/webroot && npm install

test:
  pre:
    - git config --global user.email "developers@llcompanyname.com" && git config --global user.name "Circle CI"
  override:
    - cd app/webroot && npm run minify


workflows:
  version: 2
  build-deploy:
    jobs:
      automerge:
      branch: [develop, /hotfix.*/]
      commands:
        - git add -A
        - git diff --quiet --exit-code --cached || git commit -m 'Javascript Minification [skip ci]'
        - git push origin $CIRCLE_BRANCH

I think you may have forgotten to describe what problem you’re having :grinning:

Personally I would suggest starting from scratch. Remove the dependencies and test sections (they don’t look like jobs) and the workflow, and get a single job working. You will need to specify the docker executor and an appropriate image for your build container.

Hey @halfer sorry for late reply.

Thanks for your helpful message.

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