Create references to scripts and blueprints

About references

References enable you to link scripts and blueprints in your library with the blueprints in which they are incorporated. When you add a blueprint or script to a blueprint, you create a copy of that item. By marking the copied item as a reference, you can enable the copied item to be updated in the event the source item in your library is updated. When you update the source item, you can then apply the update to the references that exist in other blueprints. 

Note: Updates to referenced items in a blueprint do not affect existing deployments based on that blueprint. 

Before you delete scripts and blueprints in your library that have been referenced in other blueprints, you must first remove those references in the associated blueprints. 

Example

John creates a new blueprint and adds Script A, Script B, and Blueprint C. He marks Script A as a referenced item and saves and deploys the blueprint. Later that day, Smart Tools notifies John that the deployment failed. John investigates and realizes the deployment failed because of an error in Script A. He edits the script in his library to correct the error and also applies the update to the blueprint that references Script A. When John deploys the blueprint for the second time, the updated version of Script A runs and the blueprint deploys successfully.  

To reference a script or blueprint

  1. Click Smart Build from the menu bar. The Library page appears.
  2. Create a new blueprint or edit an existing one. The Blueprint Designer displays the blueprint in an editable state. 
  3. Click the Deploy tab. 
  4. Drag and drop scripts and blueprints as needed to the Blueprint Designer.
  5. Click Referenced to link the item with its source in your library.
  6. Click Save to save the blueprint.

To view or update references to a script or blueprint

Smart Tools can show you a list of the blueprints that reference a selected script or blueprint in your library. From this list, you can also apply updates to the blueprints that reference a selected script or blueprint.

  1. From the Library page, point to a script or blueprint and, under Actions, click Actions > View. The selected item appears in the Blueprint Designer in a non-editable state.
  2. Click More > References. The following details appear:
    • Referenced Blueprint: The name of the blueprint containing a reference to the selected item. 
    • Version Referenced: The version of the selected item referenced in the blueprint.
    • Replace with: The updated versions of the selected item that can replace the version in the referencing blueprint. If the selected item has not been updated, this field indicates the reference is up-to-date. 
  3. To apply an updated version of the selected item to the referencing blueprint:
    1. Under Referenced Blueprint, locate the blueprint that contains the reference you want to update.
    2. Under Replace with, select the version you want to apply. Smart Tools displays the referencing blueprint in an editable state.
    3. Click Save. Smart Tools applies the update to the referencing blueprint.
    4. To verify the update was applied successfully, view the source script or blueprint in the Blueprint Designer and click More > References. The Replace with field displays "You are currently up-to-date."

 

 

0 Comments