>>>>> Steinar Bang <[email protected]>: >>>>> Steinar Bang <[email protected]>: > [snip!] >> So, no success yet at totally automating the deployment from a >> travis-ci build.
>> I still need to to "bundle:update" from the karaf console on each bundle >> I want updated after a new snapshot has been added. > The still-in-flux REST API of the webconsole offers a possibility: > > http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html > I have verified that this causes a bundle to update on my development > machine: > curl -X POST --data "action=update" --basic -u karaf:karaf > http://localhost:8181/system/console/bundles/no.priv.bang.ukelonn > So in theory I could now create a shell script (or something) that would > POST an update to all affected bundles, and modify the travis.yml file > to run this script after completion of the snapshot deployment. I was able to use the rest-maven-plugin to accomplish this, by adding this to the <pluginManagement> of the parent pom https://github.com/steinarb/ukelonn/blob/scratch/call-karaf-console-rest-api-to-update-bundle-at-the-end-of-deploy/pom.xml#L320 and then adding the following to each of the bundle projects: https://github.com/steinarb/ukelonn/blob/scratch/call-karaf-console-rest-api-to-update-bundle-at-the-end-of-deploy/ukelonn.api/pom.xml#L68 https://github.com/steinarb/ukelonn/blob/scratch/call-karaf-console-rest-api-to-update-bundle-at-the-end-of-deploy/ukelonn.bundle.db.liquibase/pom.xml#L98 https://github.com/steinarb/ukelonn/blob/scratch/call-karaf-console-rest-api-to-update-bundle-at-the-end-of-deploy/ukelonn.bundle.db.test/pom.xml#L169 https://github.com/steinarb/ukelonn/blob/scratch/call-karaf-console-rest-api-to-update-bundle-at-the-end-of-deploy/ukelonn.bundle.db.postgresql/pom.xml#L154 https://github.com/steinarb/ukelonn/blob/scratch/call-karaf-console-rest-api-to-update-bundle-at-the-end-of-deploy/ukelonn.bundle/pom.xml#L237 > The downside is that I would have to install the webconsole, and expose > it to the internet, and I'm not sure I want to do that... I prefer to > limit access to admin features to what's absolutely necessary. The downsides are still valid. But I have verfied locally that this works.
