build-helm-charts.sh needs to support multi-line url substitution

Bug #1893261 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Scott Little

Bug Description

Brief Description
-----------------
One of the steps under build-helm-charts.sh is to modify
upstream manifests by substituting docker image locations and tags
with ones that reference the images we have built and published.

Some newer manifests we would like to include are now using a
multi-line format that isn't supported by the current script.

Examples would be ...
     image: <host>[:<port>]/<path>/<image-name>
     imageTag: <tag>

or
     image:
        repository: <host>[:<port>]/<path>/<image-name>
        tag: <tag>

Severity
--------
Major

Steps to Reproduce
------------------
build-helm-charts.sh

Expected Behavior
------------------
All image locations are substituted

Actual Behavior
----------------
Some images are not substituted, or the intended tag is overridden by a tag on a separate line.

Reproducibility
---------------
100%

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master

Last Pass
---------
N/A Support for future content.

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Build

Workaround
----------
N/A

Ghada Khalil (gkhalil)
tags: added: stx.build
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.5.0 / medium - build support for additional helm chart formats

Changed in starlingx:
importance: Undecided → High
assignee: nobody → Scott Little (slittle1)
tags: added: stx.5.0
Changed in starlingx:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tools (master)

Fix proposed to branch: master
Review: https://review.opendev.org/750710

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tools (master)

Reviewed: https://review.opendev.org/750710
Committed: https://git.openstack.org/cgit/starlingx/tools/commit/?id=922ebeb15a4c39f9221d31349d59be3e72b6245f
Submitter: Zuul
Branch: master

commit 922ebeb15a4c39f9221d31349d59be3e72b6245f
Author: Scott Little <email address hidden>
Date: Wed Sep 9 11:27:11 2020 -0400

    Add python2-ruamel-yaml to docker file in support of helm chart build

    Partial-Bug: 1893261
    Change-Id: I690af011a01fd409d7b4fdcc9f439635dffd31ce
    Signed-off-by: Scott Little <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/748519
Committed: https://git.openstack.org/cgit/starlingx/root/commit/?id=b2ff8cd529aee94b8ac5cd724448681298defc78
Submitter: Zuul
Branch: master

commit b2ff8cd529aee94b8ac5cd724448681298defc78
Author: Scott Little <email address hidden>
Date: Thu Aug 27 14:46:44 2020 -0400

    build-helm-charts.sh support for multi-line url substitution

    One of the steps under build-helm-charts.sh is to modify
    upstream manifests by substituting docker image locations and tags
    with ones that reference the images we have built and published.

    Some newer manifests we would like to include are now using a
    multi-line format that isn't supported by the current script.

    Examples would be ...
         image: <host>[:<port>]/<path>/<image-name>
         imageTag: <tag>

    or
         image:
            repository: <host>[:<port>]/<path>/<image-name>
            tag: <tag>

    Our fix is to abandon sed, and substitute a routine
    that walks the data structures looking substitutions
    in either one or two line format.

    Closes-Bug: 1893261
    Depends-On: https://review.opendev.org/750710
    Change-Id: I81be885e0c2460be9319fe403ef8fe938fe35549
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to root (master)

Fix proposed to branch: master
Review: https://review.opendev.org/752783

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/752783
Committed: https://git.openstack.org/cgit/starlingx/root/commit/?id=53a1537cdea02bee5da48a29dfd55866368cc9a1
Submitter: Zuul
Branch: master

commit 53a1537cdea02bee5da48a29dfd55866368cc9a1
Author: Scott Little <email address hidden>
Date: Sat Sep 19 00:06:47 2020 -0400

    helm_chart_modify.py: remove break

    Closes-Bug: 1893261
    Change-Id: Id4c3863ba7eddeb77e8dcbe6cf6caefa5252957d
    Signed-off-by: Scott Little <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.