build-docker-images: --only option doesn't work correctly

Bug #1977879 reported by Davlet Panech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Davlet Panech

Bug Description

Brief Description
-----------------

The option "--only" of build-stx-images.sh doesn't work correctly. The root cause is missing shell quotes in function find_image_build_files, which causes this filter to falsely match projects that don't define PROJECT or LABEL in some cases.

Severity
--------
Major

Steps to Reproduce
------------------
Pass the same image name to --only twice:

build-stx-images.sh --only stx-audit,stx-audit [...]

Expected Behavior
------------------
Only the specified images should be built

Actual Behavior
----------------
Script builds many other images besides the specified one(s)

Reproducibility
---------------
Reproducible

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

Branch/Pull Time/Commit
-----------------------
master/2022-06-07

Last Pass
---------
N/A

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

Test Activity
-------------
N/A

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

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/c/starlingx/root/+/845027

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

Reviewed: https://review.opendev.org/c/starlingx/root/+/845027
Committed: https://opendev.org/starlingx/root/commit/e712f134b9eeeae0164ceca0ca930420cbcc14cd
Submitter: "Zuul (22348)"
Branch: master

commit e712f134b9eeeae0164ceca0ca930420cbcc14cd
Author: Davlet Panech <email address hidden>
Date: Tue Jun 7 15:21:16 2022 -0400

    build-stx-images.sh: proper shell quoting

    The "--only" parameter doesn't work properly in some circumstances and
    builds more images than requested. Solution: add shell quotes.

    TESTS
    ===================================

    Run build-stx-images.sh --only stx-audit,stx-audit [...]
    and make sure it builds only the requested image.

    Closes-Bug: 1977879
    Signed-off-by: Davlet Panech <email address hidden>
    Change-Id: I4c9ddb16dd5e447c38d29e442f4e6790e5d146bb

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.build
Changed in starlingx:
importance: Undecided → Medium
assignee: nobody → Davlet Panech (dpanech)
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.