Groovy web console

subscribe to the feed Subscribe
to this
site

Cloning pipeline v1.0

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


println "Today, day #${dayOfYear} of the year, it is ${machineSource} -> ${machineTarget}"