Skip to main content

Library responsible for extracting data from Jira to SRO database

Project description

Jira_sro_etl

Quality Gate Status Coverage Code Smells

General Information

Goal

Library responsible for extracting data from Jira to SRO database

Documentation

The Documentation can be found in this link

Requirements

The code need the following programs to run, versions were listed just for guidance, you can try with different ones by your own risk, we tested with these.

Program Version
Postgres 13.3
MongoDB Community 4.4.5
Python 3.8.5
Pip 21.1.1

Installation

If you have already made the initial fill, just install jira_sro_etl running:

pip install jira_sro_etl

If you wanna do the initial fill, clone this repo and follow the steps listed on USAGE section

Usage

Since it uses SRO_DB lib you must export the following environment variables:

  • USERDB = Postgres's username
  • PASSWORDDB = Postgres's password
  • HOST = Postgres's host (usually localhost)
  • DBNAME = Your database's name (must be already created) on Postgres

And if your mongo db is not on your localhost you can export:

  • MongoDB = Mongo host address

Create a virtual environment and activate it

python3 -m venv env && source env/bin/activate

Install the requirements

pip install -r requirements.txt

Fill the fields on dump_db/create_org.py and run

python dump_db/create_db.py && python dump_db/create_org.py

Grab the data that was printed on terminal after last command and paste it on initial_fill.py (before the manager = Manager(data)), then run

python initial_fill.py

After the initial fill you can run new creations, updates or deletes on any classes. If you've installed jira_sro_etl with pip you can run the following code for example:

from jira_sro_etl import factories
u = factories.userFactory()
u.create({'content': {'all': {'user': {'accountId': 'ACCOUNT_ID_FROM_JIRA'}}}})

CI/CD configuration

Configure the following variables in CI/CD:

  • VAR_SONAR_CLOUD_TOKEN = Token from SonarCloud
  • VAR_GITLAB_USER_NAME = username of Gitlab
  • VAR_GITLAB_USER_EMAIL = user's email of Gitlab
  • VAR_PYPI_USER_NAME = pypi's username
  • VAR_PYPI_PASSWORD = pypi's password

Copyright

This lib was PowerRight by SEON Application Lib Generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

jira_sro_etl-26.0.0-py3-none-any.whl (52.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page