jenkins-plugin-linaro-pubapi is Jenkins plugin to integrate with Linaro Publishing API (which is integral part of linaro-license-publishing, https://git.linaro.org/infrastructure/linaro-license-protection.git). Integration handled by the plugin is the minimal required to keep publishing secure, namely requesting a "one-time" publishing token from the service in a secure manner, actual publishing is handled as a part of build process using linaro-cp command-line tool (https://git.linaro.org/ci/publishing-api.git), which allows great flexibility and easy ways to debug. Installation and basic testing ------------------------------ 1. Install "Linaro Publishing API Token Plugin" - done by Ansible on production Jenkins hosts, you may need to build plugin and/or install it manually otherwise. 2. Login to https://snapshots.linaro.org/login/ 3. Go to https://snapshots.linaro.org/admin/ 4. Browse "Api key stores" table for a key for ci.linaro.org, or create it (create as "Public") 5. https://ci.linaro.org/configure : search for "Linaro Publishing" 6. Set "Secret key" to value generated in snapshots/admin above. 7. Check values of "not valid before" & "not valid after". For testing below, you'll need to set "not valid before" to 0. 8. Create a test job, say "newpub-test" (prefix with your username) 9. As first build step, add "Linaro Publish API Token" 10. As 2nd step, add "Execute shell" with script: echo $PUBLISH_TOKEN 11. Run job, make sure it builds, non-empty value is printed 12. Now replace script content with: mkdir -p out echo foo >out/result.txt wget https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O linaro-cp.py python linaro-cp.py out /tmp/$JOB_NAME/$BUILD_NUMBER (adjust destination path as needed) 13. Run job, make sure it succeeds and files are available on publishing server. If you get "token no longer valid", adjust "token not valid before" setting in global config (see above). Hacking ------- Use this a reference: https://wiki.jenkins-ci.org/display/JENKINS/Create+a+new+Plugin+with+a+custom+build+Step To build project, run: mvn package The result is *.hpi file in the target/ directory.