Gamification with Gitlab

Integrate Quboo with in your Gitlab CI/CD pipelines

GitLab has an integrated functionality called GitLab CI/CD where you can define Pipelines as code in your repository, providing a .gilab-ci.yml file.

Adding Quboo to GitLab Pipelines

To integrate Quboo CLI in your pipeline, you only need to add a stage and use our Docker image. In the example below, the block score sends the points to Quboo.

Gamification with Quboo and Gitlab
Add gamification to your GitLab pipelines
stages:
  - build
  - deploy
  - score

build:
  stage: build
  # ...

deploy:
  stage: deploy
  # ...
  only:
    - master

score:
  image: mechero/quboo-cli:latest
  dependencies: []
  stage: score
  script:
    - quboo release "Quboo Backend Release"
  only:
    - master

To make this work, you have to set up two environment variables with your Quboo’s access and secret keys. These are set in Gitlab at your project or group level (depending on whether you want to set them globally or not), Settings -> CI / CD -> Variables. You need to add QUBOO_ACCESS_KEY and QUBOO_SECRET_KEY. The values are in your Quboo admin account, under the Settings section.

Quboo Access and Secret Keys in variables
Add Quboo access and secret keys

As you see in the script, there is no reference to the player identifier there. The player is, by default, the last committer’s username. If you want to override it, this is possible by setting a value manually to the environment variable QUBOO_PLAYER_USERNAME.

Gamifying other processes with GitLab

Remember that you can also use the CLI or the Score API to create your own game and give score for other actions such as contributing to documentation.

Continue reading the CLI Full Reference and the API Integration docs for more help.


Documentation Game Mode
Gamification with CircleCI