Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation/CircleCI]: Only build on the merge, not PR #69

Closed
quinnturner opened this issue Mar 31, 2019 · 2 comments · Fixed by #122
Closed

[Documentation/CircleCI]: Only build on the merge, not PR #69

quinnturner opened this issue Mar 31, 2019 · 2 comments · Fixed by #122
Labels
bug Something isn't working

Comments

@quinnturner
Copy link
Member

In Travis-CI, we only build on the merge, not the PR.

script:
  # Have audit-ci run audit-ci to audit itself :)
  - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then node lib/audit-ci.js -l --config ./audit-ci.json; fi

However, on CircleCI, we build on the PR:

      # In your code, add this (after installing with `npm install --save-dev audit-ci`):
      # - run:
      #    name: run-audit-ci
      #    command: 'audit-ci --moderate'

      # Have audit-ci run audit-ci to audit itself :)
      - run:
          name: run-audit-ci
          command: node lib/audit-ci.js -l --config ./audit-ci.json

This can result in the following scenario:

  1. Push a new feature with PR, but master has new vulnerabilities, breaking the PR
  2. Create a fix PR with the new advisories, merge PR into master
  3. Re-run the feature workflow
    • Travis-CI will pass
    • CircleCI will fail

The expected behaviour (Travis-CI and CircleCI): pass.
The current behaviour: Travis-CI - pass, CircleCI - fail.

image

CircleCI should build on the merge rather than the PR.

This issue would be resolved by:

  1. Updating the docs to suggest the new CircleCI workflow implementation
  2. Implement the new CircleCI workflow
@quinnturner quinnturner added the bug Something isn't working label Mar 31, 2019
@quinnturner
Copy link
Member Author

This occurred in #66

@quinnturner
Copy link
Member Author

Fixed:

Runs in PR (desired): https://app.circleci.com/jobs/github/quinnturner/audit-ci/147
Doesn't run in master (desired): https://app.circleci.com/jobs/github/IBM/audit-ci/140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant