Hey all, two quick questions
For Context — TL/DR:
I started to clean up my deploy files according to this documentation about the inheritance of templates. I'm DRY-ing up my multiple files and want to import another deploy.yml (not a template, but a 'root'-level deploy file), and can not find out how to do this. Furthermore, I cannot find ANY other example of how to structure these files.
I was now wondering if any of you are doing this or if there is a reason why this is a bad idea.
I have two deploy files on the project root level that should be the same, I want to keep one (for now) for backward compatibility purposes and I do not want to create a new template file for this as it just adds another import layer without no immediate value.
Cheers, Andy
OK, this is a dead thread, but I wanted to share my findings anyway:
$(yq '.groups.*.applications' -o json
deploy.yml
| jq '.|keys[]' | tr '[:upper:]' '[:lower:]' | tr -d '"')
Maybe this helps someone in the future…
Hi @andreas.fluer,
> What are your opinions on this deploy file inheritance?
I would refer to these as either 'override' or 'import' methods, rather than 'inheritance'
> Is it possible to import one deploy.yml file into another deploy.stage.yml file when both are on PROJECT ROOT (not in config/deploy-templates)
No, it should be possible to import the prepared template or section into another deploy file with environment-specific parameters but it should be only stored in the config/deploy-templates
folder.
version: '0.1'
namespace: spryker
tag: 'dev'
environment: docker.prod
imports:
deploy.base.template.yml:
parameters:
parameter1: 'parameter1'
parameterN: 'parameterN'
Do not inherit the 'groups' section if you are on PaaS / AWS
It looks like a bug that was already fixed in the previous version.
The changes were at the build specs level.
deployfile_app_list=$(yq '.groups.*.applications' -o json docker/deployment/$${SPRYKER_PROJECT_NAME}/project.yml | jq '.|keys[]' | tr '[:upper:]' '[:lower:]' | tr -d '"')