Kanda SDK 0.6.0
Loading...
Searching...
No Matches
CI/CD for the Kanda SDK

This page provides guidance on setting up Continuous Integration (CI) and Continuous Deployment (CD) for the Kanda SDK packages using Bitbucket Pipelines. CI/CD helps automate testing, documentation generation, and package publishing, ensuring a consistent and efficient workflow for platform development.

Bitbucket Pipelines Overview

The CI pipeline for the Kanda SDK runs on Bitbucket Pipelines and facilitates:

  • Automated testing of platform code.
  • Generation and uploading of package documentation.
  • Publishing new package versions to the Kanda Package Registry.

Setting Up CI Tools

Importing CI Tools

The .sdk-ci-tools repository contains various tools and templates to automate Kanda SDK package workflows in Bitbucket Pipelines. These tools are implemented as PowerShell scripts for cross-platform compatibility.

Adding CI Tools as a Submodule

To use these CI tools, add them as a git submodule in your package repository:

git submodule add <repository-url> .sdk-ci-tools
git submodule update --init --recursive

Ensure you have set up repository SSH keys in the Bitbucket web UI to allow the pipeline runner to read from the CI tool submodule.

Required Tools

To run the CI scripts locally, you will need to have the following tools installed:

CI Tools

Here are the primary tools provided by the .sdk-ci-tools repository and their main functions:

  • CI Pipeline Setup: Sets up the default Bitbucket Pipeline for a package.
  • Publish Package Documentation: Generates and publishes package documentation using Doxygen.
  • Publish NPM Package: Publishes a package to the Kanda Package Registry using NPM.
  • Activate Unity License: Activates a Unity license on the machine.
  • Return Unity License: Returns a Unity license for the machine.
  • Setup Private Package Registry: Configures authentication for a private package registry.
  • Run Package Tests: Runs edit-mode tests for a Unity package using the Unity CLI.
Note
The CI tools are intended to be run with the package repository root as the current working directory, such as io.kanda.sdk/ or io.kanda.foundation/.

For detailed usage examples and configuration options, refer to the Kanda SDK CI Tools README.