Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
periodically triggers teamcity builds. just stuff it in the dev console (but don't forget it running!)
(function (triggerIntervalSeconds) {
triggerIntervalSeconds = triggerIntervalSeconds || (60 * 5);
var runInterval = triggerIntervalSeconds * 1000;
var runBuildTimeout = 300;
function runBuild(done) {
var runBtn = jQuery("button:contains(Run)")[0];
console.log('opening build run dialog...');
runBtn.dispatchEvent(new Event('click'));
setTimeout(function () {
var releaseForm = document.querySelector('#runBuild');
console.log('submitting build run...');
releaseForm.dispatchEvent(new Event('submit'));
}, runBuildTimeout);
function task() {
setTimeout(function () {
}, runInterval);
})(/* triggerIntervalSeconds: number */);

This comment has been minimized.

Copy link
Owner Author

@eliranmal eliranmal commented Mar 20, 2017

by the way, using this gist is a bad idea. don't do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.