How do I configure version 2 yml to have webhooks section?

circle.yml

#1

Hi there!

I’m trying to add webhooks section to circle yml file but seems like I’m doing something wrong.

Below is how my file looks like:

version: 2
jobs:
build:
docker:
- image: ruby:2.3.3
environment:
- LANG: C.UTF-8
parallelism: 2
working_directory: bla
steps:
- checkout
- run:
name: bla
command: bla
notify:
webhooks:
- url: my_url

Any thoughts?


#2

Your whitespacing is 100% broken without using ``` but try adding the 1.0 syntax of notify to the top of your config. It should work.


#3

This seems to work…

version: 2
jobs:
  build:
    working_directory: ~/circulate
    docker:
      - image: chef/chefdk:1.2.22
    steps:
      - checkout
      - run:
          name: Run CircleCI Rake Task
          command: /opt/chefdk/embedded/bin/rake circleci --trace
notify:
  webhooks:
    - url: https://webhooks.gitter.im/e/000000000000000

The editor totally needs a preview… just sayin’

Thanks


#4

Yeah, that worked! Thanks levonbecker! I miss placed the notify section, i thought it would be same level as build and step sections.


#5