From: Jozef Behran Date: Fri, 5 Feb 2016 11:37:37 +0000 (+0100) Subject: Handle missing maven-metadata.xml at artifact location better X-Git-Tag: release/beryllium-sr1~129 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=afba4b062cb40102ad60a917f917066494170608 Handle missing maven-metadata.xml at artifact location better 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 --- diff --git a/csit/libraries/NexusKeywords.robot b/csit/libraries/NexusKeywords.robot index 6cd2342682..4061559317 100644 --- a/csit/libraries/NexusKeywords.robot +++ b/csit/libraries/NexusKeywords.robot @@ -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}