Skip to content

Mining software repositories with GitLab CI pipelines

Notifications You must be signed in to change notification settings

INSO-TUWien/cipes

Repository files navigation

cipes

cipes is linked in your pipeline to index your commits and present them in an UI.
Inspired by Binocular.

Supported Git Systems:

Provided scripts

Note: If ~ is not working replace it with /root.

~/.bashrc

Loads ~/alias.sh and makes internal preparations.

Provided variables:

  • cipesrcPath: path to .cipesrc File

~/alias.sh

Provided aliases:

  • cipes-gitlab: main executable

Provided variables:

  • cipesDir: root path of cipes
  • cipesDist: path of dist folder

GitLab - CI Configuration

Basic .gitlab-ci file:

index:
  image: insotuwien/cipes
  variables:
    GIT_DEPTH: 0
  before_script:
    - source ~/.bashrc
    - cp $cipesrc $cipesrcPath
  script: cipes-gitlab
  after_script:
    - source ~/alias.sh
    - cp -r $cipesDist $CI_PROJECT_DIR/cipes/
  artifacts:
    name: cipes
    paths:
      - cipes/

Explanation:
First intern preparations have to run and .cipesrc have to be copied.
Next the main script is executed which indices your repository.
Afterwards the produced files are saved to your project directory so it can be provided as artifacts.

Make sure to disable shallow clone by setting GIT_DEPTH to 0.

Optionally you can also get the db.json itself by adding:

after_script:
  - cp $cipesDir/db.json $CI_PROJECT_DIR/cipes/

GitLab - Custom Variables

An API access is required therefore specify a variable named $cipesrc with type File:

{
  "gitlab": {
    "url": "https://gitlab.com/",
    "token": "YOUR_GITLAB_API_TOKEN"
  }
}

Checkout Binocular for detailed explanation.

About

Mining software repositories with GitLab CI pipelines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages