GithubHelp home page GithubHelp logo

gulp-jenkins's Introduction

gulp-jenkins

Jenkins plugin for Gulp

npm version Dependency Status devDependency Status

Information

Packagegulp-jenkins
Description Jenkins plugin for Gulp
Node Version >= 0.9

Usage

var jenkins = require('gulp-jenkins');

jenkins.init({
  username: 'Agent_007',
  password: 'golden_gun',
  url: 'jenkins.your-site.com'
});

gulp.task('build production', function() {
  return gulp.src('./*')
    .pipe(jenkins.build('Secret_App', {
      target_env: 'prod',
      tag_name: 'tags/v0.07/trunk',
    }));
});

init(options)

required

Before running builds or making use of the jenkins service, you must provide a url to where the Jenkins CI tool exists. Also, you may provide your credentials here for when connecting to the service. In the least, a url must be provided.

How do I provide my own custom callback?

Since gulp-jenkins is a very lightweight wrapper on top of node-jenkins-api, you can provide your own callback into any of the functions. Below is an example:

gulp.task('build production', function() {
  return gulp.src('./*')
  .pipe(jenkins.build('Secret_App', {
    target_env: 'prod',
    tag_name: 'tags/v0.07/trunk',
  }, function(err, data) {
    if(err) { /* do something */ }
    else { /* do something else */ }
  }));
});

TIP: The last parameter of any function in gulp-jenkins is the optional callback parameter

If no callback is provided, the results of the execution will be printed into the Gulp log.

Supported Functions

The gulp-jenkins plugin is wrapped on top of the node-jenkins-api package by jansepar. Please refer to their docs for information.

Issues

Since gulp-jenkins is wrapped on top of node-jenkins-api, all issues should be routed directly to that project. However, if there is an issue within the gulp logs or with how the actual plugin works with Gulp, then please report the issue here

gulp-jenkins's People

Contributors

stephnr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gulp-jenkins'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.