Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Zip the folder to publish using Jazz Ant Build task

 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>

0 votes



One answer

Permanent link
See http://lmgtfy.com/?q=Ant+task+to+zip , first result. This is really an ANT question and not an RTC question. 

0 votes

Comments

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? 

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

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121

Question asked: Nov 19 '15, 5:46 a.m.

Question was seen: 2,280 times

Last updated: Nov 19 '15, 9:40 a.m.

Confirmation Cancel Confirm