Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

travis build being triggered continuously/in a loop with flux-sync tag #852

Closed
itsmesinghavneet opened this issue Nov 22, 2017 · 3 comments

Comments

@itsmesinghavneet
Copy link

We have automated deployment of a kubernetes manifest using fluxctl. Changes to the yaml are resulting in successful deployments - but we see travis build being triggered continuously/in a loop with flux-sync tag - why is this happening, how do we avoid this

@squaremo
Copy link
Member

Flux uses a tag to mark the revision up to which it has synchronised the cluster. Whenever it synchronises new commits, it changes where the tag points and pushes that to the upstream (github) repo.

My guess is that TravisCI is noticing that a tag moved in the repo, and triggering a rebuild. To be honest we hadn't really anticipated that! We use CircleCI, which builds branches but doesn't appear to build tags unless you explicitly put config in to do that.

https://docs.travis-ci.com/user/customizing-the-build/#Building-Specific-Branches explains how to control which branches and tags trigger builds. I think you want, in your .travis.yml file, something like

branches:
  except:
  - flux-sync

(you may need to change the flux-sync value, depending on what fluxd has been given as arguments -- that's the default value).

@squaremo
Copy link
Member

I think this deserves a bit of documentation -- a section in faqs, or somewhere in site/ anyway.

@squaremo
Copy link
Member

squaremo commented Jun 5, 2018

You can use the --git-ci-skip (and optionally, --git-ci-skip-message) to tell flux to label all its commits with [ci skip] (or your own extra text). See #1011

@squaremo squaremo closed this as completed Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants