Skip to content

Commit

Permalink
#717 actualize _pages/install/cicd.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed May 8, 2023
1 parent a29deb4 commit 4293884
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions _pages/install/cicd.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: docs-base
html-class: docs-page
title: Getting started with Metanorma in CI/CD environments
title: Getting Started with Metanorma in CI/CD Environments
redirect_from:
- /setup/cicd
---
Expand All @@ -10,34 +10,42 @@ Metanorma is often run on continuous integration (CI) and continuous deployment

== Running on CI/CD platforms

We currently support the following CI/CD platforms:
=== Supported platforms

* GitHub Actions
* GitLab CI

=== Installation
=== GitHub Actions

Metanorma provides native packages installable on most major platforms and
these packages can be installed through a non-interactive console/terminal.
The full list is available link:/install/[here].
Metanorma provides a list of actions that can simplify your CI:

Metanorma also provides additional automated actions for the setup and running
of Metanorma on CI/CD testers.
* https://github.com/actions-mn/setup[`actions-mn/setup`] - used for installing `metanorma` CLI for Ubuntu, MacOS, or Windows
* https://github.com/actions-mn/cache[`actions-mn/cache`] - caches intermediate metanorma files (fonts, relaton data) to speedup compilation
* https://github.com/actions-mn/build-and-publish[`actions-mn/build-and-publish`] - do site generation and upload artifact for deployment

=== GitHub Actions
The https://github.com/actions-mn/setup[`actions-mn/setup` GitHub Action] can be skipped if you run CI in a Docker environment and use the Metanorma Docker image.

The following GitHub Actions can be used to simplify a Metanorma CI workflow:
For complete workflow examples just check https://github.com/actions-mn/build-and-publish[README for `actions-mn/build-and-publish` action]

* Metanorma setup: https://github.com/marketplace/actions/setup-metanorma[`actions-mn/setup@v2`]
=== GitLab CI

* Metanorma CLI actions: https://github.com/actions-mn/cli[`actions-mn/cli/site-gen@main` and more]
Metanorma provides a sample https://github.com/metanorma/ci/blob/main/cimas-config/gitlab-ci/samples/docker.shared.yml[`.gitlab-ci.yml`] workflow file that demonstrates how to use the Metanorma docker container in the environment.

Please refer to our https://github.com/metanorma/mn-samples-iso[ISO samples repository]
for further reference.
If it is suitable for you you can reuse it with the following code:

=== GitLab CI
[source,yml]
---
include:
- remote: 'https://raw.githubusercontent.com/metanorma/ci/main/cimas-config/gitlab-ci/samples/docker.shared.yml'
---

=== Other CI providers

Most CI providers nowadays allow to run CI from a Docker execution environment

Metanorma provides a sample `.gitlab-ci.yml` workflow file that demonstrates
how to use the Metanorma docker container in the environment.
- https://docs.travis-ci.com/user/docker/[Travis CI]
- https://circleci.com/docs/using-docker/[CircleCI]
- https://www.jenkins.io/doc/book/pipeline/docker/[Jenkins]
- https://devcenter.bitrise.io/en/infrastructure/using-your-own-docker-image.html[Bitrise]

* https://github.com/metanorma/metanorma-build-scripts/blob/master/cimas-config/gh-actions/samples/.gitlab-ci.yml[Sample `.gitlab-ci.yml`]
Metanorma provides a wide set of docker images https://hub.docker.com/r/metanorma you can select suitable for you

0 comments on commit 4293884

Please sign in to comment.