Coder Social home page Coder Social logo

gitlab-remote-templates's Introduction

GitLab Remote Templates

In GitLab using the include keyword allows the inclusion of external YAML files. This helps to break down the CI/CD configuration into multiple files and increases readability for long configuration files. It’s also possible to have template files stored in a central repository and projects include their configuration files. This helps avoid duplicated configuration, for example, global default variables for all projects.

include requires the external YAML file to have the extensions .yml or .yaml, otherwise the external file won’t be included.

include supports different inclusion methods like:

Method Description
local Include a file from the local project repository.
file Include a file from a different project repository
remote Include a file from a remote URL. Must be publicly accessible
template Include templates which are provided by GitLab.

Litmuschaos Remote Templates

The templates in this repository can be used as remote template in the GitLab CI yaml where we can test the resiliency and performance of your application against different chaos experiments.

How to Use the remote template?

It is very simple to use these templates in your CI yaml. It can be done using include:remote in the GitLab CI YAML. include:remote can be used to include a file from a different location, using HTTP/HTTPS, referenced by using the full URL. The remote file must be publicly accessible through a simple GET request as authentication schemas in the remote URL are not supported. For example including pod delete experiment using remote template:

include:
  - remote: 'https://raw.githubusercontent.com/litmuschaos/gitlab-remote-templates/master/templates/pod-delete-template.yml'

We can provide multiple remotes in list formate to add more number of remote templates.

A Sample GitLab CI YAML using pod delete remote template

gitlab-ci.yml

---
include:
  remote: 'https://raw.githubusercontent.com/litmuschaos/gitlab-remote-templates/master/templates/pod-delete-template.yml'

stages:
  - chaos

Inject Pod Delete Chaos:
  stage: chaos
  extends: .pod_delete_template
  before_script:
  variables:
    APP_NS: default
    APP_LABEL: "app=nginx"
    APP_KIND: deployment
    TARGET_CONTAINER: nginx

gitlab-remote-templates's People

Contributors

uditgaurav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.