YAML mapping values are not allowed in this context

This is valid YAML: jobs: – name: A schedule: “0 0/5 * 1/1 * ? *” type: mongodb.cluster config: host: mongodb://localhost:27017/admin?replicaSet=rs minSecondaries: 2 minOplogHours: 100 maxSecondaryDelay: 120 – name: B schedule: “0 0/5 * 1/1 * ? *” type: mongodb.cluster config: host: mongodb://localhost:27017/admin?replicaSet=rs minSecondaries: 2 minOplogHours: 100 maxSecondaryDelay: 120 Note, that every ‘-‘ starts new … Read more

Is there a way to alias/anchor an array in YAML?

Closest solution I know of is this one: sammy: – &SAMMY1 public/javascripts/vendor/sammy.js – &SAMMY2 public/javascripts/vendor/sammy*.js mobile: – *SAMMY1 – *SAMMY2 – public/javascripts/something_else.js Alternatively, as already suggested, flatten the nested lists in a code snippet. Note: according to yaml-online-parser, your first suggestion is not a valid use of << (used to merge keys from two dictionaries. … Read more

Use placeholders in yaml

Context YAML version 1.2 user wishes to include variable placeholders in YAML have placeholders replaced with computed values, upon yaml.load be able to use placeholders for both YAML mapping keys and values Problem YAML does not natively support variable placeholders. Anchors and Aliases almost provide the desired functionality, but these do not work as variable … Read more

If YAML ain’t markup language, what is it?

Here’s the real story… 🙂 Clark, Oren and I started working on YAML in April 2001. Oren and Clark were part of the SML mailing list, which was trying to make XML simpler. I had just written a data serialization language for Perl called Data::Denter. Clark contacted me to tell me about an idea they … Read more

How to specify wildcard artifacts subdirectories in .gitlab-ci.yml?

The gitlab-ci-multi-runner build runner is built using Go and currently uses filepath.Glob() to scan for any specified artifacts in file_archiver.go. Go doesn’t seem to support the double star glob expression as discussed in another question here at SO. So there seem to be no way to use a full-featured **/bin expression at the moment. Because … Read more

Converting Swagger specification JSON to HTML documentation

Try to use redoc-cli. I was using bootprint-openapi by which I was generating a bunch of files (bundle.js, bundle.js.map, index.html, main.css and main.css.map) and then you can convert it into a single .html file using html-inline to generate a simple index.html file. Then I found redoc-cli very easy to to use and output is really-2 … Read more

What is the

It is called the Merge Key Language-Independent Type for YAML version 1.1. and specified here. It is something that parsers can optionally support, and it is essentially an interpretation of the key-value pair with the special key <<, where the value is either a mapping (usually indicated via an alias as in the spec, and … Read more

Multiline YAML string for GitLab CI (.gitlab-ci.yml)

I came here preemptively expecting this would be an issue but the following “multi-line” command for readability is working for me: Gitlab Runner: Shell Runner version 1.11.0 / Gitlab version: 8.17.2 myjob: stage: deploy script: # Single line command – az component update –add sql # Multi-line command – az sql server create -n ${variable} … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)