Skip to main content

CI/CD pipeline

mogenius comes with a built in CI/CD pipeline, so that you can start working on your application and deploy any changes to your cluster immediately. When creating a service you will connect your Github or Gitlab account to deploy repositories with a Dockerfile.

connect to github

After starting your service, mogenius monitors the selected branch in your repository via webhooks. Each time your branch is updated, a new build of your service is triggered automatically. This means that after creating a service you can work on your application and with git push everything is deployed on your Kubernetes cluster.

If you want to avoid an automated build, you can use [skip ci]. mogenius will then ignore changes to a repository whenever the string [skip ci] or [ci skip] is found in a commit message.

Example: git commit -m '[skip ci] fix 4711'

On the CI/CD monitor in your main navigation you have a complete history of builds and can access detailed information about each build in progress.

info

CI/CD does not work with services that you have created from a public repository. To keep those services up to date as your code evolves, you must select "Rebuild service" on your service's detail page to deploy the latest state of your repository.

Workflow and Container Registry

The mogenius build pipeline uses dedicated build servers that run on our infrastructure. The platform handles queues and build agents automatically so that you don't have to configure anything. After a build is completed the Docker image will be pushed to the container registry that was connected with your cluster during setup.

Environment variables

During Docker build default environment variables are available that you can call as ARG variables:

Environment VariableDescription
MO_BUILD_IDIncremented with each build in the pipeline for the specific cluster. This ID is not unique.
MO_GIT_TAGThe tag as defined with the tag command in Git.
MO_GIT_COMMIT_HASHSHA-1 commit hash.
MO_GIT_COMMIT_AUTHORThe author of the commit.
MO_GIT_COMMIT_MESSAGEThe commit message defined with -m.
MO_GIT_BRANCHThe Git branch of the commit.