Build periodically #582

Closed
jpmckinney opened this Issue Jun 6, 2012 · 43 comments

Comments

Projects
None yet

Why build periodically?

In most cases, if the code hasn't changed, there is no reason to build. However, in some cases, something external to the code may cause it to fail. For example, if I scrape information from a website, that scraper code will fail if the website undergoes a redesign. I want to know about that failure, so that I can fix the code.

In #travis, @svenfuchs suggested that I open a ticket and ping @rkh about this new feature.

In terms of implementation, it was mentioned:

svenfuchs: i'd feel we'd look for an external solution that pings our listener just like github does but maybe konstantin has other ideas, too

I propose the interval be set in .travis.yml in either crontab format (0 0 * * 0) or words like daily, weekly, etc.

I wrote a little library for triggering builds programmatically: https://github.com/jpmckinney/travis-ping

Contributor

henrikhodne commented Jun 6, 2012

This could possibly be integrated with #277 too.

I believe cron has @daily, @weekly, or something similar, so it could be 100% valid cron syntax, if we go with that.

Owner

svenfuchs commented Jun 6, 2012

travis-ping looks very much like what i had in mind when i said "external solution". maybe someone wants to turn this into a little webapp?

I'd be happy to continue working on it (and I'm open to suggestions for better names!). Can someone point me to the Travis code that reads the payload? Is this it? https://github.com/travis-ci/travis-core/blob/master/lib/travis/github/payload/push.rb

Owner

svenfuchs commented Jun 6, 2012

@joshk @rkh ping. opinions?

Owner

joshk commented Jun 6, 2012

I know many repos would like this, and it does make sense.

I think it should be a feature we would have to flag per repo as it will put a strain on the system.

Maybe the cron could be stored in the .travis.yml but when the hub detects there is a cron value then it is updated in the db. We could then either havee another small app which schedules the builds, or a thread in the hub. The only thing we would need to think of is how we deal with different branches? Are we rebuilding all branches or just master?

On 6/06/2012, at 5:13 PM, Sven Fuchs wrote:

@joshk @rkh ping. opinions?


Reply to this email directly or view it on GitHub:
#582 (comment)

Owner

svenfuchs commented Jun 14, 2012

Actually I think this might be a feature we might want to take money for in future.

@joshk branches could be specified in .travis.yml, defaulting to just master

  • cron: [some cron tab]

and

  • cron:
    • tab: [some cron tab]
    • branches: develop

On Jun 6, 2012, at 5:18 PM, Josh Kalderimis wrote:

I know many repos would like this, and it does make sense.

I think it should be a feature we would have to flag per repo as it will put a strain on the system.

Maybe the cron could be stored in the .travis.yml but when the hub detects there is a cron value then it is updated in the db. We could then either havee another small app which schedules the builds, or a thread in the hub. The only thing we would need to think of is how we deal with different branches? Are we rebuilding all branches or just master?

On 6/06/2012, at 5:13 PM, Sven Fuchs wrote:

@joshk @rkh ping. opinions?


Reply to this email directly or view it on GitHub:
#582 (comment)


Reply to this email directly or view it on GitHub:
#582 (comment)

Contributor

henrikhodne commented Jun 14, 2012

How about this format?

cron: [some cron tab]

or

cron:
  - tab: [some cron tab]
    branches:
      - develop

Just a little tweak of @svenfuchs'.

What's the status of this feature request? We at rg3/youtube-dl would badly need it!

Owner

roidrage commented Nov 9, 2012

@FiloSottile sorry, we have yet to build something for this feature. building a tiny app that regularly triggers builds e.g. via our new API is still your best bet.

@FiloSottile could you rig something up with Zapier/IFTTT, google calendar, some bondo and a coat hanger?

Thanks for the quick reply!

Could you point me to the relevant API, @roidrage?

@lukewpatterson 😆 I just needed a new weekend DIY project!

You can probably use this code for triggering the build (have it run on cron or whatever?) https://github.com/jpmckinney/travis-ping

Aaaaand, a web app is live

--> http://traviscron.pythonanywhere.com

