Commit Graph

9 Commits

Author SHA1 Message Date
Shahidh K Muhammed
a83adf6503 skip ciignore check for release branches 2019-03-07 21:47:27 +05:30
Shahidh K Muhammed
a1089c1ec5
support ciignore for master builds too (#1708) 2019-03-07 17:48:06 +05:30
Shahidh K Muhammed
17183caed4
adds a check to see if the jobs should be run or not (close #1161) (#1705)
CircleCI jobs are run for any PR that is submitted to the repo. This PR adds a check to decide whether the job should be run or not.

Figured out that CircleCI has a way to gracefully terminate a job:
```
circleci-agent step halt
```

A `.ciignore` file is ran against all the changes in the PR to decide whether the PR should be built or not. If the answer comes out as `no`, a file is written at `/buid/skip_job.txt`. This is done in the `check_build_worthiness` step.

All further jobs, in the beginning, looks for this file and gracefully terminates the job if this file is present. The directory is passed down to the jobs as the workspace.

```yaml
  skip_job_on_ciignore: &skip_job_on_ciignore
    run: |
      if [ -f /build/skip_job.txt ]; then
        echo "halting job due to /build/skip_job.txt"
        circleci-agent step halt
      fi
```

ref: https://support.circleci.com/hc/en-us/articles/360015562253-Conditionally-end-a-running-job-gracefully

There are some known issues on jobs that are run when PR is merged to master, need to address them after this PR is merged.
2019-03-07 11:28:03 +05:30
Shahidh K Muhammed
07181123b4
disable checking build worthiness until a better solution is found (#1162) 2018-12-04 10:33:20 +05:30
Vamshi Surabhi
dcde969d66 ignore certain headers from the request when calling the webhook (close #260) (#261) 2018-08-06 19:36:48 +05:30
Shahidh
0b15987db9
ciignore: always pass checks for tags 2018-07-21 01:38:16 +05:30
Shahidh K Muhammed
7a42e7a7fa
ciignore: always build master branch (#162)
* always pass build worthiness check for master

[skip ci]
2018-07-18 17:13:37 +05:30
Shahidh K Muhammed
3cb62622b2
update ciignore to take circleci compare url (#158) 2018-07-18 11:16:52 +05:30
Shahidh K Muhammed
92935bed40
add ciignore (#153)
Builds with changes only to files mentioned in `.ciignore` will fail on circleci at the `check_build_worthiness` step.
2018-07-18 11:00:52 +05:30