Find a file
2025-12-29 17:15:51 +01:00
bin fix: add shellcheck logic and split sync-branch command 2025-04-02 16:46:38 +02:00
docker Apply 1 suggestion(s) to 1 file(s) 2025-11-10 10:03:00 +01:00
elixir fix: erroring --format 2025-12-22 15:46:01 +01:00
helm fix: install yq 2025-05-15 00:41:29 +02:00
nodejs fix: speed up js by settings needs to npm:ci 2025-05-12 12:27:19 +02:00
python chore: removed profile selection for integration test 2025-10-16 12:10:02 +02:00
semantic-release fix: use strict bash 2025-11-04 13:45:12 +01:00
shell fix: shellcheck do not apk update 2025-05-05 16:13:12 +02:00
workflows fix: run on main 2025-07-23 18:33:58 +02:00
.editorconfig chore: set .editorconfig 2025-04-22 01:02:32 +00:00
.gitignore feat: helm/helm-test (WIP) 2024-09-02 10:40:15 +02:00
.gitlab-ci.yml fix: add shellcheck logic and split sync-branch command 2025-04-02 16:46:38 +02:00
CODEOWNERS chore: set CODEOWNERS 2025-04-22 00:24:23 +00:00
elixir-docker-container.yml fix: update elixir to 1.19 2025-12-08 16:33:02 +01:00
elixir-package.yml fix: update elixir to 1.19 2025-12-08 16:33:02 +01:00
LICENSE chore: add LICENSE 2025-02-12 15:27:00 +01:00
nextjs-docker-container.yml chore: removed readme step 2025-09-17 15:24:00 +02:00
nodejs-docker-container.yml chore: restored auto-run of workers index readme generation 2025-12-09 14:05:00 +01:00
nodejs-package.yml chore: restored auto-run of workers index readme generation 2025-12-09 14:05:00 +01:00
prepare-renovate-pipeline.yml fix: prepare-renovate-pipeline failure on Elixir 2025-05-12 18:14:55 +02:00
python-docker-container.yml feat: added option to add python version to python pipelines 2025-12-29 17:15:51 +01:00
python-package-poetry.yml feat: added option to add python version to python pipelines 2025-12-29 17:15:51 +01:00
python-package.yml feat: added option to add python version to python pipelines 2025-12-29 17:15:51 +01:00
README.md docs: update readme 2025-08-18 13:06:37 +02:00
release.yml chore: install python 2025-09-15 12:41:17 +02:00
renovate.json Add renovate.json 2025-01-23 16:41:47 +00:00
run-renovate-pipeline.yml chore: add hex packages 2025-04-24 16:51:44 +02:00
sync-branches.yml fix: require jq 2025-07-23 16:03:56 +02:00
update-workers-readme.yml fix: trigger folder worker instead of workers 2025-09-17 15:02:16 +02:00

NLdoc CI Pipelines

pipeline status

A collection of reusable GitLab CI/CD pipeline templates for NLdoc projects. This repository provides standardized CI/CD workflows for various technology stacks including Node.js, Python, Elixir, and Docker containers.

Overview

This repository contains shared CI/CD pipeline templates that can be included in NLdoc projects to provide consistent build, test, lint, security audit, and deployment workflows. The pipelines support multiple technology stacks and include automated semantic versioning and release management.

Supported Technology Stacks

  • Node.js: npm-based projects with build, test, lint, and publish workflows
  • Python: pip and Poetry-based projects with testing and packaging
  • Elixir: Mix-based projects with compilation, testing, and Hex publishing
  • Docker: Container build and publish workflows for various base images
  • Helm: Kubernetes Helm chart validation and packaging

Getting Started

Prerequisites

  • GitLab CI/CD environment
  • Access to the NLdoc GitLab group
  • Project configured with appropriate technology stack

Basic Usage

Include the relevant pipeline template in your project's .gitlab-ci.yml:

Node.js Package Project

include:
  - project: "${CI_PROJECT_ROOT_NAMESPACE}/nldoc/ci/pipelines"
    ref: "main"
    file: "/nodejs-package.yml"

Python Package Project

include:
  - project: "${CI_PROJECT_ROOT_NAMESPACE}/nldoc/ci/pipelines"
    ref: "main"
    file: "/python-package.yml"
    inputs:
      python-package-name: "your-package-name"

Elixir Package Project

