Skip to content

Add Global Attributes, Global Variable & Substitution and Deprecate Metadata.Attributes#352

Merged
maysunfaisal merged 10 commits into
devfile:mainfrom
maysunfaisal:239-1
Apr 20, 2021
Merged

Add Global Attributes, Global Variable & Substitution and Deprecate Metadata.Attributes#352
maysunfaisal merged 10 commits into
devfile:mainfrom
maysunfaisal:239-1

Conversation

@maysunfaisal
Copy link
Copy Markdown
Member

@maysunfaisal maysunfaisal commented Feb 18, 2021

Signed-off-by: Maysun J Faisal maysunaneek@gmail.com

What does this PR do?

  • Introduces a global attribute property (not a top level list since Attribute is a free form yaml map and does not have name/id)
  • Implements Attribute overriding and merging as per the current devfile overriding and merging implementation for other fields
  • Implements substitution for global attributes
    • global attribute is referenced by {{attributeKey}} where attributeKey is the key entry in the global attribute
    • valid for all string fields in the devfile except for schemaVersion & metadata
    • exceptions are top level keys like name/id as they're guarded by regex and also required for overriding & merging and string enums as they're guarded by schema validation
    • exceptions also include int & boolean properties, as fields for these properties cannot accept {{}} as value in the devfile

📌 EDIT POST DEVFILE CABAL AND PR REVIEW DISCUSSION:

Post Devfile cabal call & PR review discussion, the above criteria has been modified, Please refer #352 (comment) for the PR acceptance criteria

What issues does this PR fix or reference?

Fixes #239

Is your PR tested? Consider putting some instruction how to test your changes

Yes, updated current tests for overriding & merging and added new go tests.

Docs PR

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top level attribute definition in a devfile

8 participants