All Projects → mdubourg001 → Glci

mdubourg001 / Glci

🦊 Test your Gitlab CI Pipelines changes locally using Docker.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Glci

Kdtool
Kubernetes deployment utility
Stars: ✭ 47 (-90.02%)
Mutual labels:  ci, gitlab-ci, gitlab
Gitlab Ci Local
Tired of pushing to test your .gitlab-ci.yml?
Stars: ✭ 134 (-71.55%)
Mutual labels:  ci, gitlab-ci, gitlab
Gitlab Ci Dashboard
📊 Dashboard for monitoring GitLab CI builds and pipelines for TV
Stars: ✭ 79 (-83.23%)
Mutual labels:  ci, gitlab-ci, gitlab
Gitlabapiclient
GitLab API client
Stars: ✭ 138 (-70.7%)
Mutual labels:  ci, gitlab-ci, gitlab
Gitlab Dashboard
📺 TV dashboard for a global view on Gitlab Pipelines
Stars: ✭ 107 (-77.28%)
Mutual labels:  ci, gitlab-ci, gitlab
Gitlab Ci Pipeline Php
☕️ Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
Stars: ✭ 451 (-4.25%)
Mutual labels:  ci, gitlab-ci, gitlab
godot-ci
Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Stars: ✭ 316 (-32.91%)
Mutual labels:  gitlab, gitlab-ci
docker-coala-base
coala base docker image
Stars: ✭ 20 (-95.75%)
Mutual labels:  ci, gitlab-ci
gitlab-runner
GitLab Runner (Docker image) for ARM devices, this is a mirror repository of
Stars: ✭ 17 (-96.39%)
Mutual labels:  gitlab, gitlab-ci
pipelines-as-code
Pipelines as Code
Stars: ✭ 37 (-92.14%)
Mutual labels:  gitlab, ci
gitlab-ci-android-fastlane
Docker image for building android apps on Gitlab CI
Stars: ✭ 25 (-94.69%)
Mutual labels:  gitlab, gitlab-ci
ionic-docker
An ionic image for CI
Stars: ✭ 56 (-88.11%)
Mutual labels:  ci, gitlab-ci
gitlab-setup
A Packer / Terraform / Ansible configuration to install Gitlab and Gitlab-CI
Stars: ✭ 53 (-88.75%)
Mutual labels:  gitlab, gitlab-ci
k8s-knative-gitlab-harbor
Build container images with Knative + Gitlab + Harbor inside Kops cluster running on AWS
Stars: ✭ 23 (-95.12%)
Mutual labels:  gitlab, pipelines
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (-87.47%)
Mutual labels:  gitlab, gitlab-ci
Gitlab Ci Android
GitLab CI image for building Android apps
Stars: ✭ 399 (-15.29%)
Mutual labels:  ci, gitlab-ci
godot-cpp-ci
Docker image and Github Actions to automatically compile Godot C++ GDNative libraries.
Stars: ✭ 21 (-95.54%)
Mutual labels:  gitlab, gitlab-ci
gitlab-job-log-viewer
Browser extension for code highlighting raw logs in Gitlab CI
Stars: ✭ 21 (-95.54%)
Mutual labels:  gitlab, gitlab-ci
CI-Utils
Utilities for running Common Lisp on CI platforms
Stars: ✭ 18 (-96.18%)
Mutual labels:  ci, gitlab-ci
gitlab-ci-discord-webhook
⛓ Here's your serverless solution for sending build status from GitLab CI to Discord as webhooks.
Stars: ✭ 32 (-93.21%)
Mutual labels:  gitlab, gitlab-ci

glci 🦊

Ease GitLab CI Pipelines set-up by running your jobs locally in Docker containers.

Why ? Because I did not want to commit, push, and wait for my jobs to run on the GitLab UI to figure I forgot to install make before running make build.

📣 Disclaimer: this is a helper tool aiming to facilite the process of setting up GitLab CI Pipelines. glci does NOT aim to replace any other tool.

Installation

yarn global add glci

Usage

At the root of your project (where your .gitlab-ci.yml is):

glci

⚠️ You might want to add .glci to your .gitignore file to prevent committing it.

Options

--only-jobs [jobs]

Limiting the jobs to run to the comma-separated list of jobs name given. Handy when setting up that stage-three job depending on that first-stage job artifacts.

Example:

glci --only-jobs=install,test:e2e

# "build" and "test:unit" won't be ran here
#
# -----------     ---------     -------------
# | install | --- | build | --- | test:unit |
# -----------     ---------  |  -------------
#                            |
#                            |   ------------
#                            --- | test:e2e |
#                                ------------

--yml <yml_file_path>

Setting the file to use in place of .gitlab-ci.yml (default to .gitlab-ci.yml). Useful when testing parent-child pipelines.

--dir <directory_name>

Changing the directory where glci keeps cache and artifacts between jobs. Defaults to .glci.

--clean

Removing the directory given to --dir (default to .glci) before running glci.

--no-draw

Not drawing the representation of the pipeline before running jobs.

Cool stuff

  • If a .env file exists next to your .gitlab-ci.yml, variables inside it get automatically parsed and added to the containers
  • Most of the pre-defined environment variables normally set by GitLab CI are also set here: see pre-defined.js

Pulling images from private registries / repositories

To be able to pull images from private registries / repositories, glci copies a GitLab CI mecanism: the DOCKER_AUTH_CONFIG env variable (see https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#configuring-a-job).

As glci automatically reads the .env file at the root of your project, you can set a DOCKER_AUTH_CONFIG inside it as you would do it in GitLab CI/CD variables configurations and you should be able to pull images from your private registries.

Don't forget to add this .env file to your .gitignore.

How does it work ?

It's pretty straightforward:

  • it parses your .gitlab-ci.yml file (and its "includes")
  • it runs each job of each stage (serially) in a Docker container created on the fly using the right image
  • it logs the results in the console
  • it shares the cache and the artifacts between jobs using Docker volumes
  • it automatically stops and removes the containers and the volumes created

Roadmap

  • Handle glob in cache:paths and artifacts:paths
  • Handle artifacts:exclude (supports globs too)
  • Add --env to allow defining / overriding env variables
  • Add --in-vagrant to run docker in Vagrant (not faster even on Mac for what I've tried)
  • Prevent sharing artifacts between same-stage jobs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].