Red Hat Bugzilla – Bug 1219585
[RFE] Need way to promote latest version of Content View to next environment via hammer
Last modified: 2016-07-27 05:15:28 EDT
Currently you must use the version ID of a Content View to promote to the next environment: hammer content-view version promote --organization Engineering --content-view-id 5 --to-lifecycle-environment DEV --id 59 This makes automation hard if you wish to 'auto promote' after a publish as you are forced to query version IDs to fill out the --id param above. Ideally we would not require the specification of the version and it would just take the latest and you could promote via: hammer content-view version promote --organization Engineering --content-view-id 5 --to-lifecycle-environment DEV if we required specification of the prior you could do: hammer content-view version promote --organization Engineering --content-view-id 5 --to-lifecycle-environment DEV --from-lifecycle-environment Library
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
actually the above first command does work only when you have one version in the prior, but if you have 2 or more versions the promote fails with: # hammer content-view version promote --organization Engineering --content-view-id 5 --to-lifecycle-environment DEV Could not promote the content view: Error: content_view_version found more than once
Created redmine issue http://projects.theforeman.org/issues/10623 from this bug
Upstream bug assigned to dtsang@redhat.com
Moving to POST since upstream bug http://projects.theforeman.org/issues/10623 has been closed ------------- dustin tsang Applied in changeset commit:hammer-cli-katello|35cbd6fd566b7d13faaa7eb2dd0158a13128f10b.
*** This bug is failing in upstream ****. FAILEDQA: # rpm -qa | grep foreman nec-em17.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch foreman-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510071112git33fd59b.el7.noarch foreman-debug-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-release-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-postgresql-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-vmware-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch foreman-release-scl-1-1.el7.x86_64 foreman-libvirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch foreman-ovirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch tfm-rubygem-foreman_discovery-4.1.0-1.fm1_10.el7.noarch tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch foreman-proxy-1.11.0-0.develop.201510120849git5f36f2e.el7.noarch foreman-compute-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-gce-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch steps: if you have 2 or more versions the promote fails with: # hammer content-view version promote --organization-id 1 --content-view-id 2 --to-lifecycle-environment DEV [Foreman] Password for admin: Could not promote the content view: Error: content_view_version found more than once
Upstream bug component is WebUI
*** This bug is failing in upstream ****. FAILEDQA: # rpm -qa | grep foreman foreman-proxy-1.11.0-0.develop.201510201341git00875b3.el7.noarch foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch foreman-libvirt-1.11.0-0.develop.201510201422git6eb234a.el7.noarch foreman-compute-1.11.0-0.develop.201510201422git6eb234a.el7.noarch foreman-release-scl-1-1.el7.x86_64 foreman-gce-1.11.0-0.develop.201510201422git6eb234a.el7.noarch foreman-debug-1.11.0-0.develop.201510201422git6eb234a.el7.noarch tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch hp-sl2x170zg6-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch tfm-rubygem-foreman_discovery-4.1.1-1.fm1_11.el7.noarch foreman-vmware-1.11.0-0.develop.201510201422git6eb234a.el7.noarch tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch hp-sl2x170zg6-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch hp-sl2x170zg6-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch foreman-ovirt-1.11.0-0.develop.201510201422git6eb234a.el7.noarch foreman-1.11.0-0.develop.201510201422git6eb234a.el7.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch foreman-release-1.11.0-0.develop.201510201422git6eb234a.el7.noarch foreman-postgresql-1.11.0-0.develop.201510201422git6eb234a.el7.noarch tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch steps: if you have 2 or more versions the promote fails with: # hammer content-view version promote --organization-id 1 --content-view con_view --to-lifecycle-environment DEV [Foreman] Password for admin: Could not promote the content view: Error: content_view_version found more than once
VERIFIED: # rpm -qa | grep foreman tfm-rubygem-hammer_cli_foreman_tasks-0.0.10-2.el7sat.noarch tfm-rubygem-foreman-tasks-0.7.14.1-1.el7sat.noarch foreman-libvirt-1.11.0.7-1.el7sat.noarch tfm-rubygem-foreman_gutterball-0.0.1-6.el7sat.noarch foreman-discovery-image-3.0.5-3.el7sat.noarch foreman-selinux-1.11.0-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman-0.5.1.2-1.el7sat.noarch foreman-gce-1.11.0.7-1.el7sat.noarch foreman-debug-1.11.0.7-1.el7sat.noarch tfm-rubygem-foreman_theme_satellite-0.1.3-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-4.el7sat.noarch foreman-1.11.0.7-1.el7sat.noarch tfm-rubygem-foreman_bootdisk-6.1.0-1.el7sat.noarch foreman-postgresql-1.11.0.7-1.el7sat.noarch amd-ma78gm-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch amd-ma78gm-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch foreman-proxy-1.11.0.2-1.el7sat.noarch foreman-installer-1.11.0.0-1.el7sat.noarch foreman-compute-1.11.0.7-1.el7sat.noarch foreman-ovirt-1.11.0.7-1.el7sat.noarch tfm-rubygem-foreman-redhat_access-1.0.1-2.el7sat.noarch tfm-rubygem-foreman_discovery-5.0.0.2-1.el7sat.noarch foreman-vmware-1.11.0.7-1.el7sat.noarch foreman-installer-katello-3.0.0.9-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.4-1.el7sat.noarch tfm-rubygem-foreman_docker-2.0.1.1-1.el7sat.noarch tfm-rubygem-foreman_hooks-0.3.9-2.el7sat.noarch amd-ma78gm-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch tfm-rubygem-foreman_remote_execution-0.3.0.2-1.el7sat.noarch tfm-rubygem-foreman_openscap-0.5.3.2-1.el7sat.noarch Steps: 1. Content View Create: # hammer -v -d content-view create --name con_view4 --organization-id 1 Content view created 2. Content View publish hammer -v -d content-view publish --name con_view4 --organization-id 1 [..............................................................................................................................................................] [100%] Content View Promote (First Version) # hammer -v -d content-view version promote --content-view-id 6 --organization-id 1 --to-lifecycle-environment DEV [......................................................................] [100%] 3 Content View Promote (Second Version) # hammer -v -d content-view version promote --content-view-id 6 --organization-id 1 --to-lifecycle-environment TEST --from-lifecycle-environment DEV [......................................................................] [100%] Content View Version list # hammer -v -d content-view version list --organization-id 1 ---|-------------------------------|---------|----------------------- ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS ---|-------------------------------|---------|----------------------- 4 | con_view 2.0 | 2.0 | Library 7 | con_view4 1.0 | 1.0 | Library, DEV, TEST 6 | con_view2 1.0 | 1.0 | Library 5 | con_view3 1.0 | 1.0 | Library, DEV 3 | con_view1 1.0 | 1.0 | Library, DEV, TEST 2 | con_view 1.0 | 1.0 | 1 | Default Organization View 1.0 | 1.0 | Library ---|-------------------------------|---------|-----------------------
please, In UI too, content view promote latest version of Content View to next environment works as expected
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501