-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add subcommand to upgrade Updatecli manifest #671
Conversation
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Add function to upgrade manifest Add specific config option in pipeline option Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Add missing spec documentation Fix error message Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
I added the tag Instead of having
we get
if we don't omitempty when marshalling yaml |
Putting the verb first is confusing for me (like the But your proposal makes sense in the sens that We could either:
## Show the upgraded manifest on stdout: user can redirect the stdout to whatever source they want
$ updatecli manifest upgrade
## Upgrade the manifest file in place (instead of stdout)
$ updatecli manifest upgrade --write |
I am really not attached to the order so we can go with your suggestion
I like very much your suggestion to display on stdout by default unless we specify a flag
What do you think of using the parameter |
I just realise that |
Signed-off-by: Olblak <me@olblak.com>
Update diff manifest Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
I think the PR is ready to be merged The new command is ``updatecli manifest upgrade`
The dry-run is the default behavior. I did some testing with the example directory
I run the new command in the example directory, and I spot few configuration errors. |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
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.
Tested on https://github.com/jenkins-infra/kubernetes-management/ with a recursive command update and it seems to work very well:
- Checkouted to an old commit (
dd34d184efea9cf10900019feb78410b9813aa70
) - Checked the default behavior with
updatecli-next manifest upgrade --config updatecli/updatecli.d
: showed a LOT of possible changes - Updated with the
--in-place
flag and ran the previous command again, which showed no update required!
I saw 2 things, not blocking the merge (subsequent PRs):
- I saw the
kind: helmChart
instructions not being updated to lower case - The exit code of
updatecli-next manifest upgrade --config updatecli/updatecli.d
(dry run) is zero wether there are changes or not. A nice improvement would be to add a flag such ashttps://www.terraform.io/cli/commands/plan#detailed-exitcode
to indicate through the exit code if a change is required or not (to ease pipeline processes)
Great feature buddy!
Thanks very much testing.
Indeed that's a great suggestion and I think that it should be in a different PR so we can also handle the other commands
Which should already highlight changes Before merging, I sport some bugs that I need to fix |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
This is because we don't validate that the kind value is lowercase. I am currently adding this to the current PR as |
Signed-off-by: Olblak <me@olblak.com>
Allow to update Updatecli manifest between Updatecli version
Fix #618
This pullrequest is an attempt to allow upgrading updatecli manifest to the latest version.
This required the following changes
config
Test
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
Because we load the configuration in memory, some fields are automatically added such as
pipelineId
, we need to identify those that should not be includePotential improvement
updatecli show
without templatingupdatecli show
toupdatecli manifest show
for more consistency withupdatecli manifeste upgrade
title
and configname
.tpl