Groovy web console

subscribe to the feed Subscribe
to this
site

What machine will be updated

Published 4 months ago by ReneAtAround
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
int NUMBER_OF_MACHINES = 2
int dayOfYear = Calendar.getInstance().get(Calendar.DAY_OF_YEAR)
print "machineTarget = build${1 + ((1 + dayOfYear) % NUMBER_OF_MACHINES)}"
print "machineSource = build${1 + (dayOfYear % NUMBER_OF_MACHINES)}"