Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephnr/gulp-jenkins
Jenkins plugin for Gulp
https://github.com/stephnr/gulp-jenkins
Last synced: 3 months ago
JSON representation
Jenkins plugin for Gulp
- Host: GitHub
- URL: https://github.com/stephnr/gulp-jenkins
- Owner: stephnr
- License: gpl-2.0
- Created: 2015-05-27T13:42:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-06T16:56:45.000Z (about 8 years ago)
- Last Synced: 2024-10-12T04:21:57.267Z (3 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-jenkins
Jenkins plugin for Gulp[![npm version](https://badge.fury.io/js/gulp-jenkins.svg)](http://badge.fury.io/js/gulp-jenkins) [![Dependency Status](https://david-dm.org/stephn-r/gulp-jenkins.svg)](https://david-dm.org/boennemann/badges) [![devDependency Status](https://david-dm.org/stephn-r/gulp-jenkins/dev-status.svg)](https://david-dm.org/boennemann/badges#info=devDependencies)
## Information
Packagegulp-jenkins
Description
Jenkins plugin for GulpNode Version
>= 0.9## Usage
```javascript
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](https://github.com/jansepar/node-jenkins-api), you can provide your own callback into any of the functions. Below is an example:
```javascript
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](https://github.com/jansepar/node-jenkins-api) package by [jansepar](https://github.com/jansepar). Please refer to their docs for information.
## Issues
Since ```gulp-jenkins``` is wrapped on top of [node-jenkins-api](https://github.com/jansepar/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](https://github.com/gulpjs/gulp), then please report the issue [here](https://github.com/Stephn-R/gulp-jenkins/issues)