Sign inSign up

testhuset/qa-dash-jira-issues

By testhuset

Updated over 7 years ago

Search issues and links from JIRA and post to message queue for storage in QA datawarehouse

Image
0

50K+

testhuset/qa-dash-jira-issues repository overview

JIRA issue adapter for Testhusets QA Dashboard

Searches issues and links from JIRA via its API, normalize and post them to a message queue.

Use this container to extract issues and links from JIRA for storage in an eventually complete SDLC-agnostic QA datawarehouse

Output format

Issue revisions

{"id":11890, "service": "logical-name-of-jira", "key":"KEY-123", "update_time": 1524033432}

{"source_id": 123, "source_service": "logical-name-of-jira", "source_link_id": "10401", "target_key": "ABC-68", "target_service": "Other-Jira-Server", "type":"links to", "operation": "delete", "update_time": 1521550223.279)

Message queues currently supported
  • Redis
  • RabbitMQ

Usage

Configure using environment variables:

  • JIRA_NAME: Logical name of service
  • JIRA_URL: URL of JIRA server or service
  • JIRA_USER: JIRA username for basic auth
  • JIRA_PASSWORD: JIRA password for basic auth authentification
  • JIRA_OAUTH_ACCESS_TOKEN: JIRA access token for oauth authentification
  • JIRA_OAUTH_ACCESS_TOKEN_SECRET: JIRA access token for oauth authentification
  • JIRA_OAUTH_CONSUMER: JIRA consumer key for oauth authentification
  • JIRA_OAUTH_KEY_SECRET: JIRA consumer key secret for oauth authentification
  • HTTP_PROXY: HTTP proxy URL if accessing JIRA via proxy
  • HTTPS_PROXY: HTTPS proxy URL if accessing JIRA via proxy
  • JQL_STRING: JQL to search issues in JIRA
  • REDIS_HOST: Ip or hostname of redis server
  • REDIS_PORT: Port number of redis server
  • RABBIT_MQ_HOST: RabbitMQ server ip or hostname
  • RABBIT_MQ_PORT: RabbitMQ server port number
  • RABBIT_MQ_USER: RabbitMQ server username
  • RABBIT_MQ_PASSWORD: RabbitMQ server password
  • MESSAGE_QUEUE_TYPE: Use Redis or RabbitMQ as message queue
  • CYCLES: Number of cycles to run (-1 runs forever)
  • INITIAL_DELAY: Delay in seconds before first cycle
  • CYCLE_DELAY: Delay in seconds between each cycle
  • SERVICE_MAP: Mapping of remote JIRA server names to logical service names
  • VERBOSITY: Level of logging

Dockerfile

FROM python:3.6

RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade && apt-get install -y apt-utils && apt-get install -y python-pip
RUN pip install --upgrade pip

COPY ["./requirements.txt", "./search_jira_publish.py", "/usr/bin/qa-dash-jira-issues/"]
COPY ["./extracter/", "/usr/bin/qa-dash-jira-issues/extracter/"]
COPY ["./messaging/", "/usr/bin/qa-dash-jira-issues/messaging/"]
COPY ["./parsers/", "/usr/bin/qa-dash-jira-issues/parsers/"]

WORKDIR /usr/bin/qa-dash-jira-issues

RUN pip install -r ./requirements.txt

ENV JIRA_NAME=Jira
ENV JIRA_URL=https://localhost:8080/jira
ENV JIRA_USER=guest
ENV JIRA_PASSWORD=
ENV JIRA_OAUTH_ACCESS_TOKEN=
ENV JIRA_OAUTH_ACCESS_TOKEN_SECRET=
ENV JIRA_OAUTH_CONSUMER=
ENV JIRA_OAUTH_KEY_SECRET=
ENV JQL_STRING="updated>='{PREVIOUS_CYCLE_TIME}' order by updated ASC"
ENV REDIS_HOST=localhost
ENV REDIS_PORT=6379
ENV RABBIT_MQ_HOST=localhost
ENV RABBIT_MQ_PORT=5672
ENV RABBIT_MQ_USER=guest
ENV RABBIT_MQ_PASSWORD=guest
ENV MESSAGE_QUEUE_TYPE=rabbit-mq
ENV CYCLES=-1
ENV INITIAL_DELAY=0
ENV CYCLE_DELAY=600
ENV SERVICE_MAP=
ENV VERBOSITY=1


CMD python search_jira_publish.py --jira-name "${JIRA_NAME}" --jira-url "${JIRA_URL}" --jira-user "${JIRA_USER}" --jira-password "${JIRA_PASSWORD}" --jql-string "${JQL_STRING}" --redis-host "${REDIS_HOST}" --redis-port ${REDIS_PORT} --rabbit-mq-host "${RABBIT_MQ_HOST}" --rabbit-mq-port ${RABBIT_MQ_PORT} --rabbit-mq-user "${RABBIT_MQ_USER}" --rabbit-mq-password "${RABBIT_MQ_PASSWORD}" --message-queue-type "${MESSAGE_QUEUE_TYPE}" --cycles ${CYCLES} --initial-delay ${INITIAL_DELAY} --cycle-delay ${CYCLE_DELAY} --verbosity ${VERBOSITY} --jira-oauth-access-token "${JIRA_OAUTH_ACCESS_TOKEN}" --jira-oauth-access-token-secret "${JIRA_OAUTH_ACCESS_TOKEN_SECRET}" --jira-oauth-consumer "${JIRA_OAUTH_CONSUMER}" --jira-oauth-key-secret "${JIRA_OAUTH_KEY_SECRET}" --jira-service-name-map "${SERVICE_MAP}"

Tag summary

Content type

Image

Digest

Size

414.5 MB

Last updated

over 7 years ago

docker pull testhuset/qa-dash-jira-issues