Add support for testing release builds 49/34149/4
authorJozef Behran <jbehran@cisco.com>
Fri, 5 Feb 2016 12:31:22 +0000 (13:31 +0100)
committerJozef Behran <jbehran@cisco.com>
Fri, 5 Feb 2016 13:30:58 +0000 (14:30 +0100)
It turns out the only change needed is to introduce the
BUNDLE_URL variable which is supposed to hold the URL from
which the tested ODL distribution is downloaded.
The releng jobs shall use ACTUALBUNDLEURL environment
variable to fill this Robot variable. The code then gets the
URL, snips out everything starting from "org/opendaylight"
and uses the result as the base URL. This makes the "type"
argument of the deployment keyword unnecessary so it was
removed.

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

index 4061559317d5a0a2a358fab4b153a06e5a303927..8ce1461b61ed48c6231a185900dadf4b33dfb901 100644 (file)
@@ -11,6 +11,7 @@ Documentation     Nexus repository access keywords.
 ...               This library encapsulates a bunch of somewhat complex and commonly used
 ...               netconf operations into reusable keywords to make writing netconf
 ...               test suites easier.
+Library           OperatingSystem
 Library           SSHLibrary
 Library           String
 Resource          SSHKeywords.robot
@@ -59,9 +60,13 @@ NexusKeywords__Detect_Version_To_Pull
     [Return]    ${version}    ${location}
 
 Deploy_Artifact
-    [Arguments]    ${component}    ${artifact}    ${name_prefix}    ${name_suffix}=-executable.jar    ${type}=snapshot
+    [Arguments]    ${component}    ${artifact}    ${name_prefix}    ${name_suffix}=-executable.jar
     [Documentation]    Deploy the specified artifact from Nexus to the cwd of the machine to which the active SSHLibrary connection points.
-    ${urlbase}=    BuiltIn.Set_Variable    ${NEXUSURL_PREFIX}/content/repositories/opendaylight.${type}
+    ...    Must have ${BUNDLE_URL} variable set to the URL from which the
+    ...    tested ODL distribution was downloaded and this place must be
+    ...    inside a repository created by a standard distribution
+    ...    construction job.
+    ${urlbase}=    String.Fetch_From_Left    ${BUNDLE_URL}    /org/opendaylight
     ${version}    ${location}=    NexusKeywords__Detect_Version_To_Pull    ${component}
     # TODO: Use RequestsLibrary and String instead of curl and bash utilities?
     ${url}=    BuiltIn.Set_Variable    ${urlbase}/${location}/${artifact}/${version}
@@ -78,10 +83,10 @@ Deploy_Artifact
     [Return]    ${filename}
 
 Deploy_Test_Tool
-    [Arguments]    ${component}    ${artifact}    ${suffix}=executable    ${type}=snapshot
+    [Arguments]    ${component}    ${artifact}    ${suffix}=executable
     [Documentation]    Deploy a test tool.
     ...    The test tools have naming convention of the form
-    ...    "${type}/some/dir/somewhere/<tool-name>/<tool-name>-<version-tag>-${suffix}.jar"
+    ...    "<repository_url>/some/dir/somewhere/<tool-name>/<tool-name>-<version-tag>-${suffix}.jar"
     ...    where "<tool-name>" is the name of the tool and "<version-tag>" is
     ...    the version tag that is digged out of the maven metadata. This
     ...    keyword calculates ${name_prefix} and ${name_suffix} for
@@ -89,5 +94,5 @@ Deploy_Test_Tool
     ...    work of deploying the artifact.
     ${name_prefix}=    BuiltIn.Set_Variable    ${artifact}-
     ${name_suffix}=    BuiltIn.Set_Variable    -${suffix}.jar
-    ${filename}=    Deploy_Artifact    ${component}    ${artifact}    ${name_prefix}    ${name_suffix}    ${type}
+    ${filename}=    Deploy_Artifact    ${component}    ${artifact}    ${name_prefix}    ${name_suffix}
     [Return]    ${filename}