Options
All
  • Public
  • Public/Protected
  • All
Menu

jenkins-rxjs

jenkins-rxjs

A library for executing Jenkins Jobs with RxJs listeners

Build Status NPM version Downloads Standard Version styled with prettier Conventional Commits


✨ Features

  • runs entire jenkins job process
  • returns stream of observables

🔧 Installation

yarn add jenkins jenkins-rxjs

🎬 Getting started

Let's demonstrate simple usage with an example:

import * as createJenkins from 'jenkins';
import { JenkinsRxJs } from 'jenkins-rxjs';

const jenkinsPromisified = createJenkins({
  baseUrl: myJenkinsUrl,
  promisify: true,
});
const jenkinsRxJs = new JenkinsRxJs(jenkinsPromisified);

jenkinsRxJs.run(jobBuildOptions).subscribe(console.log);

🎭 Examples

Go checkout adeng-jenkins-cli and jenkins-jobs-runner for examples of integration.

📜 API

Full API can be found here.

🕵️ Troubleshooting

🥂 License

MIT as always

Index

Type aliases

JobResponse

JobResponse: JobProgress | JobDone

JobStatus

JobStatus: "FAILURE" | "SUCCESS" | "PROGRESS"

ResultType

ResultType: "FAILURE" | "SUCCESS"

Variables

Const overestimateThreshold

overestimateThreshold: 15000 = 15000

Const pessimisticThreshold

pessimisticThreshold: 4000 = 4000

Functions

delay

  • delay(milliseconds: number): Promise<void>
  • Parameters

    • milliseconds: number

    Returns Promise<void>

getJobProgressElapsedTime

  • getJobProgressElapsedTime(response: JobProgress): number

getJobProgressEstimatedDuration

  • getJobProgressEstimatedDuration(response: JobProgress): number

getJobProgressEstimatedRemainingTime

  • getJobProgressEstimatedRemainingTime(response: JobProgress): number

getJobProgressPercentage

  • getJobProgressPercentage(response: JobProgress): number

getQueueItemRemainingDuration

  • getQueueItemRemainingDuration(response: QueueItem): number

isJobDone

isJobProgress

isQueueItemDone

  • isQueueItemDone(response: QueueItem): boolean

isQueueItemQueued

  • isQueueItemQueued(response: QueueItem): boolean

isQueueItemQuiet

  • isQueueItemQuiet(response: QueueItem): boolean

jobResponseFromBuild

jobResponseFromQueue

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc