The connector Plugin integrates Jenkins with BMC Policy Service connectors. This plugin adds a build step and a post-build action that can be configured to invoke the policy connectors
It is desirable to perform some of the policy checks during the devops cycle. Jenkins being the popular tool that is used by many for build/CI integraion, it makes sense to add hooks to jenkins for invoking BMC policy service checks.
To get started you can clone the bmc-connector-jenkins-plugin repository and build with maven.
- Java 8
- [Apache Maven][maven] 3.3.9 or later
* git clone https://github.bmc.com/policy-community/bmc-connector-jenkins-plugin.git
* cd bmc-connector-jenkins-plugin
* mvn package
This command will build the jenkins plugin hpi file for you.
- Go to Manage Jenkins > Manage Plugins > Advanced
- Scroll down to 'Upload Plugin' section Click on 'Choose File' to select the 'bmc-policy-connector.hpi' file Click on 'Upload' to install the plugin You can verify the successful installation by checking the plugin status at Manage Jenkins > Manage Plugins > Installed. You will see 'BMC Policy Service Plugin' in the list. The plugin is ready for use now.
The mvn package command will generate the artifact bmc-policy-connector.hpi.
Tests use junit and mockito framework. Tests are run as part of the build.
If code coverage report is needed run 'mvn cobertura:cobertura' to generate the report.
The plugin needs to be configured before being available for use. There is a global configuration and a Job level configuration that is needed.
- Go to Manage Jenkins > Configure System.
- In the BMC Policy Policy Service Configuration section, click 'Add Connector', and provide the following information:
- Name: Name for the policy service plugin connector
- Path to the executable: Executable name with complete path. For e.g. /opt/connector/test/run.sh
- Arguments: Arguments to pass to the connector if any.
- Connector resides in remote system: Check this option if the connector is running on remote system
- Hostname: Remote system hsotname/ip
- Port: SSH port (defaults to 22)
- Username: username to use to login by ssh
- Password: Password to use to login by ssh
- Click Save You can add any number of connectors. If remote connector option is choosen then the plugin will use SSH to execute the connector on the remote system. All arguments are passed to the connector invocation.
- Click on a Job.
- Click on configure.
- In the Build section, from the Add build step list, select 'Invoke BMC Policy Service'
- In the Invoke BMC Policy Service section, provide the following information:
- Select the Connector: Selecte a previously configured connector from the dropdown list.
- Policy Name: Type in a policy name that this connector can evaluate.
- Connector arguments(optional): Any optional arguments from the job that you need to pass in to the connector.
- Click Save.
- Click on a Job.
- Click on configure.
- In the Post-build Action section, from the Add post-build action list, select 'Invoke BMC Policy Service'
- In the Invoke BMC Policy Service section, provide the following information:
- Select the Connector: Selecte a previously configured connector from the dropdown list.
- Policy Name: Type in a policy name that this connector can evaluate.
- Connector arguments(optional): Any optional arguments from the job that you need to pass in to the connector.
- Click Save.
N.A.
N.A.
So you want to contribute to this repository? Great!
Should you find problems, please create an issue. Otherwise, you can mail Sudesh Kodialbail for questions or comments.
In order to make contributions, please follow these steps
- Submit an issue describing your proposed changes
- The repo owner will respond to your issue promptyl
- If your proposed change is accepted, fork the repo, develop and test your changes
- Submit a pull request
Jenkins Plugin for Policy Service Connector is under the Apache License 2.0. See the LICENSE file for details.
Name | Title | |
---|---|---|
Daniel Nelson | Sr Dir - Product Management | Daniel_Nelson@bmc.com |
Name | Title | |
---|---|---|
Brendan Farrell | Product Development Architect | brendan_farrell@bmc.com |