Skip to main content

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

  1. Install dependencies using poetry install --with dev
  2. 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

  1. Set the Python interpreter to the one created by Poetry. This can be done by going to File -> Settings -> Project-> Python Interpreter and selecting the interpreter created by Poetry. Path to the interpreter can be found by running poetry env info in the terminal.
  2. Install Pylint plugin for Pycharm.
  3. Enable "Reformat code" on save. This can be done by going to File -> Settings -> Tools -> Actions On Save.

How to run

  1. Run poetry shell to activate the virtual environment.
  2. Run python -m gitoptim to 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


Download files

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

Source Distribution

gitoptim-0.1.0.dev20.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitoptim-0.1.0.dev20-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file gitoptim-0.1.0.dev20.tar.gz.

File metadata

  • Download URL: gitoptim-0.1.0.dev20.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.9-arch1-2

File hashes

Hashes for gitoptim-0.1.0.dev20.tar.gz
Algorithm Hash digest
SHA256 59bd868131a751ea8ef452b6ba36c44c057fffc63dea5f4adfac66c475ea1319
MD5 2cf8886bfa6f26fbff145a599dd7a5d4
BLAKE2b-256 6cd98a775f634bfefb81825b64f20f3ad418930d2e12fc3e9b84d7f7420f2362

See more details on using hashes here.

File details

Details for the file gitoptim-0.1.0.dev20-py3-none-any.whl.

File metadata

  • Download URL: gitoptim-0.1.0.dev20-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.9-arch1-2

File hashes

Hashes for gitoptim-0.1.0.dev20-py3-none-any.whl
Algorithm Hash digest
SHA256 51e6e8989b3918ea90cc2765fc4d6a8e604a6fac56b3a543b662f51a6a0d1ce0
MD5 88ce9c96bfb944ccd628fbb6f68d8f0f
BLAKE2b-256 f1c0b4586b758b46b09fccc7f34e77c49eb42907a2491d8fb72644a85fb6ff93

See more details on using hashes here.

Supported by

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