add check on component version into cleanup function

This commit is contained in:
Roberto Cirillo 2022-05-10 14:24:02 +02:00
parent 10ec47cbe5
commit 9101fdf173
1 changed files with 6 additions and 4 deletions

10
Jenkinsfile vendored
View File

@ -127,9 +127,9 @@ pipeline {
expression {
env.TRIGGER_CD.toBoolean()
}
expression {
return env.TRIGGER_VERSION.contains("SNAPSHOT")
}
// expression {
// return env.TRIGGER_VERSION.contains("SNAPSHOT")
// }
anyOf{
triggeredBy 'BuildUpstreamCause'
@ -233,7 +233,9 @@ def deploy(String service, String version, String host){
//Implement a new method in order to check the input parameters
def checkup(String service, String version, String host){
sh("""
exit 0;
if [![ "$version" == *"SNAPSHOT"* ]]; then
exit 1;
fi
""")
}