Personal tools
Skip to content. | Skip to navigation
Reset Jenkins UI Admin password
Introduction plone.recipe.codeanalysis provides static code analysis for Buildout-based Python projects, including flake8, JSHint, CSS Lint, and other code checks. This buildout recipe creates a script to run the code analysis: bin/code-analysis By default plone.recipe.codeanalysis also creates a git pre-commit hook, in order to run the code analysis automatically before each commit. plone.recipe.codeanalysis comes with a Jenkins integration, that allows to use the same code analysis settings on your local machine as well as on Jenkins. plone.recipe.codeanalysis provides a Jenkins setting that allows to run it on a Jenkins CI server and to process and integrate the output via the Jenkins Violations plugin. Usually you do not want the recipe to create Jenkins output files on your local machine. Therefore it makes sense to enable the Jenkins output only on the CI machine. The Jenkins job itself should run "bin/code-analysis": The Jenkins Violations plugin needs to be configured to read the output files generated by this configuration. pep8 (to read the flake8 output): **/parts/code-analysis/flake8.log csslint: **/parts/code-analysis/csslint.xml jslint (to read the jshint output: **/parts/code-analysis/jshint.xml
Python Jenkins is a library for the remote API of the Jenkins continuous integration server. It is useful for creating and managing jobs as well as build nodes.
Jenkins Job Builder takes simple descriptions of Jenkins jobs in YAML format, and uses them to configure Jenkins. You can keep your job descriptions in human readable text format in a version control system to make changes and auditing easier. It also has a flexible template system, so creating many similarly configured jobs is easy.
There are several types of views in jenkins Build Pipeline View Nested View Dashboard List View Radiator jenkins-view-builder as of now supports List View and Build Pipeline View with support for other views coming soon. Examples of yaml files are in the tests/fixtures folder. Views are specified as yaml files and given to the jenkins-view-builder to upload to jenkins. Say, you have the following List View view in a yaml file - view: type: list name: monsanto description: Merge ply jobs jobs: - Merge-nova-Ply - Merge-config-Ply - Merge-bark-Ply columns: - status - weather recurse: False jenkins-view-builder can create this view in jenkins. jenkins-view-builder needs a jenkins config file which tells it how to connect to jenkins. The config file looks like this [jenkins] user=user password=password url=http[s]://jenkinsurl Once that is ready, we are all set to create the view in jenkins using the following command jenkins-view-builder update --conf path-to-jenkins-config-file path-to-view-yaml-file There should be feedback on stdout on what the tool is doing. update command is capable of determining if the view already exists and if it does then it just updates it. It is also possible to test the view to make sure that jenkins-view-builder is creating the correct xml that it would post to jenkins. This can be done using the following command jenkins-view-builder test path-to-view-yaml-file Running this command will spit out the generated xml in the out folder of the current working directory. If the output looks good, the update command can be used to upload the view.