Organisation setup

If you wish to develop your own Tercen modules, an initial setup is required

Choose a Tercen instance to run unit tests

  • Regression testing is used for the development process of Tercen modules.
  • Those tests consist in Tercen workflows that can be run on a Tercen instance. This instance needs to be specified and a Tercen “test user” needs to be created. This user will be used to run the tests from the GitHub Action.
  • Choose an instance that will be used to run the test. It could be your development instance for example. You will need to use the service URI (e.g. https://tercen.com) in the next step.
  • Create a test user. You will need its name and password in the next step.

Set up your GitHub organisation

  • We assume you already have a GitHub organisation in place
  • You need to add the GH secrets
    • TERCEN_TEST_USERNAME and TERCEN_TEST_PASSWORD
    • TERCEN_TEST_URI
    • GITHUB_PAT
  • Template and GH Actions
    • Create a template GitHub repository on your own organisation, based on the Tercen one
    • Edit the GitHub workflow files to replace the secrets by your own organisation secrets you just set up

Tercen instance configuration

If you are using your own Tercen instance, you need to modify the Tercen config file and add your GitHub organisation to the “trusted git” list.

tercen.allow.untrusted.git: 'false'
tercen.allow.untrusted.docker: 'false'
tercen.trusted.git:
  - 'https://github.com/tercen/'
  - 'https://github.com/YOUR_GITHUB_ORGANISATION/'

GitHub Token Configuration

Configure the GitHub token with the required scopes for accessing the GitHub Docker registry and managing packages:

Setting tercen.github.token

The GitHub token requires specific scopes to function properly with Tercen operator development:

Required GitHub Token Scopes

When creating your GitHub Personal Access Token, ensure it includes these scopes: - repo: Full control of private repositories - packages:read: Read packages from GitHub Docker registry - packages:write: Write packages to GitHub Docker registry (if publishing) - workflow: Update GitHub Action workflows

# Add to your Tercen configuration
tercen.github.token: 'ghp_your_github_personal_access_token_here'

Steps to create the token:

  1. Go to GitHub Settings → Developer settings → Personal access tokens
  2. Click “Generate new token (classic)”
  3. Select the required scopes listed above
  4. Copy the generated token and add it to your Tercen configuration

Setting tercen.library.urls

Configure library URLs if you want to manage the Main Library of your local Tercen instance:

# Configure library management URLs
tercen.library.urls:
  - 'https://your-library-server.com/api'

This configuration allows you to: - Manage operator libraries on your local instance - Control which operators are available to users - Maintain custom operator repositories