Skip to content

liemle3893/hubot-slack-jenkins-chatops

Repository files navigation

ci_bot

Run locally

$ HUBOT_SLACK_VERIFICATION_TOKEN=XXX \
  HUBOT_JENKINS_URL="http://<jenkins_basic_auth>@<jenkins_host>:<jenkins_port>" \
  HUBOT_SLACK_TOKEN=xoxb-xxxx \
  ./bin/hubot --adapter slack

Docker run

$ docker run -it -p 8080:8080 --rm \
  -e HUBOT_SLACK_VERIFICATION_TOKEN=${HUBOT_SLACK_VERIFICATION_TOKEN} \
  -e HUBOT_JENKINS_URL=${HUBOT_JENKINS_URL} \
  -e HUBOT_SLACK_TOKEN=${HUBOT_SLACK_TOKEN} \
  saboteurkid/hubot-jenkins-slack

Environment variables

The following environment variables define the colors used for each build status:

  • HUBOT_JENKINS_COLOR_ABORTED
  • HUBOT_JENKINS_COLOR_FAILURE
  • HUBOT_JENKINS_COLOR_FIXED
  • HUBOT_JENKINS_COLOR_STILL_FAILING
  • HUBOT_JENKINS_COLOR_SUCCESS
  • HUBOT_JENKINS_COLOR_DEFAULT

Commands

  • hubot j(enkins) build
    • Lists Jenkins jobs to build
  • hubot j(enkins) build <job name>
    • Build jenkins job

Reference