It's all about the answers!

Ask a question

Zip the folder to publish using Jazz Ant Build task


Sajjad Ali Khan (314152) | asked Nov 19 '15, 5:46 a.m.
 Hi Guys,

I have created a build script i.e. Build.xml file for my project developed in Visual studio, which is shared in Jazz repository via RTC visual studio client.

I am able to build and publish my project artifacts to the build result successfully using build.xml below. But I want to publish my artifacts in zip form. 

What tasks should I add to below build script to "zip" the artifacts and publish them to build results?


<?xml version="1.0" encoding="utf-8" ?>
<project name="CalculatorProject_User1" default="startActivity">
  <property name="userId" value="sajjad"/>
  <property name="password" value="sajjad"/>
  <import file="C:\Program Files (x86)\IBM\TeamConcertBuild\buildsystem\buildtoolkit\BuildToolkitTaskDefs.xml"/>

  <target name="startActivity">
    <startBuildActivity repositoryAddress="${repositoryAddress}"
                userId="${userId}"
                password="${password}"
                activityIdProperty="buildactivityId"
                label="${activityLabel}"
                autoComplete="true"
                verbose="true"
                buildResultUUID="${buildResultUUID}" />
  </target>

  <target name="publishActivity">
    <tstamp/>
    <startBuildActivity
        buildResultUUID="${buildResultUUID}"
        label="${activityLabel}"
        autoComplete="true"
          repositoryAddress="${repositoryAddress}"
        userId="${userId}"
       password="${password}"/>

    <artifactFilePublisher repositoryAddress="${repositoryAddress}"
                 userId="${userId}"
                 password="${password}"
                 buildResultUUID="${buildResultUUID}"
                 filePath="C:\Users\Administrator\Documents\Visual Studio 2010\LocalSandbox\ExampleProject\ExampleProject\bin\Debug\ExampleProject.exe"
                 label="ExampleProject Debug Executable"/>

    <artifactFilePublisher repositoryAddress="${repositoryAddress}"
                userId="${userId}"
                password="${password}"
                buildResultUUID="${buildResultUUID}"
                filePath="C:\Users\Administrator\Documents\Visual Studio 2010\ExampleProject\ExampleProject\bin\Debug\ExampleProject.pdb"
                label="ExampleProject pdb symbols"/>

    <linkPublisher repositoryAddress="${repositoryAddress}"
             userId="${userId}"
             password="${password}"
             buildResultUUID="${buildResultUUID}"
             url="http://www.ibm.com"
             label="www.ibm.com" />
  </target>
</project>

One answer



permanent link
Ralph Schoon (63.2k33646) | answered Nov 19 '15, 7:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
See http://lmgtfy.com/?q=Ant+task+to+zip , first result. This is really an ANT question and not an RTC question. 


Comments
Sajjad Ali Khan commented Nov 19 '15, 9:04 a.m.

I know this is related to ANT but IBM RTC is using Ant Build tool kit for publishing artifacts. If we not use ANT, How does RTC helps us to publish a "zip" to the build result? 


Ralph Schoon commented Nov 19 '15, 9:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

RTC just provides additional ANT tasks for RTC build related tasks. For everything else use the existing ANT tasks. So if you have a zip file there is an artifact publishing task that you can use. You can find more information here

https://jazz.net/library/article/1286
https://jazz.net/help-dev/clm/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html


Ralph Schoon commented Nov 19 '15, 9:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.