Giter Site home page Giter Site logo

ajayiwaldorf / comments-remover-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajayi-waldorf/comments-remover-plugin

0.0 1.0 0.0 22 KB

This plugin removes comments from source files for a number of programming languages. Required Python 3.6 on Jenkins server. A new build step is added: 'Invoke Comments Remover' which accepts files to process as input and creates uncommented version of them.

Home Page: https://ste.sg/

Java 93.71% HTML 6.29%

comments-remover-plugin's Introduction

Comments Remover Jenkins plugin

This plugin removes comments from source files for a number of programming languages. Required Python 3.6 on Jenkins server. A new build step is added: 'Invoke Comments Remover' which accepts files to process as input and creates uncommented version of them.

User can specify Python path in global settings for the plugin (otherwise the one on the system PATH is used).

Contributors

Daniel Dyląg

Konstantin Paraschevin

For users

Global settings

Go to Manage Jenkins -> Configure System to access them

settings

settings

settings

There is help section to provide examples:

settings

Usage

The plugin can be used wherever build steps can be defined, e.g. Freestyle project

job

Adding build step:

build

build step

This part also has "help" section:

build step help

Example of build output and result:

build output

build result

build result

Using as a shell/batch command script

Alternatively, user can create plain script build step (Execute shell or Execute Windows batch command) and run comments_remover.py Python script manually.

shell step

Comments Remover script is unpacked to JENKINS_HOME directory (which is available in script as environmental variable)

shell step output

If you use Jenkins Struct Plugin, this plugin has a shorthand defined: commentsremover.

For contributors

Updating plugin with a new version of Comments Remover

Create ZIP archive of all files required to run Comments Remover - in particular, comments_remover.py and requirements.txt. Put it in src/main/resources. The plugin expects to find comment_remover.py and requirement.txt on the top lever of the archive.

Debug

mvnDebug hpi:run

You can attach Java Debugger to a local Java process of Jenkins.

Prepare plugin for distribution

mvn package

The *.hpi file will be created in target/ directory. To install manually on local Jenkins, copy it to $JENKINS_HOME/plugins directory.

Releasing new version to Jenkins Update Center

mvn release:prepare release:perform

Follow the instructions to assign new version number.

You must have an account on jenkins-ci.org with commit rights, and its credentials configured in maven settings:

<server>
  <id>maven.jenkins-ci.org</id>
  <username>...</username>
  <password>...</password>
</server>

More info here:

https://wiki.jenkins.io/display/JENKINS/Hosting+Plugins

comments-remover-plugin's People

Contributors

taleliyahu avatar bisk1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.