FYI, for anyone looking for a solution, see https://github.com/FiloSottile/travis-cron I deleted my travis-ping since it was no longer up-to-date with the Travis API, and FiloSottile's code does everything (and more!) than what travis-ping used to do.

Expensive integration builds are another example. We have a number of modules that are validated individually (moving from Jenkins to Travis -- thanks!), but also need to be integrated (e.g., build latest version of module with the latest scalac). The integration is too expensive to hold up scala PR validation for, so nightly builds would be useful. I'll work around it with Jenkins a coat hanger for now.

grosser commented Dec 13, 2013

👍 for something simple like "cron: 0 0 * * *"

stevo commented Dec 18, 2013

+1 - those nightly-integration builds would be awesome!

ranjib commented Dec 27, 2013

👍

drn commented Jan 16, 2014

+1 - We're also switching over to Travis-Pro from Jenkins and we'd really like to see this feature. We have integration tests that regularly run against a third-party's api using Jenkins. We can't fully move off of Jenkins until then... Would be great to consolidate all our testing infrastructure.

@lxbarth lxbarth referenced this issue in openaddresses/openaddresses Feb 11, 2014

Closed

Write tests #3

+1

+1

grosser commented Mar 6, 2014

how can you say no to that !?

On Thu, Mar 6, 2014 at 10:43 AM, Justin Campbell
notifications@github.comwrote:

https://github-camo.global.ssl.fastly.net/4161443eab1dbcebbd5caec11482937179b5b251/687474703a2f2f7461737465656d636265612e66696c65732e776f726470726573732e636f6d2f323031322f30372f70757373696e626f6f74732e676966

Reply to this email directly or view it on GitHubhttps://github.com/travis-ci/travis-ci/issues/582#issuecomment-36921338
.

vmalloc commented Mar 27, 2014

+1

felipec commented May 5, 2014

Yes please. Recently I caught an issue with Mercurial v3.0, but only after I did a push, it should have been caught earlier :(

JagCesar commented May 7, 2014

+1

marijn commented May 12, 2014

Would love to see a feature like this. It's called "continuous integration" after all 😉

grosser commented May 12, 2014

FYI using this to re-build private travis repos periodically via free
heroku cron service https://github.com/grosser/travis_cron

On Mon, May 12, 2014 at 7:55 AM, Marijn Huizendveld <
notifications@github.com> wrote:

Would love to see a feature like this. It's called "continuous
integration" after all [image: 😉]


Reply to this email directly or view it on GitHubhttps://github.com/travis-ci/travis-ci/issues/582#issuecomment-42841964
.

Owner

joshk commented May 13, 2014

I would be happy to work with someone in adding this feature to Travis.

I would like to keep the scope simple and allow for daily builds on a single branch.

If anyone is interested let me know.

Owner

joshk commented May 13, 2014

I've just talked to @simi and he is interested in tackling this :)

@MatthiasWinzeler MatthiasWinzeler referenced this issue in MatthiasWinzeler/bfh-os2-toolchain May 13, 2014

Closed

OSS2 - Aufgabe Continous Integration #10

+1

nextmat commented May 16, 2014

Happy you guys are actively working on this, we would be happy beta testers when you are ready for that.

Any word on when an initial implementation of this (having a repository built daily) might be available?

This would be very useful for us! +1

This would be amazing for my work flow. I'm not sure the language, but let if its nodejs I'd love to help out in the implementation!

@henrikhodne henrikhodne locked and limited conversation to collaborators Jun 27, 2014

Contributor

henrikhodne commented Aug 21, 2014

Someone suggested on IRC one way that would cover one use case for this would be a setting "rebuild whenever the build images are updated". I think it's probably a little too complex (for example, we would have to somehow spread the builds out), but it is an interesting idea, so I'm recording it here.

solarce commented Jul 21, 2015

@coderanger has built a super useful service to enable nightly builds of repositories on travis-ci.org.

You can check it out at https://nightli.es/.

Owner

roidrage commented Jul 23, 2015

With nightlies available, I'm closing this issue for the time being, as we have no immediate plans to support this kind of feature.

@roidrage roidrage closed this Jul 23, 2015

Owner

MariadeAnton commented May 10, 2016

Cron Jobs are now available https://docs.travis-ci.com/user/cron-jobs/ per request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.