SDK tool to connect Gitlab pipelines with Workflows
Project description
Gitoptim SDK
Introduction
Gitoptim SDK is a CLI tool that enables integration of Gitlab pipelines and Workflows. It is designed to be used in CI/CD jobs.
Features
-
Gitlab CI/CD logs analysis
-
Memlab integration
Development
Prerequisites
- Python 3.11 or later
- Poetry for dependency management
Setup
- Install dependencies using
poetry install --with dev - Install git hooks using
pre-commit install. This will run linters and formatters before each push to repository.
Environment variables
The following environment variables are required in order to run the CLI:
CI_PROJECT_ID
CI_JOB_ID
CI_API_V4_URL
GITOPTIM_PRIVATE_TOKEN - Gitlab personal or project access token with `api-read` scope and `Guest` role
Variables prefixed with CI_ are provided by Gitlab CI/CD.
See: docs
Pycharm
- Set the Python interpreter to the one created by Poetry. This can be done by going
to
File -> Settings -> Project-> Python Interpreterand selecting the interpreter created by Poetry. Path to the interpreter can be found by runningpoetry env infoin the terminal. - Install Pylint plugin for Pycharm.
- Enable "Reformat code" on save. This can be done by going to
File -> Settings -> Tools -> Actions On Save.
How to run
- Run
poetry shellto activate the virtual environment. - Run
python -m gitoptimto start the CLI.
Important: In order to push to repository you need to have poetry shell enabled so that git hooks can run.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitoptim-0.1.0.dev30.tar.gz.
File metadata
- Download URL: gitoptim-0.1.0.dev30.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.9.2-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd7f43941677d0f0c8b0e52972b35b2b126b7b28236d8eba5bdaa32ad04f75fe
|
|
| MD5 |
ae4f6834adc936b987aeb29af913f0dd
|
|
| BLAKE2b-256 |
60e63677a9e8a3e494b79011511eb03a95cf63da2fb6056a4e4b97a16887c3dd
|
File details
Details for the file gitoptim-0.1.0.dev30-py3-none-any.whl.
File metadata
- Download URL: gitoptim-0.1.0.dev30-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.9.2-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b2e50001de9d062dfe80c7be28b477465724f9cb31b7eddcf3479ecb20fdf2
|
|
| MD5 |
db5aa4f188ec6ddd53b0f86bd61418a1
|
|
| BLAKE2b-256 |
5e47a0dab191cec261a55732968e739c9e3347e90f551132f6bb737ca3e939f5
|