This repository was archived by the owner on Dec 8, 2020. It is now read-only.
Make Promote() use cv version which user defined in YAML, not just latest#65
Open
lvw5264 wants to merge 1 commit into
Open
Make Promote() use cv version which user defined in YAML, not just latest#65lvw5264 wants to merge 1 commit into
lvw5264 wants to merge 1 commit into
Conversation
Contributor
|
This is already in |
|
This change introduces the issue, that regular promotes are not possible anymore: We use with the following config ---
:settings:
:timeout: 300
:keep: 8
:verify_ssl: true
:ccv:
ccv-lin7:
cv-lin7-os: 123.0
:publish:
- cv-lin7-os
:promote:
- ccv-lin-7For explicit CCV version promotes we use (with this PR included in cvmanager) ---
:settings:
:timeout: 300
:keep: 8
:verify_ssl: true
:cv:
ccv-lin7: 10.0
:ccv:
ccv-lin7:
cv-lin7-os: 123.0
:publish:
- cv-lin7-os
:promote:
- ccv-lin-7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request verbatim from the tested code in issue #62. To reiterate:
I had a use case where we don't use composite content views, yet I wanted the
promotecommand to use the content view version I defined. However, for some reason thepromotecommand always uses the latest and does not check for the version the user defined in:cv:under YAML at all.I suggest a solution in the code below, allowing the user specified version in YAML to be used, as well as latest. since I just hacked this together by combining aspects of the
update()function, I will just paste thepromote()function I made.Also when the request in promote() gave a 400 bad request, as the exception was not handled, so I added a
rescuestatement, which now helpfully tells the command line user that they "Cannot promote environment out of sequence. Use force to bypass restriction.".The YAML I use, where i have Library.yaml , dev.yaml (always kept up to date with Library), test.yaml, prod.yaml.