Is there a way to annotate a deployconfig with timestamp?

7/23/2018

In short, I'm trying to add an annotation with the actual time.

cmd line should like (or not) :

oc annotate --overwrite dc webtest Last_Jmeter_test='timestamp'

Thanks for any advice!

-- Tylor
kubernetes
openshift

1 Answer

7/23/2018

So I've found a way .

 node ('master'){
  stage("date") {
        date = sh(
            script: """
            date
            """,
            returnStdout: true
        )
        echo "${date}"
    }
}

this is by using jenkins .

oc annotate --overwrite dc webtest Last_Jmeter_test='${date}'
-- Tylor
Source: StackOverflow