Skip to content

vchrombie/grimoirelab-scripts

Repository files navigation

grimoirelab-scripts

automation scripts for maintaining GrimoireLab.

tools

Usage

You can use the script from the command line

$ python3 generate-es-index-schema.py index_name

Replace index_name with the required index name and check if you have varied credentials for connecting to Elasticsearch.

The initial work was done by animeshk08, create_schema.py.

setup

A combined version of the above two scripts.

While setting up the developer environment of the GrimoireLab, one step is to fork all the GrimoireLab components, clone them to a target local folder (e.g., sources) and each local repo should have two remotes: origin points to the forked repo, while upstream points to the parent repo.

Reference: Cloning the repositories

This script automates the whole process.

To use these script, you need to install the PyGitHub and GitPython modules in the virtualenvironment (or the machine).

$ python3 -m pip install PyGitHub GitPython

Usage

You can use the script from the command line

$ python3 glab-dev-env-setup.py -c -t xxxx

Replace the xxxx with the GitHub API Token, you can get one from here Personal Access Tokens | GitHub. Make sure you have minimum repo access level.

Examples

  • Create a folder sources with all the 15 GrimoireLab components forked, cloned and setting their upstream link using the GitHub API token xxxx:
$ python3 glab-dev-env-setup.py --create --token xxxx --source sources
  • Update the existing forks present in the sources folder with the latest changes using the GitHub API token xxxx:
$ python3 glab-dev-env-setup.py --update --token xxxx --source sources
  • You can use --help, if you need more details.
$ python3 glab-dev-env-setup.py --help

Reference: https://gist.github.com/vchrombie/4403193198cd79e7ee0079259311f6e8

For setting up the dev-environment in PyCharm, we need to fork, clone and add upstream to each project. A shell script to automate this process.

Python version of the same script, glab-fork-clone-upstream.py

From time to time, we need to update the forks. A shell script to automate this process.

Python version of the same script, glab-sync-local-upstream.py

References:

mariadb

A shell script to install maria-db.

A shell script to create the test databases in mariadb for elk tests.


If you have any suggestion/improvements, please raise an issue or submit a PR to the scripts.

About

automation scripts for personal use while working with @grimoirelab project

Topics

Resources

License

Stars

Watchers

Forks