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

enable travis for all branches & disable for release tags #11

Closed
gr2m opened this issue Sep 17, 2017 · 3 comments
Closed

enable travis for all branches & disable for release tags #11

gr2m opened this issue Sep 17, 2017 · 3 comments
Assignees

Comments

@gr2m
Copy link
Member

gr2m commented Sep 17, 2017

Hey can you enable to run builds for all branches? When having commit access, we usually create branches and create a pull request from these

only:
- master
- /^greenkeeper.*$/

But you can disable builds for the release tags by adding

branches:
  except:
  - /^v\d+\.\d+\.\d+$/
@pvdlg
Copy link
Member

pvdlg commented Sep 17, 2017

It's already the case because Travis is configured to build the PR and the push.
Therefore:

  • A push on a feature branch will build as soon there is a PR open (and rebuild on each push)
  • A push on master will trigger a build
  • A push on a greenkeeper branch will trigger a build even if there is no PR

The current config as the advantage of triggering only one build when you open a PR from a branch of the repo. With the one you propose it would trigger a PR build and a push build each time (which is not necessary, use Travis resources and delay the feedback from Travis)

See travis-ci/travis-ci#1147

@gr2m
Copy link
Member Author

gr2m commented Sep 17, 2017

Thanks for the explanation, that makes perfectly sense 👍

@gr2m gr2m closed this as completed Sep 17, 2017
@gr2m
Copy link
Member Author

gr2m commented Sep 18, 2017

actually let’s add this link as comment to the .travis.yml so others (including my future self) don’t ask themselves the same question :)

@gr2m gr2m reopened this Sep 18, 2017
pvdlg added a commit that referenced this issue Sep 18, 2017
@gr2m gr2m closed this as completed in #13 Sep 18, 2017
gr2m pushed a commit that referenced this issue Sep 18, 2017
tlvince added a commit to tlvince/cli that referenced this issue Apr 24, 2018
Without this, if a PR is opened for a branch, Travis creates two builds;
one for the branch and one for the PR itself. When Travis is configured
(in the UI) to build both the push and PR (the default), I think a
better default for builds is to trigger only _one_ build.

Semantic release itself uses this set up, see:
semantic-release/commit-analyzer#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants