Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use YAML in condition as well #65

Merged
merged 2 commits into from
Jul 8, 2020
Merged

Use YAML in condition as well #65

merged 2 commits into from
Jul 8, 2020

Conversation

olblak
Copy link
Member

@olblak olblak commented Jul 8, 2020

Resolve #59
This PR refactors the way target and YAML works in order to

  • Prepare the land for other targets than YAML like JSON or other formats
  • Use YAML in condition as well
  • Allow using YAML condition and target with or without scm definition, if no definition is specified then YAML file is read from the local path starting at the updatecli binary location.

YAML condition looks like

######################
# NOYAMLCONDITIONSCM #
######################



SOURCE:
=======

...

CONDITIONS:
===========

✔ Key 'targets.imageTag.kind', from file 'updateCli.d/jenkins.yaml', is correctly set to yaml'
✗ Key 'targets.imageTag.kind', from file 'updateCli.d/jenkins.yaml', is incorrectly set to yaml and should be wrongValueTest'
✗ cannot find key 'targets.imageTag.kindkindkind' from file '/home/olblak/Project/Olblak/updatecli'

Refactor target

Allow to reference local yaml without scm definition

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak added the enhancement New feature or request label Jul 8, 2020
@olblak olblak changed the title Issues/59 Use YAML in condition as well Jul 8, 2020
@olblak olblak merged commit 27cccfa into master Jul 8, 2020
@olblak olblak deleted the issues/59 branch July 17, 2020 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add condition based on yaml key/value retrieved from SCM
1 participant