include:
  - project: "${CI_PROJECT_ROOT_NAMESPACE}/nldoc/ci/pipelines"
    ref: "main"
    file: "/elixir-package.yml"
    inputs:
      beforeMixDeps:
        - mix local.hex --force
        - mix local.rebar --force

Docker Container Project

include:
  - project: "${CI_PROJECT_ROOT_NAMESPACE}/nldoc/ci/pipelines"
    ref: "main"
    file: "/nodejs-docker-container.yml"

Available Pipeline Templates

Package Templates

  • nodejs-package.yml - Node.js npm package workflow
  • python-package.yml - Python package workflow (pip)
  • python-package-poetry.yml - Python package workflow (Poetry)
  • elixir-package.yml - Elixir package workflow

Container Templates

  • nodejs-docker-container.yml - Node.js Docker container workflow
  • nextjs-docker-container.yml - Next.js Docker container workflow
  • python-docker-container.yml - Python Docker container workflow
  • elixir-docker-container.yml - Elixir Docker container workflow

Utility Templates

  • workflows/generic.yml - Generic workflow rules and stages
  • release.yml - Semantic release workflow
  • prepare-renovate-pipeline.yml - Renovate dependency management
  • run-renovate-pipeline.yml - Execute Renovate updates
  • sync-branches.yml - Branch synchronization workflow

Individual Job Templates

Node.js Jobs

  • nodejs/npm-install.yml - Install npm dependencies
  • nodejs/npm-run-build.yml - Run build script
  • nodejs/npm-run-lint.yml - Run linting
  • nodejs/test.yml - Run tests
  • nodejs/npm-audit.yml - Security audit
  • nodejs/npm-combined.yml - Combined workflow

Python Jobs

  • python/test.yml - Run Python tests
  • python/build-package.yml - Build Python package
  • python/audit.yml - Security audit

Elixir Jobs

  • elixir/build.yml - Compile Elixir project
  • elixir/test.yml - Run tests
  • elixir/lint.yml - Run linting (Credo, etc.)
  • elixir/publish.yml - Publish to Hex.pm
  • elixir/audit.yml - Security audit

Helm Jobs

  • helm/helm-check.yml - Validate Helm charts
  • helm/helm-package.yml - Package Helm charts

Shell Jobs

  • shell/shellcheck.yml - Shell script linting

Pipeline Stages

The pipeline templates use a standard set of stages:

  1. dependencies - Install and cache dependencies
  2. build - Compile/build the project
  3. test - Run tests and generate coverage reports
  4. release - Create semantic releases and tags
  5. publish - Publish packages/containers to registries
  6. administration - Post-deployment tasks and cleanup

Semantic Release

All pipeline templates include automatic semantic versioning using semantic-release. The release process:

  • Analyzes commit messages to determine version bumps
  • Generates changelogs automatically
  • Creates Git tags and releases
  • Publishes packages to appropriate registries

Supported Release Configurations

  • nodejs-package.releaserc - npm package releases
  • python-package.releaserc - PyPI package releases
  • python-package-poetry.releaserc - Poetry-based PyPI releases
  • elixir-package.releaserc - Hex.pm package releases
  • *-docker-container.releaserc - Container registry releases

Dependency Management

Automated dependency updates are handled via Renovate:

  • renovate.json - Renovate configuration
  • prepare-renovate-pipeline.yml - Prepare Renovate updates
  • run-renovate-pipeline.yml - Execute Renovate updates

Development

Local Setup

  1. Clone the repository:

    git clone https://gitlab.com/logius/nldoc/ci/pipelines.git
    cd pipelines
    
  2. Test pipeline templates locally using GitLab CI/CD tools or validation scripts

Adding New Templates

  1. Create new pipeline files in the appropriate directory
  2. Follow existing naming conventions
  3. Include proper documentation and examples
  4. Test with sample projects before merging

Usage Examples

Custom Pipeline Extension

You can extend the base templates with additional jobs:

include:
  - project: "${CI_PROJECT_ROOT_NAMESPACE}/nldoc/ci/pipelines"
    ref: "main"
    file: "/nodejs-package.yml"

# Add custom integration tests
integration_test:
  stage: test
  script:
    - npm run integration-test
  needs: ["test"]

Contributing

We welcome contributions! Please ensure:

  1. All pipeline templates follow GitLab CI/CD best practices
  2. Templates are tested with real projects
  3. Documentation is updated for new features
  4. Semantic release configurations are properly configured

License

This project is licensed under the European Union Public License 1.2 - see LICENSE for details.

Support

For questions or issues: