An open API service indexing awesome lists of open source software.

https://github.com/arlac77/hook-ci

simple ci to be triggered by git hooks
https://github.com/arlac77/hook-ci

Last synced: about 1 year ago
JSON representation

simple ci to be triggered by git hooks

Awesome Lists containing this project

README

          

[![License](https://img.shields.io/badge/License-0BSD-blue.svg)](https://spdx.org/licenses/0BSD.html)
[![GitHub Issues](https://img.shields.io/github/issues/arlac77/hook-ci.svg?style=flat-square)](https://github.com/arlac77/hook-ci/issues)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Farlac77%2Fhook-ci%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/arlac77/hook-ci/goto)
[![Coverage Status](https://coveralls.io/repos/arlac77/hook-ci/badge.svg)](https://coveralls.io/github/arlac77/hook-ci)

# hook-ci

simple ci to be triggered by git hooks

# API

### Table of Contents

- [defaultQueuesConfig](#defaultqueuesconfig)
- [queueTypes](#queuetypes)
- [analyseJob](#analysejob)
- [Parameters](#parameters)
- [extractCINotification](#extractcinotification)
- [Parameters](#parameters-1)
- [streamIntoJob](#streamintojob)
- [Parameters](#parameters-2)
- [stripUnusedDataFromHookRequest](#stripunuseddatafromhookrequest)
- [Parameters](#parameters-3)
- [wellKnownScripts](#wellknownscripts)
- [buildAnalyse](#buildanalyse)
- [Parameters](#parameters-4)
- [authenticate](#authenticate)
- [Parameters](#parameters-5)
- [accessTokenGenerator](#accesstokengenerator)
- [Parameters](#parameters-6)
- [LocalNode](#localnode)
- [Parameters](#parameters-7)

## defaultQueuesConfig

default configuration for queues

## queueTypes

map queue names
to processing

## analyseJob

analyse the incoming job and prepare the steps to be executed in the processing queue(s)

### Parameters

- `job` **Job**
- `bus` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**

## extractCINotification

extract ci notification from line

### Parameters

- `line` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** notification body or undefined

## streamIntoJob

add log entries to a job

### Parameters

- `stream` **ReadableStream**
- `job` **Job**
- `step`
- `notificationHandler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**

## stripUnusedDataFromHookRequest

strip away currently unused request data

### Parameters

- `request` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** decodec webhook request data

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** stipped down request data

## wellKnownScripts

npm buildin scripts

## buildAnalyse

search for build.sh

### Parameters

- `branch`
- `job`
- `config`
- `wd`

## authenticate

authorize user / password

### Parameters

- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** entitlements

## accessTokenGenerator

Generate a request handler to deliver JWT access tokens

### Parameters

- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `entitlementFilter` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**

Returns **any** request handler return jwt token

## LocalNode

**Extends Node**

the node we are ourselfs

### Parameters

- `name`
- `options`