APITable Docs
ConfigurationCustom Development

Source Code Continuous Integration

Source Code Continuous Integration Overview Our continuous integration is all done by calling the make command. Docker is used for image building, and docker compose is used for un

Source Code Continuous Integration

Overview

Our continuous integration is all done by calling the make command. Docker is used for image building, and docker-compose is used for unit testing. The current continuous integration solution for the code repository is GitHub Actions. If you need to adapt to other continuous integration systems, you need to customize them. The overall idea can be used.

Example of make command for image building

Here are some make commands for building service images. Please refer to the workflow at the bottom for specific details.


# backend-server
make _enterprise-copy
make buildpush-backendserver

# room-server
make _enterprise-copy
make buildpush-roomserver

# web-server
make _enterprise-copy
make buildpush-webserver-op

# init-settings 
make _enterprise-copy
export EDITION=apitable-ee
make buildpush-init-settings

# init-db
make buildpush-init-db
make buildpush-init-db-enterprise

# databus-server (Release/1.2.0 and later versions support )
cd databus
make buildpush

Makefile path

  • Makefile: Makefile for enterprise-level code

  • apitable/Makefile: Same as Makefile in the open source repository

Dockerfile path

The following are the Dockerfile paths corresponding to the services. Please refer to the workflow entry and Makefile for specific compilation steps and execution directories.

  • backend-server: apitable/packaging/Dockerfile.backend-server
  • room-server: apitable/packaging/Dockerfile.room-server
  • web-server: apitable/packaging/Dockerfile.web-server
  • init-db/init-db-enterprise: apitable/init-db/Dockerfile
  • init-settings: init-settings/Dockerfile
  • databus-server: databus/Dockerfile.databus-server

GitHub Actions

  1. Official documentation:
  1. GitHub-hosted runners:
  1. Self-hosted runners:

Continuous Integration Workflow Entry

Currently, self-hosted runners are associated with workflows. Sample code: runs-on: [self-hosted]

The workflows are all located in the .github/workflows directory of the code repository. The following is the correspondence between services and workflows:

  • backend-server: backend-server.yml
  • room-server: room-server.yaml
  • web-server: web-server.yaml
  • init-db/init-db-enterprise: init-db.yml
  • init-settings: init-settings.yaml

Continuous Integration Environment Variables

For environment variables referenced in workflows, actions variables and actions secrets are used, and you can add them according to the type of variable.

Variable NameDescription
CR_PATGitHub PAT, used to push images to ghcr.io.
REGISTRY_SERVERThird-party container image repository address.
REGISTRY_USERNAMEThird-party container image repository username.
REGISTRY_PASSWORDThird-party container image repository password.
REGISTRY_NAMESPACEThird-party container image repository namespace.
DEFUALT_SEMVER_EDITIONDefault semver version identifier.

On this page