Deploy Template imports
Hey all, two quick questions
- What are your opinions on this deploy file 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)
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
Comments
-
OK, this is a dead thread, but I wanted to share my findings anyway:
- Passing boolean parameters in yaml files is a bad idea because they are converted to strings and true !== 'true' (duh, but I had to learn it the hard way)
- Do not inherit the 'groups' section if you are on PaaS / AWS
There is a script that checks your application list set in your deploy file.$(yq '.groups.*.applications' -o json
deploy.yml
| jq '.|keys[]' | tr '[:upper:]' '[:lower:]' | tr -d '"')
This command returns null if you import the groups via delpoy-templates, thus the deployment fails.
Maybe this helps someone in the future…
1 -
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 theconfig/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 '"')
1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 899 Developer Corner
- 760 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 24 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random