-
Notifications
You must be signed in to change notification settings - Fork 3
Make it possible to know that this is a nightly build from the Travis script #12
Comments
+1 |
+1 My use case is to run unit tests only on regular builds that are triggered with each PR and also run longer full integration tests on builds that are triggered by nightlies. Looks like the Travis API to trigger builds allows to override some of the configuration in the |
I've just investigated how we could implement this, and I don't see a nice way to do it with the current state of the Travis API. I wanted to automatically set a The Travis API allows you to overwrite the environment variables that you set in your Exploring the Travis documentation though, I've found out that they do set a |
Hmm, one option would be to have your build script poke the Travis API (the build ID should be available in an env var I think) and check the build type or message. I'll leave this open because that's a weird and annoying fix but I think that's the best approach for now. |
Actually you can add an environment variable according to the docs I reviewed just now. So knowing this, would it be difficult to add an environmental variable called "NIGHTLIES"? Or better yet, give us a way via the Nightl.ies app to specify |
Hi @akutz. Yeap, you can add config keys, but you won't be able to add environment variables to the |
You know, I still think that's okay if you give us the option to include a snippet because I for one could just edit my script command to use |
Also, thank you for responding so quickly and politely even after I asked a dumb question to which you were already familiar with the answer. I guess I missed the original bits :) |
So I just triggered this build with the following snippet:
Damn you for being correct on the replacement! :) How useless is that then? "Merge" is far from accurate as far as I'm concerned as it only merges top-level keys. Come on Travis! Deep merge needed! |
We could possibly grab the configured env vars from the last build and implement the merge locally but down this path likely lies madness. |
As of May 2016, Travis now supports cron jobs: travis-ci/travis-ci#582. If triggered by cron, a build will have the environment variable If you'd rather stick with Nightli.es, and nothing else is using the Travis API to launch your builds, you could check if |
Right now, IIUC, there's no way for the Travis script to know that the current job was launched by Nightli.es. It would be very useful to be able to know this, since we could perform custom tasks in the nightly build. Our use case is automatically updating a benchmark suite every night; we don't want to run the suite on each push to master, but only when the build is triggered by Nightli.es.
The text was updated successfully, but these errors were encountered: