Skip to content

Instantly share code, notes, and snippets.

Last active August 8, 2018 22:59
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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 */);
Copy link

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