The CLI tool integrates better with any CI/CD system that uses Docker images to trigger pipelines: Github, GitLab, Jenkins, etc.
In case you don’t have an automated system, you may still use the Quboo CLI integration or the API integration and manually trigger the score but this is not recommended since you need somebody in control of the game score.
Instructions per tool
We keep updating the docs to include specific instructions for the most common CI/CD systems. Follow the links below if you use any of these tools. Otherwise, you can also quickly set up yours by reading the Full CLI Reference in this document.
Full CLI Reference
In case you want to integrate with other CI/CD tools, or you want to override the way it works, you can use these instructions:
- Make sure your CI/CD tool loads your access and secret keys as the environment variables
- Set the environment variable
QUBOO_PLAYER_USERNAMEto the player’s login that you want to assign points to. Note: if you are also playing the Sonar game mode, ideally you use the same login identifier. If you prefer to use the git username, you can leave this variable unset and set
- Use the environment variable
QUBOO_UNIQUE_IDto set a unique value for the process you want to reward the player for. In case you leave this variable unset, the last git shortened hash will be used as an unique identifier. If the same process (e.g. a specific release) runs twice for any reason, the player will get the points only once. This unique identifier from your side prevents players from cheating by running pipelines more than once.
- Take the docker image
mechero/quboo-cli:latest(or a specific version to avoid potentially breaking changes) as your base image for the pipeline step and run the script with a given command and parameters. See below for the list of commands.
List of commands
quboo release "description"
Gives score to the player for a ‘release’ action. The points are set to a predefined value. You can use the description to specify the name of the action for which the player is getting score (e.g. “Daily Release” or “Billing service release”).
quboo doc "description"
Same as for the release, but in this case for the ‘doc’ action. The points are also predefined.
quboo 100 "description"
In case you want to decide by yourself how many points the player wins, you can run this command and specify the score instead of passing the action name. Then, you can use the description to clarify the reason. As an advantage, you can create a smarter way of assigning points (e.g. based on the time to release). On the other hand, some Quboo badges that are based on specific action types will not work with these commands.
Customizing the CLI tool
The quboo script’s source code is available in GitHub. You can have a look if you’re curious about how it works but you can also fork the repository and create your own Docker image if you want to adapt it to your own CI/CD system. Not a fan of java? Then better start from scratch.
We also welcome people who want to extend the CLI tool and add compatibility with other tools. Just check with us via a new issue in GitHub.