Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-jenkins-build-number

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-jenkins-build-number

Retrieves the latest build number/state from Jenkins.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

grunt-jenkins-build-number

Retrieves the latest build number/state from Jenkins.

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide.

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

npm install grunt-jenkins-build-number

Once that's done, add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-jenkins-build-number');

Overview

Inside your Gruntfile.js file add a section named jenkinsBuildNumber. This section specifies the options to provide the build state you want, the project name and the credentials if Jenkins server has authentication enabled.

Allowed build states are:

  • lastBuild (default)
  • lastCompletedBuild
  • lastFailedBuild
  • lastStableBuild
  • lastSuccessfulBuild
  • lastUnstableBuild
  • lastUnsuccessfulBuild

Config Example

Example to tag a new successful version based on the latest build number and environment:

jenkinsBuildNumber: {
    dist: {
        options: {
            hostname: 'jenkins.mycompany.com',
            port: 8080, //defaults to 80 if none chosen
            state: 'lastSuccessfulBuild',
            username: process.env.JENKINS_USERNAME,
            password: process.env.JENKINS_PASSWORD,
            projectName: 'myproject-' + process.env.ENVIRONMENT
        }
    }
},

License

Copyright (c) 2013 Juan Pablo Garcia Licensed under the MIT license.

Keywords

FAQs

Package last updated on 05 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc