Skip to content

Instantly share code, notes, and snippets.

@belenaj
Last active July 27, 2019 08:16
Show Gist options
  • Save belenaj/8e35dd702cae8df1793ef0201288b258 to your computer and use it in GitHub Desktop.
Save belenaj/8e35dd702cae8df1793ef0201288b258 to your computer and use it in GitHub Desktop.
// ...
def endDate = new Date().clearTime() // today
def startDate = endDate - 30
def newDateParsed
startDate.upto(endDate) {
newDateParsed = it.format("yyyy-MM-dd")
println(newDateParsed)
stage("newDateParsed ${newDateParsed}") {
// do your stuff here
}
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment