Handle missing maven-metadata.xml at artifact location better 48/34148/2
authorJozef Behran <jbehran@cisco.com>
Fri, 5 Feb 2016 11:37:37 +0000 (12:37 +0100)
committerVratko Polák <vrpolak@cisco.com>
Fri, 5 Feb 2016 12:47:50 +0000 (12:47 +0000)
When there is no maven-metadata.xml file in the directory
where the artifact is located, assume the version part in the
artifact name is equal to the name of the directory where the
artifact is located. This is needed to support releases which
don't use maven-metadata.xml in the directories with
additional artifacts.

Change-Id: I593305471107c02c66c6c1bb004c3d2a8c6842ac
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/libraries/NexusKeywords.robot

index 6cd2342682811597181dfb33e6c31d39c8224904..4061559317d5a0a2a358fab4b153a06e5a303927 100644 (file)
@@ -68,7 +68,7 @@ Deploy_Artifact
     ${namepart}=    SSHLibrary.Execute_Command    curl ${url}/maven-metadata.xml | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1
     BuiltIn.Log    ${namepart}
     ${length}=    BuiltIn.Get_Length    ${namepart}
-    BuiltIn.Run_Keyword_If    ${length} == 0    BuiltIn.Fail    Artifact "${artifact}" not found in component "${component}"
+    ${namepart}=    BuiltIn.Set_Variable_If    ${length} == 0    ${version}    ${namepart}
     ${filename}=    BuiltIn.Set_Variable    ${name_prefix}${namepart}${name_suffix}
     BuiltIn.Log    ${filename}
     ${url}=    BuiltIn.Set_Variable    ${url}/${filename}