You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def generateTag() {
def date = new Date().format('yyyy-MM-dd-HH-mm')
return System.env.CI_PIPELINE_IID ?: date // use pipeline counter if available
}
Output:
val generateTag() {
val generateTag() {
val date = new Date().format("yyyy-MM-dd-HH-mm")
return System.env.CI_PIPELINE_IID ?: date // use pipeline counter if available
}
return System.env.CI_PIPELINE_IID ?: date // use pipeline counter if available
}
Additionally: In groovy it is possible to declare a method as static like:
static def generateTag() {
def date = new Date().format('yyyy-MM-dd-HH-mm')
return System.env.CI_PIPELINE_IID ?: date // use pipeline counter if available
}
What the script puts out is like (Already eliminated duplicated lines from bug above):
static val generateTag() {
val date = new Date().format("yyyy-MM-dd-HH-mm")
return System.env.CI_PIPELINE_IID ?: date // use pipeline counter if available
}
But static val does not exist in Kotlin dsl.
Correct would be this output:
fun generateTag() {
val date = new Date().format("yyyy-MM-dd-HH-mm")
return System.env.CI_PIPELINE_IID ?: date // use pipeline counter if available
}
The text was updated successfully, but these errors were encountered:
The conversion of a function seems to be broken.
Input:
Output:
Additionally: In groovy it is possible to declare a method as static like:
What the script puts out is like (Already eliminated duplicated lines from bug above):
But static val does not exist in Kotlin dsl.
Correct would be this output:
The text was updated successfully, but these errors were encountered: