Closed artisticcheese closed 3 years ago
Hi,
Right now this will fail. There is no handling of multi document files. What can be done easily is handling them as we would handle two different files. Each document of the file will have its fields substituted as if it were in a separate file, then then file is written back as a multi document YAML file. This seems to be the most straight forward. The only thing to keep in mind is that you will not be able to substitute a different value for each document:
for your input and the variable metadata.name=foo
you will end up with
apiVersion: v1
kind: Service
spec:
type: LoadBalancer
selector:
app: esb-api
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: foo
namespace: dev
and with the variable kind=foo
you will end up with
apiVersion: v1
kind: foo
spec:
type: LoadBalancer
selector:
app: esb-api
---
apiVersion: apps/v1
kind: foo
metadata:
name: esb-api
namespace: dev
I just tried it and it worked so if you are fine with that I can deploy it to Azure DevOps.
Yes, looks like good solution
It is published as version 1.1.0 to Azure DevOps.
Hello,
What would happen with file like below