# jkchksum

> jenkins checksum tool for windows deployments.

Latest version **1.0.3** (published 2017-10-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install jkchksum
pnpm add jkchksum
yarn add jkchksum
bun add jkchksum
```

Provides the command `jkchksum`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-10-04 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | kmorfin |
| Maintainers | kinichahau87 |
| Keywords | jenkins, checksum |

## Links

- npm: https://www.npmjs.com/package/jkchksum
- Repository: https://github.com/kinichahau87/jkchksum
- Homepage: https://github.com/kinichahau87/jkchksum#readme
- Issues: https://github.com/kinichahau87/jkchksum/issues
- npm.io page: https://npm.io/package/jkchksum

## Dependencies (6)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [regex](https://npm.io/package/regex.md) ^0.1.1
- [config](https://npm.io/package/config.md) ^1.26.2
- [promise](https://npm.io/package/promise.md) ^8.0.1
- [checksum](https://npm.io/package/checksum.md) ^0.1.1
- [jsonfile](https://npm.io/package/jsonfile.md) ^4.0.0

## Recent versions

- 1.0.3 (latest) — 2017-10-04
- 1.0.2 — 2017-09-29
- 1.0.1 — 2017-09-20
- 1.0.0 — 2017-09-19

## README

[![https://nodei.co/npm/jkchksum.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/jkchksum.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/jkchksum)


[![Coverage Status](https://coveralls.io/repos/github/kinichahau87/jkchksum/badge.svg?branch=master)](https://coveralls.io/github/kinichahau87/jkchksum?branch=master)

JENKINS CHECKSUM TOOL
=============================

used to help find checksum for windows deployments

## Installation
  you can install globally to use it in the jenkins execute node script plugin


  ```
  npm install -g jkchksum
  ```

  or include it in your own script


  ```
  npm install --save jkchksum
  ```

## Usage
  takes 2 arguments store|compare and a path. store is use to get he checksum before a deployment.
  compare is used to get the checksum after a deployment and compare to a previous checksum


  ```
  jkchksum store C:\\inetpub\\wwwroot\\myapplication.web
  ```

  output: checksum_results.json

  ```
  {
    "totalChkSum":1122120,
    "index.js":"4eb7a1573adbeabff3ffbcf1429709cfebbe46c3",
    "kmModel.js":"908034c509b8a8c05b8e5ff7fefa85f1296fa674"
  }
  ```

  after changes are made to your source file you can run the compare command to see which files have changed

  ```
  var __mysql = require('mysql');
  var __Promise = require('promise');
  //making comment for test
  ```

  ```
  jkchksum compare C:\\inetpub\\wwwroot\\myapplication.web
  ```

  output:

  ```
  {
    "totalChkSum":"1130480(<-)",
    "index.js":"566e7a266373db5a90e4668026dc74463ed4e5fe(<-)"
  }
  ```

  The output of the store command is a json file with a list of files names and a checksum for each file.
  However, the output of the compare command is a json file with a list of files where the checksum has changed. If the checksum has not changed since using the store command the file will not appear in the output file.

## Options
  Additional options can be specified in your config file.

  ```
  {
    //ignore is a list of regular expressions. the checksum will ignore any files that match expressions specified here
    "ignore":[
      "images",
      "Images",
      "[{a-z}]*\\.png",
      "bin",
      "[{a-zA-Z}]*\\.dll"
    ],
    //the output file name. if not specified default file name will be checksum_results.json
    "checksumFile":"build_checksum.json"
  }
 ```

## integration with jenkins
  runnning this module in jenkins is simple. First, make sure you have installed it globally.

  ```
  npm install -g jkchksum
  ```

  Then, you can run it in a windows batch file. In your batch file run the module. (test_jkchksum.bat)

  ```
  jkchksum store %WORKSPACE%
  ```

  In the jenkins build step select "Execute Windows batch command" and type the name of the your batch file.
  ```
  test_jkchksum.bat
  ```

---
_Source: https://npm.io/package/jkchksum · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
