Build won't trigger on commit


#1

In below link, I can see that it’s sending commits to circleci but in circleCI, commits don’t show up.

https://github.com/org/repo/settings/hooks/

the circled one is the one having the problem, Is there any reason why It’s showing another icon compared to other projects??

config.yaml

env: &env
  docker:
    - image: circleci/node:10.3.0
  working_directory: ~/repo

version: 2
jobs:
  build:
    <<: *env
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-

      - run: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      - run: npm run test
      - run: npm run build

  deploy:
    <<: *env
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-

workflows:
  version: 2
  build-deploy:
    jobs:
      - build
      - deploy:
          required:
            - build
          filters:
            branches:
              only: master

It’s really weird because It’s been working really well but stopped working since a week ago.


#2

I believe the CircleCI parser is looking for config.yml, and if you use config.yaml, it won’t find the config file.


#3

Under the deploy job in the workflow you’re using the wrong keyword, it should be:

- deploy:
   requires:
       - build

Also at least according to the official documentation, the file it’s looking for is config.yml.

https://circleci.com/docs/2.0/gh-bb-integration/#adding-a-circleciconfigyml-file

If you click on the repository and view the list of build jobs, you’ll see the icon refers to “Needs Setup”. If you then click on that to view the actual build, from memory it’ll tell you some information about what is wrong.

I’ve been using the local-cli tool to validate my config files before pushing them to the repo. I really need to set it up as a pre-commit hook as well.

https://circleci.com/docs/2.0/local-cli/