-
Notifications
You must be signed in to change notification settings - Fork 4
Add capability to disable subcomponent per environment #286
Add capability to disable subcomponent per environment #286
Conversation
Somehow this does not work for me. A component that is set to disabled in my config is still generated. |
hey @joushx I have created this gist with a stack example https://gist.github.com/marceldiass/9c72a4c7a17a524d8f6265db121a8ddd the
|
Hi @marceldiass, thanks for the PR! name: my-stack
type: component
subcomponents:
- name: pod-info
type: helm
method: git
source: https://github.com/stefanprodan/podinfo
path: charts/podinfo
- name: elasticsearch
type: helm
method: git
source: https://github.com/helm/charts
path: stable/elasticsearch
- name: mysql
type: helm
method: git
source: https://github.com/helm/charts
path: stable/mysql
- name: bookinfo # Istio BookInfo application - wrapped in Fabrikate component
source: https://github.com/microsoft/fabrikate-definitions.git
path: definitions/fabrikate-bookinfo
method: git and the subcomponents:
pod-info:
config:
env: local
elasticsearch:
disabled: true
config:
env: local
mysql:
disabled: true
config:
env: local
bookinfo:
disabled: true
|
c7e7e67
to
0860d31
Compare
0860d31
to
1341a78
Compare
Hey @evanlouie I found the issue. Added Generate test to cover that scenario. I'm not sure what is failing in the build as I can't see logs. Weird part is I forked the repo to mine Azure devops org and there build is passing with exactly same pipeline definition. Could you help me find the build issue ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT 👍
@marcel-dias Re-ran the the build pipeline (after some recent changes made it into |
@marcel-dias @evanlouie Could you please update or grant access to sample at https://gist.github.com/marceldiass/9c72a4c7a17a524d8f6265db121a8ddd, since I've no access (404) to this. I tried to disabled component per environment but failed. This is my implementation: config
dev.yaml
prod.yaml
common.yaml
book
admin
enduser
config
common.yaml
component.yaml
shop
admin
enduser
config
common.yaml
component.yaml I want to disable subcomponents named admin, enduser in component book when generate fab folder dev, but don't know where to put disabled.yaml file |
Hey @HideTran |
@marcel-dias |
@HideTran I'm also waiting for this to be released. Not sure which is the proper way to talk to the maintainers. |
Thank again for this feature, I am looking the way to force use this feature by modify build.sh to allow specified branch of fabrikate. |
Add capability to disable subcomponent per environment
I'm really interested in this feature so opening this PR to contribute.
From the issue #277 I have preferred the property
disabled
over excluded.what I changed
I'm proposing the addition of a disabled attribute to the Subcomponents Config.
The default value is
false
so all subcomponents will be enabled by default.Basically we will be able to disabled components per environment:
closes #277