YAML is a data serialization format designed for human readability. YAML is a recursive acronym for "YAML Ain't Markup Language". JSON syntax is similar to and a subset of YAML
Questions tagged [yaml]
70 questions
21
votes
3 answers
Is it possible to have multiple gitlab-ci files in a single repo?
I have a single repo handling integration tests for 4 different software projects. As those projects share common resources, I'd like to create a generic file in which all those common features are set properly for preparing the CI/CD job.
The…
avazula
- 959
- 2
- 7
- 15
11
votes
3 answers
Rename build pipeline .yml files in Azure DevOps
I have a .NET Core application that has three build pipelines. (Windows, Linux, macOS)
In each of them, the application gets assembled a little different. This part works so far.
Azure created for each pipeline a .yml file in the root folder of the…
Ned Flanders
- 325
- 1
- 3
- 13
8
votes
2 answers
Kubernetes configuration with yaml anchors
I have a deployment.yaml file and want to reuse the environment for all my deployments like this:
apiVersion: apps/v1
kind: Deployment
metadata:
name: beat
spec:
selector:
matchLabels:
app: beat
template:
metadata:
labels:
…
Most Wanted
- 691
- 8
- 18
7
votes
1 answer
How to properly setup a multi-environment release pipeline in Azure YAML pipelines?
We have just migrated from TFS 2018 to Azure DevOps Services and we're having a hard time trying to figure out the new Azure YAML pipelines.
We want to be able to:
Run a build/test pipeline when a PR is pushed to develop.
We've already accomplished…
empz
- 87
- 2
- 8
6
votes
1 answer
ansible error: skipping: no hosts matched
I've tried a few variations on running ansible locally as a test case:
nicholas $
nicholas $ ls
ansible.cfg ansible.cfg.orig first_playbook.yml inventory.txt playbook.yml
nicholas $
nicholas $ cat ansible.cfg
[defaults]
transport =…
Nicholas Saunders
- 375
- 3
- 12
- 22
5
votes
3 answers
How to pass Gitlab env var with sensitive characters to bash script?
I have the following situation:
I'm storing sensitive data in Gitlab's environment and then passing these variables to a deployment script in bash.
Gitlab's env var:
Key: sensitive_var
Value: aaa$bbb*%
Then in the .gitlab-ci.yml file the env vars…
JJ Yong
- 53
- 1
- 1
- 4
5
votes
4 answers
Yaml linting failling when jinja is used
I am using https://yamllint.readthedocs.io/en/stable/index.html to lint my yaml files (used in a saltstack context, and linted by jenkins jobs at every commit), but as reported and explained here, it is not possible to validate a yaml file in which…
Pier
- 344
- 4
- 16
5
votes
1 answer
CasC with Bamboo
While trying to get a clear picture how to setup a seamless CasC (Configuration as Code) build and deployment plan management, I have to admit that I get quite puzzled.
Is the following (subjective) ideal scenario possible?
Users can manage their…
Ta Mu
- 6,792
- 5
- 43
- 83
5
votes
1 answer
Gitlab: Always having the possibility to launch a manual job (even if something failed before)
I'm using gitlab-ci. I have a pipeline that has the following steps :
code-verification
some tests
deploy (manual)
some more tests
rollback (manual)
Both the deploy and the rollback job have to be launch manually which means that I'm using…
BelovedFool
- 151
- 4
5
votes
1 answer
Ansible: Use inventory_hostname variable in lineinfile module
I'm using Ansible 2.7.9
and I'm having trouble with the regex definition in the lineinfile module. My file has the following line:
host.example.com = /path/to/a/directory
I want to remove that line. As {{ inventory_hostname }} contains dots, I'm…
Jonas Hüsser
- 91
- 8
5
votes
2 answers
docker-compose multiple services in a loop
Trying to optimize definition of multiple services with docker-compose.yml
Here is the original, "dumb" variant of the docker-compose.yml:
version: '3'
services:
s1:
build: .
ports:
- "5001:9000"
volumes:
- ../www1:/var/www
…
Alexander Shcheblikin
- 181
- 1
- 5
5
votes
2 answers
Custom inventory file failing to parse properly
I've got the following production inventory file (playbooks/production.yaml) for Ansible:
all:
children:
control:
moriarty.server.com
toby.server.com
managed:
sherlock.server.com
Based on what I'm reading online, it…
Lucky The Rabbit
- 95
- 1
- 2
- 5
3
votes
1 answer
Unable to run playbooks using Ansible best practices layout
I am very new to ansible and I think I am lacking something basic that I am not finding in the examples or on github as to the directory structure and its use.
I have set up my directory structure using ansible best practices document located…
Daniel Flick
- 31
- 3
3
votes
1 answer
Deleted service connection in Azure DevOps and now cannot select a new one
I deleted what I thought were unused service connections in Azure DevOps, and now I cannot change the connection on existing pipelines. The build pipelines are yaml based but the service connections were set in the UI, so the yaml doesn't contain…
BuildMePlease
- 31
- 1
3
votes
0 answers
Jenkins Unable to Match Two Identical Strings
I have a config file that's in YAML format, which includes this relevant portion:
project:
protectedBranches:
- master
- develop
- feature/something
In my Jenkinsfile, the YAML file is loaded via: config = readYaml('config.yml').
I…
Argyle
- 1,026
- 2
- 9
- 20