Code Monkey home page Code Monkey logo

jenkins-pipeline's Introduction

jenkins-pipeline

Execute groovy pipeline code in remote jenkins server and monitor the output in client console(I prefer Atom editor).

jenkins-pipeline

Install this package globally

npm install -g jenkins-pipeline

Create pipeline job in jenkins

create-pipeline-job

Command

jenkins-pipeline --file <path to groovy file> --url <path-to-pipeline-job> --credentials <jenkins-username>:<jenkins-password>

Example command

jenkins-pipeline --file sample.groovy --url http://localhost:8080/job/test-pipeline/ --credentials admin:abc123

Atom editor configuration

To configure this command in Atom Editor, make sure you have build package installed in your atom editor and add .atom-build.yml file in project folder with below yml code. Sample file is added in this repository for referance. For more information on how to build, please check this link

Save this as .atom-build.yml, and build(ctrl+Alt+b) your groovy file.

cmd: "jenkins-pipeline"
args:
  - "--file {FILE_ACTIVE}"
  - "--url http://localhost:8080/job/test-pipeline/"
  - "--credentials admin:abc123"
sh: true

Sublime editor configuration

To configure this command in Sublime Text Editor, make sure you have sublimetext 3 installed. Create a build system in sublime. Go to Tools >> Build System >> New Build System... (this menu structure is for Ubuntu, may have different menu structure for windows/mac)

Save this as jenkins-pipeline.sublime-build, and buid(ctrl + b) your groovy file.

{
    "cmd": ["jenkins-pipeline --file $file_name --url http://localhost:8080/job/test-pipeline/ --credentials admin:abc123"],
    "shell" : true
}

Note

Groovy pipeline code should be saved as with .groovy extension

jenkins-pipeline's People

Contributors

jacob4madhu avatar jainath avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

jenkins-pipeline's Issues

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.