Modifying Objects and the FuzeDB¶
Table of Contents
Introduction¶
Fuze includes a robust set of operations for modifying pre-existent FuzeID objects and the FuzeDB while maintaining all configuration management and traceability. These operations include:
Adding packages to pre-existent FuzeID objects
Adding files to pre-existent FuzeID objects
Modifying packages in a FuzeID
Assigning a FuzeID to any digital asset
Adding Packages to Pre-existent FuzeID¶
Fuze supports a workflow whereby locally (manually, automated, etc.) created packages can be added to a previous build with the --add-packages
command. This allows you to make packages available publicly that are not to be pushed to the HEAD of the package repo (i.e, when building on branches). It also allows you to associate any digital asset with a particular pre-existent FuzeID.
The default behavior for --add-packages
when adding to a previous build is to NOT make these packages available as dependencies, for safety purposes. In order to purposefully make the packages available as dependencies to other builds, the --set-dependency
flag is available.
Note
Any zip or tar file can be added
Other than being a zip file, no other requirements are placed on the package.
Procedure¶
Use the --add-packages
command to add packages to a pre-existent FuzeID. See Building and Packaging for detailed specification of this command.
Example: Assume a pre-existent FuzeID = 230207-45b-5012
fuze --add-packages 230207-45b-5012 testdir:testdir.zip --set-dependency
This command adds the package testdir.zip
as package name testdir
to the 230207-45b-5012
FuzeID and sets its dependency publicity to true
so that it can be used as a dependency for another build.
Now you can use --get-packages
to download this package.
Limitations and Warnings¶
Fuze does not enforce policies when adding zip/tar files to the FuzeID. Therefore, when using the
--add-packages
command, you are responsible for the integrity of the packages to be added.The
--set-dependency
flag is required in order to make the added packages available as dependencies to other builds.
Adding a File to a Pre-existent FuzeID¶
Adding packages has a special meaning since a package, by definition, has a dependency status.
Fuze also allows you to add any generic file to a pre-existent FuzeID. These files cannot be used as dependencies, but can be downloaded with the --get-packages
command.
--add-file
¶
Purpose: Add file of any type to a pre-existent FuzeID
Arg Format:
<FuzeID> <path_to_file>
Comments: This operation adds the file to FuzeID.
Note
Fuze will append the FuzeID to the filename before the extension.
Example:
$ fuze --add-file 230207-45b-5012 test.txt $ fuze --get-packages 230207-45b-5012 2023-02-07 17:06:16,137 [ fuze.__init__ :225 ] INFO Checking if there is internet connectivity... ... 2023-02-07 17:06:55,894 [ fuze.execute :727 ] INFO Local package now available: /Users/user/.fuze/cs7/archive/test-230207-52e-8794.txt
Modifying Pre-Existent Packages¶
The Fuze WebUI includes a convenience feature for modifying pre-existent packages and adding the modified package to the FuzeID.
This feature is helpful if you wish to take an automated build package, modify it (i.e., remove some files, add some others, etc.), and add the new package. For example, to create a specific customer release package from a generic automated build.
Procedure¶
Go to the FuzeID in the WebUI.
Click the “edit” icon next to the package you wish to modify:
Use the explorer window to delete and add files and directories, and click “Upload”:
Fill in the details about the filename and whether this package can be used as a dependency and click “Upload”
You know have the new package associated with this FuzeID and a log file in CSV format that details all of the changes made. Note that the filename always get the FuzeID appended:
Assign FuzeID to Any Digital Asset¶
Fuze allows you to upload any digital asset, for example, a software package delivered to you from an external source.
Once you’ve put an asset under the Fuze umbrella, you can use it as a dependency in an automated build workflow, release it, and deliver it through Fuze.
Go to the WebUI.
Click the “Assign FuzeID” menu item.
Choose your file to upload, dependency status, target name (the name that Fuze can identify this as a dependency), and the product to which this file should be assigned. The product can be pre-existent or you can create a new one. Remember that product relates to a package repository.
Choose “Upload”
You now have a package that has been assigned a FuzeID and can be used as a dependency, released, and delivered: