Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Testing

Timm Friebe edited this page May 28, 2014 · 4 revisions

Before you start, add a configuration file named mq.ini to etc/dev/:

[endpoint]
url="stomp://user:password@example.com:61613?vhost=/"

[queue]
trigger=/queue/xp.trigger.dev
build=/exchange/xp.build.dev
build.xar=/queue/xp.build.xar.dev
build.mvn=/queue/xp.build.mvn.dev

Then, as this is written in XP Language, you need to compile the sources:

$ xcc -o dist/ -sp src/main/xp/ src/

Testing the Webhook

Fire up our local webserver:

$ xpws
[xpws-dev#4180] running @ localhost:8080. Press <Enter> to exit

Then open another shell and:

$ curl -X POST -d @res/tag-payload.data http://localhost:8080/hook
# This will trigger a build with application/x-www-form-urlencoded data

$ curl -X POST -d @res/tag-payload.json http://localhost:8080/hook
# This will trigger a build woth application/json data

Directly trigger a build

Use the xpcli utility provided:

$ xpcli -c etc/dev/ net.xp_framework.build.subscriber.TriggerBuild thekid/xp-framework 5.9.0RC5
# This will trigger a build. The tag must exist!

$ xpcli -c etc/dev/ net.xp_framework.build.subscriber.TriggerBuild thekid/xp-framework 5.9.0RC5 -t master
# This will trigger a snapshot build

Building steps

Create repo checkout:

$ xpcli -c etc/dev/ net.xp_framework.build.subscriber.FetchRepository

Finally, use the subscriber:

$ xpcli -c etc/dev/ net.xp_framework.build.subscriber.XarRelease

See also

Clone this wiki locally