It's all about the answers!

Ask a question

upload build file to team server


Mallikarjuna Rao (2641) | asked Nov 03 '08, 5:53 p.m.
Hi,

I just curious to know whether is there any option to upload the final build images(jar/tar.gz/etc) to the jazz team server once the code is built. I tried looking for this in the forum but unable to find any info. Can any one of you let me know whether we have such option in Jazz. And any documentation or users guide to do this.

--
Thanks & Regards,
Mallik

10 answers



permanent link
Ryan Manwiller (1.3k1) | answered Nov 06 '08, 2:18 p.m.
JAZZ DEVELOPER
This is really strange. The only thing I can think of is that your jbe is
running against a different repository
than you specify in the task.

<artifactLinkPublisher>
repositoryAddress="https://<repository>/jazz"

Obviously, they must be the same.

I would suggest the best practice of using the property instead of
hardcoding:

<artifactLinkPublisher>
repositoryAddress="${repositoryAddress}"

Also, at this point, it might make sense to start over with an example
(https://jazz.net/wiki/bin/view/Main/AntBuild) and once you get that
working, to transfer that goodness to your current script.

permanent link
Mallikarjuna Rao (2641) | answered Nov 06 '08, 1:03 p.m.
No, I'm not using CompleteBuildTask at all. I have only artifactLinkPublisher (which i mentioned earlier) in my build.xml. Do we need to have this?.

Are you using the CompleteBuildTask with the "buildNotNecessary" attribute
set to true in your build script?

Don Weinand
Jazz Team Buil

"mallikjazz" <malli> wrote in message
news:gev30n$g7h$1@localhost.localdomain...
Ryan Manwillerwrote:
Try this...

On the Ant page in the build definition, go to the "Properties
file" field.
Put some absolute path there, like
C:\temp\test.properties

Then, when you run your build, this file will get created containing
all the
available properties. It will let us see exactly whats defined or
not.

Please try this and include the file in your reply.

Gave /home/mallik/test.properties in properties field of ant page:

And the file test.properties contains:

#Thu Nov 06 09:18:33 CST 2008
buildLabel=20081106-0918
buildDefinitionId=Test Team build
com.ibm.team.build.internal.template.id=com.ibm.team.build.ant
buildResultUUID=_BN1BkKwWEd2giYQMdHqWIQ
com.ibm.team.build.internal.engine.monitoring.threshold=3
repositoryAddress=https\://<repository>\:9443/jazz/
requestUUID=_BN0agawWEd2giYQMdHqWIQ

The property buildResultUUID is same as the one present in the build
output.
--
Thanks & Regards,
Mallik

permanent link
Don Weinand (7851) | answered Nov 06 '08, 10:58 a.m.
JAZZ DEVELOPER
Are you using the CompleteBuildTask with the "buildNotNecessary" attribute
set to true in your build script?

Don Weinand
Jazz Team Buil

"mallikjazz" <malli> wrote in message
news:gev30n$g7h$1@localhost.localdomain...
Ryan Manwillerwrote:
Try this...

On the Ant page in the build definition, go to the "Properties
file" field.
Put some absolute path there, like
C:\temp\test.properties

Then, when you run your build, this file will get created containing
all the
available properties. It will let us see exactly whats defined or
not.

Please try this and include the file in your reply.

Gave /home/mallik/test.properties in properties field of ant page:

And the file test.properties contains:

#Thu Nov 06 09:18:33 CST 2008
buildLabel=20081106-0918
buildDefinitionId=Test Team build
com.ibm.team.build.internal.template.id=com.ibm.team.build.ant
buildResultUUID=_BN1BkKwWEd2giYQMdHqWIQ
com.ibm.team.build.internal.engine.monitoring.threshold=3
repositoryAddress=https\://<repository>\:9443/jazz/
requestUUID=_BN0agawWEd2giYQMdHqWIQ

The property buildResultUUID is same as the one present in the build
output.
--
Thanks & Regards,
Mallik

permanent link
Mallikarjuna Rao (2641) | answered Nov 06 '08, 10:28 a.m.
Try this...

On the Ant page in the build definition, go to the "Properties file" field.
Put some absolute path there, like
C:\temp\test.properties

Then, when you run your build, this file will get created containing all the
available properties. It will let us see exactly whats defined or not.

Please try this and include the file in your reply.


Gave /home/mallik/test.properties in properties field of ant page:

And the file test.properties contains:

#Thu Nov 06 09:18:33 CST 2008
buildLabel=20081106-0918
buildDefinitionId=Test Team build
com.ibm.team.build.internal.template.id=com.ibm.team.build.ant
buildResultUUID=_BN1BkKwWEd2giYQMdHqWIQ
com.ibm.team.build.internal.engine.monitoring.threshold=3
repositoryAddress=https\://<repository>\:9443/jazz/
requestUUID=_BN0agawWEd2giYQMdHqWIQ

The property buildResultUUID is same as the one present in the build output.
--
Thanks & Regards,
Mallik

permanent link
Ryan Manwiller (1.3k1) | answered Nov 05 '08, 6:48 p.m.
JAZZ DEVELOPER
Try this...

On the Ant page in the build definition, go to the "Properties file" field.
Put some absolute path there, like
C:\temp\test.properties

Then, when you run your build, this file will get created containing all the
available properties. It will let us see exactly whats defined or not.

Please try this and include the file in your reply.

permanent link
Mallikarjuna Rao (2641) | answered Nov 05 '08, 1:30 p.m.
Are you using the Jazz Build Engine and the Ant page in the build
definition?

The properties such as ${buildResultUUID} are only defined it you are using
the Jazz Build Engine or you are using the startBuildTask.


Hi Ryan,

Yes I'm using Jazz Build Engine which is running separately as:

./jbe -repository https://<repository>:9443/jazz -userId <user> -pass <password> -engineId Test_Build.

And the build defination (using eclipse for this) "Test Team Build" was created with engineId "Test_Build". I have given my build.xml in the Ant page for "Build File" field.
Does the ${buildResultUUID} not defined in this case?.

Regards,
Mallik

permanent link
Ryan Manwiller (1.3k1) | answered Nov 05 '08, 1:18 p.m.
JAZZ DEVELOPER
Are you using the Jazz Build Engine and the Ant page in the build
definition?

The properties such as ${buildResultUUID} are only defined it you are using
the Jazz Build Engine or you are using the startBuildTask.

permanent link
Mallikarjuna Rao (2641) | answered Nov 05 '08, 11:45 a.m.
If you are using Ant, or can call out to Ant, you can use the
artifactFilePublisher task. This will store the actual bits in the jazz
repository. It is recommended that you don't store artifacts larger than
10MB.

https://jazz.net/jazzdocs/topic/com.ibm.team.build.doc/topics/r_artifactfilepublisher.html

The best practice is to store large artifacts outside the jazz repository,
and only store a link to it with the artifactLinkPublisher task.

https://jazz.net/jazzdocs/topic/com.ibm.team.build.doc/topics/r_artifactlinkpublisher.html


---
Ryan Manwiller
Jazz Team


I tried with the artifactLinkPublisher by keeping the below code snippet in build.xml

<artifactLinkPublisher> repositoryAddress="https://<repository>/jazz" userId="${user.name}" password="${user.password}"
buildResultUUID="${buildResultUUID}" url="https://<repository>/jazz"
localFilePath="<localdir>/<local>" label="a download link"/>



But I'm getting following error message, Can you please let me know on how to give the buildResultUUID as there is problem with the value present in ${buildResultUUID} and resolve the below issue.

E R R O R L O G S

create-link:
Unable to update last contact time for engine: The "BuildResult" with id "_flqUQKq5Ed2vhMZzMu2obA" could not be found.
The "BuildResult" with id "_flqUQKq5Ed2vhMZzMu2obA" could not be found.
at com.ibm.team.build.ant.task.AbstractPublisherTask.getBuildResult(AbstractPublisherTask.java:147)
at com.ibm.team.build.ant.task.AbstractPublisherTask.updateLastContactTime(AbstractPublisherTask.java:180)
at com.ibm.team.build.ant.task.AbstractPublisherTask.doExecute(AbstractPublisherTask.java:109)
at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:419)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: com.ibm.team.repository.common.ItemNotFoundException: CRJAZ0215I Item not found: com.ibm.team.build.internal.common.model.impl.BuildResultHandleImpl@75471dd2 (stateId: null, itemId: , origin: <unset>, immutable: <unset>)
at com.ibm.team.repository.client.internal.ItemManager.internalFetchItem(ItemManager.java:1341)
at com.ibm.team.repository.client.internal.ItemManager.access$0(ItemManager.java:1303)
at com.ibm.team.repository.client.internal.ItemManager$AbstractStore.retrieveItem(ItemManager.java:182)
at com.ibm.team.repository.client.internal.ItemManager$CurrentStore.fetchItem(ItemManager.java:295)
at com.ibm.team.repository.client.internal.ItemManager.fetchPartialItem(ItemManager.java:884)
at com.ibm.team.build.ant.task.AbstractPublisherTask.getBuildResult(AbstractPublisherTask.java:142)
... 46 more
--- Nested Exception ---
com.ibm.team.repository.common.ItemNotFoundException: CRJAZ0215I Item not found: com.ibm.team.build.internal.common.model.impl.BuildResultHandleImpl@75471dd2 (stateId: null, itemId: , origin: <unset>, immutable: <unset>)
at com.ibm.team.repository.client.internal.ItemManager.internalFetchItem(ItemManager.java:1341)
at com.ibm.team.repository.client.internal.ItemManager.access$0(ItemManager.java:1303)
at com.ibm.team.repository.client.internal.ItemManager$AbstractStore.retrieveItem(ItemManager.java:182)
at com.ibm.team.repository.client.internal.ItemManager$CurrentStore.fetchItem(ItemManager.java:295)
at com.ibm.team.repository.client.internal.ItemManager.fetchPartialItem(ItemManager.java:884)
at com.ibm.team.build.ant.task.AbstractPublisherTask.getBuildResult(AbstractPublisherTask.java:142)
at com.ibm.team.build.ant.task.AbstractPublisherTask.updateLastContactTime(AbstractPublisherTask.java:180)
at com.ibm.team.build.ant.task.AbstractPublisherTask.doExecute(AbstractPublisherTask.java:109)
at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:419)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


