A Jenkins plugin that invokes a cloudify custom command with parameters related to the build
The example depend on other plugins:
- archive plugin help archiving WAR
- S3 plugin to publish WAR file to external storage.
The recipes directory include a simple application artifact.zip, this application include custom command named downloadFromS3. extract the artifact.zip application to <cloudify install dir>/recipes/apps then install install artifact application install-application artifact
- clone plugin source
git clone https://github.com/CloudifySource/jenkins-plugin.git - from command line navigate to the
<workspace>/jenkins-plugin/cloudify-jenkins - run
mvnwill generate package<workspace>/jenkins-plugin/cloudify-jenkins/target/cloudify-jenkins.hpi
- open jenkins management in browser
http://<your server address>/jenkins - click
Manage Jenkinslink at the left pane
- click
Manage Pluginslink
- click on
Advancedtab
- under "Upload Plugin" section click
Choose filebutton then clickUploadbutton
- wait while an installation is done

- verify that the plugin is presented in the
Installedtab
Note: for this sample we will use S3 as extenal storage to keep the generated war so, to install S3
- click the
Availabletab at the Plugin manager- type at the filter form
S3- check
S3 pluginand clickinstall without restartbutton
-
Go to the jenkins start page and create
new jobof typeBuild a maven2/3 project
- after installing S3 plugin successfully will add configuration section at
Manage Jenkins > Configure System - fill profile fields under the Amazon S3 profiles

- click the job name link and then click
Configureat the left pane - scroll to
Post-build Actionssection add the following actions by selecting from theAdd post-build action
Note: important to select actions at the following order:
- select
Archive the artifacts- select
Publish artifacts to S3 Bucket- select
Cloudify custom command invoker

