It's all about the answers!

Ask a question

Unable to download artifacts immediately after creating asset version using ant tasks


Colin Thorne (22421619) | asked Jun 12 '14, 3:57 a.m.
edited Jun 12 '14, 8:09 a.m.
Is there a delay between changing an asset and being able to use it? 

I am using Rational Asset Manager to upload the results of a build step using the RAM ant tasks. I am successfully creating a new version of the asset and then adding some artifacts as content.
In a following build step (about 10 seconds later), I use the ram:download ant task to search for that version of the asset and download the content. However I see the message:
[ram:download] Nothing to download.
If I add a 60 second delay then the download works successfully. If there is a delay between the asset becoming available with the latest content, is there any way via the API to know when that has happened?

Thanks for any help, Colin.

Comments
Lin Lu commented Jun 23 '14, 10:38 p.m.
JAZZ DEVELOPER

Hi,
I am curious about how you use the ramDownloadAsset.xml. Did you add a Search type or  a Asset type? That would be helpful if you could offer the script here.

Thanks.


Colin Thorne commented Jun 24 '14, 3:30 a.m.

I am using a search including the name, community and version. Here is a snippet of my code (let me know if you would like to see more):

        <echo message="Downloading into: ${lib.dir}" />
        <mkdir dir="${lib.dir}" />
        <ram:download destdir="${lib.dir}" extract="true" overwrite="true" preservePath="true" clearCache="true">
            <ram:server refID="${ramServerID}" />
            <ram:search name="${ram.asset.name}" community="${ram.community}" version="${ram.asset.version}" />
        </ram:download>

One answer



permanent link
Lin Lu (3063) | answered Aug 18 '14, 2:04 a.m.
JAZZ DEVELOPER
Hi,

Thanks for update.

I agree with you that there is a dely between a asset submit and RAM index. I think you use a asset search here to fetch the newly upload asset, but it is not recorded in index yet.

One way I can think of is that, if you can record the asset identification(guid/version) if the newly uploaded asset, and use ram:asset type in download task instead of search. This could allow download task to fetch asset directly instead of search in index.

<ram:asset guid="${ram.asset.guid}" version="${ram.asset.version}" />

Hope that could help.

Comments
Colin Thorne commented Aug 18 '14, 4:26 a.m.

Thanks for the suggestion. I thought I tried that however it was a little while ago (and I might still have been using the search with the guid). Anyway, I'll give that a try when I have a minute and let you know how I get on.

Thanks, Colin.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.