/hometest/build.xml:627: com.ibm.team.repository.common.ItemNotFoundException: CRJAZ0215I Item not found: com.ibm.team.build.internal.common.model.impl.BuildResultHandleImpl@e490e49 (stateId: null, itemId: , origin: <unset>, immutable: <unset>)

		                                        

permanent link
Ryan Manwiller (1.3k1) | answered Nov 03 '08, 7:18 p.m.
JAZZ DEVELOPER
If you are using Ant, or can call out to Ant, you can use the
artifactFilePublisher task. This will store the actual bits in the jazz
repository. It is recommended that you don't store artifacts larger than
10MB.

https://jazz.net/jazzdocs/topic/com.ibm.team.build.doc/topics/r_artifactfilepublisher.html

The best practice is to store large artifacts outside the jazz repository,
and only store a link to it with the artifactLinkPublisher task.

https://jazz.net/jazzdocs/topic/com.ibm.team.build.doc/topics/r_artifactlinkpublisher.html


---
Ryan Manwiller
Jazz Team

permanent link
Don Weinand (7851) | answered Nov 03 '08, 7:08 p.m.
JAZZ DEVELOPER
Is your build using ant? If so take a look at the ArtifactFilePublisherTask
we provide as part of the build toolkit. This will publish the artifact as
content to the respository and a link for it will automatically be created
on the downloads tab in the build result editor for the build. Word of
caution...this can be a slow operation if the files are very large.

Don Weinand
Jazz Team Build

"mallikjazz" <malli> wrote in message
news:genvli$amb$1@localhost.localdomain...
Hi,

I just curious to know whether is there any option to upload the final
build images(jar/tar.gz/etc) to the jazz team server once the code is
built. I tried looking for this in the forum but unable to find any
info. Can any one of you let me know whether we have such option in
Jazz. And any documentation or users guide to do this.

--
Thanks & Regards,
Mallik

Your answer


Register or to post your answer.