All Projects → kt3k → status-back

kt3k / status-back

Licence: MIT License
⬅️🔵 Send the status back to the github from CI environment

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to status-back

Mirrorgate
MirrorGate DevOps Dashboard
Stars: ✭ 117 (+515.79%)
Mutual labels:  jenkins, ci
megalinter
🦙 Mega-Linter analyzes 48 languages, 22 formats, 19 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
Stars: ✭ 534 (+2710.53%)
Mutual labels:  jenkins, ci
Ci Matters
Integration (comparison) of different continuous integration services on Android project
Stars: ✭ 119 (+526.32%)
Mutual labels:  jenkins, ci
Docker Jenkins
Jenkins with Blue Ocean and support for builiding jobs in Docker
Stars: ✭ 18 (-5.26%)
Mutual labels:  jenkins, ci
jenkinsapi
A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
Stars: ✭ 790 (+4057.89%)
Mutual labels:  jenkins, ci
Flutter engine build
Flutter Engine构建产物归档
Stars: ✭ 19 (+0%)
Mutual labels:  jenkins, ci
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (+794.74%)
Mutual labels:  jenkins, ci
Pipeline
Pipeline is a package to build multi-staged concurrent workflows with a centralized logging output.
Stars: ✭ 433 (+2178.95%)
Mutual labels:  jenkins, ci
intelirest-cli
A cli interpreter for intelliJ .http files
Stars: ✭ 23 (+21.05%)
Mutual labels:  jenkins, ci
Jenkins Rest
Java client, built on top of jclouds, for working with Jenkins REST API
Stars: ✭ 201 (+957.89%)
Mutual labels:  jenkins, ci
Ansible Role Jenkins
Ansible Role - Jenkins CI
Stars: ✭ 689 (+3526.32%)
Mutual labels:  jenkins, ci
springboot-deploy-demo
spring boot deploy
Stars: ✭ 16 (-15.79%)
Mutual labels:  jenkins, ci
Newman
Newman is a command-line collection runner for Postman
Stars: ✭ 5,607 (+29410.53%)
Mutual labels:  jenkins, ci
Cize
🔌 Continuous integration with the simplest solution
Stars: ✭ 100 (+426.32%)
Mutual labels:  jenkins, ci
Bzppx Codepub
暴走皮皮虾之代码发布系统,是现代的持续集成发布系统,由后台管理系统和agent两部分组成,一个运行着的agent就是一个节点,本系统并不是造轮子,是"鸟枪"到"大炮"的创新,对"前朝遗老"的革命.
Stars: ✭ 471 (+2378.95%)
Mutual labels:  jenkins, ci
Ci Detector
Detect continuous integration environment and get information of current build
Stars: ✭ 138 (+626.32%)
Mutual labels:  jenkins, ci
Ccmenu
CCMenu is a Mac application to monitor continuous integration servers.
Stars: ✭ 306 (+1510.53%)
Mutual labels:  jenkins, ci
Danger Js
⚠️ Stop saying "you forgot to …" in code review
Stars: ✭ 4,076 (+21352.63%)
Mutual labels:  jenkins, ci
Env Ci
Get environment variables exposed by CI services
Stars: ✭ 180 (+847.37%)
Mutual labels:  jenkins, ci
saint-build
monitor your jenkins operations, jobs in async and functional elegance
Stars: ✭ 13 (-31.58%)
Mutual labels:  jenkins, ci

status-back v1.1.1

CircleCI codecov

⬅️🔵 Send the status back to the github from CI environment

💿 Install

Via npm:

npm i -g status-back

This installs status-back to your system.

CLI Usage

  Usage: status-back [options] [<description>, [<url>]]

  Options:
    --version - - - - - - - - - Output the version.
    -v, --verbose - - - - - - - Output verbose message on internal operations.
    -p, --pending - - - - - - - Set the commit status pending.
    -s, --success - - - - - - - Set the commit status success.
    -f, --failure - - - - - - - Set the commit status failure.
    -e, --error - - - - - - - - Set the commit status error.
    -t, --token <token> - - - - Set the github token. Required.
                                Optionally set by GITHUB_TOKEN env var.
    -r, --repo <repo> - - - - - Set the repo slug. e.g. nodejs/node. Requird.
                                Optionally set by GITHUB_REPO env var.
    --sha1 <sha1> - - - - - - - Set the sha1 of the commit. Default is the current sha1.
                                Optionally set by STATUS_SHA1.
                                If not specified, the sha1 of current dir is used.
    -c, --context <context> - - Set the context of the commit status. e.g. ci/build. Required.
                                Optionally set by STATUS_CONTEXT env var.
    --github-api <url>  - - - - Set the url of the github api. Set this when you use with github enterprise.
                                Optionally set by GITHUB_API env var.

  Example:
    status-back -s -t 12345... -r nodejs/node -c ci/build "build success!" https://ci.server/build/12345

    status-back -f -t 12345... -r nodejs/node -c ci/build "build failure!" https://ci.server/build/12346 --github-api https://github.my-company/api/v3

Examples & recipes

Usage with Jenkins declarative pipeline

In CI settings, we recommend to use environment variables for setting common parameters.

pipeline {
  environment {
    GITHUB_TOKEN = credentials 'github-token'
    GITHUB_API = 'https://mycompany.github/api/v3'
    GITHUB_REPO = 'myorg/myrepo'
  }

  stages {
    stage('install') {
      steps {
        sh 'yarn'
      }
    }

    stage('lint') {
      environment {
        STATUS_CONTEXT = 'jenkins/lint'
      }

      steps {
        sh 'npx status-back -p "Linting..." $BUILD_URL'
        sh 'npm run lint'
      }

      post {
        success {
          sh 'npx status-back -s "Lint success!" $BUILD_URL'
        }
        failure {
          sh 'npx status-back -f "Lint failed!" $BUILD_URL'
        }
      }
    }

    stage('test') {
      environment {
        STATUS_CONTEXT = 'jenkins/test'
      }

      steps {
        sh 'npx status-back -p "Testing..." $BUILD_URL'
        sh 'npm test'
      }

      post {
        success {
          sh 'npx status-back -s "Test success!" $BUILD_URL'
        }
        failure {
          sh 'npx status-back -f "Test failed!" $BUILD_URL'
        }
      }
    }
  }
}

License

MIT

Note: This library is inspired by commit-status by dtinth, but is a bit more focused on usages in Github Enterprise environment, rather than github.com.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].