Skip to main content

Simple YAML preprocessor, resolves anchors.

Project description

yamlpp

Simple YAML preprocessor, resolves anchors. This is meant for preprocessing .gitlab-ci.yml files. The anchors will be preprocessed, so you can see what the file looks like if you wrote out everything by hand.

Example

Here is example.yml (taken from https://docs.gitlab.com/ee/ci/yaml/#anchors):

.job_template: &job_definition
  script:
    - test project

.postgres_services:
  services: &postgres_definition
    - postgres # urmom
    - ruby

.mysql_services:
  services: &mysql_definition
    - mysql
    - ruby

test:postgres:
  <<: *job_definition
  services: *postgres_definition

test:mysql:
  <<: *job_definition
  services: *mysql_definition

If you run yamlpp example.yml the output will be:

.job_template:
  script:
    - test project

.postgres_services:
  services:
    - postgres
    - ruby

.mysql_services:
  services:
    - mysql
    - ruby

test:postgres:
  script:
    - test project
  services:
    - postgres
    - ruby

test:mysql:
  script:
    - test project
  services:
    - mysql
    - ruby

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for yamlpp, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size yamlpp-1.0.1-py2-none-any.whl (3.5 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size yamlpp-1.0.1.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page