The root cause of the issue is that the current jinja ( {{ }} ) tokens are valid JavaScript syntax. We have builds that consists of js files that are assembled with webpack. Once they are built, webpack inserts things like that "{{",suffix:"}}" string and this is what XLD is trying to substitute and failing.

This is happening for specific projects so we were hoping there was a way to change the placeholder for just those projects. We don't want to change it globally as that will potentially affect the 100's of other project in the library We have a workaround but it is going to get more and more complicated and at some point it will just stop working.

This was originally posted to the Digital.ai support channel as request #202588 and Support responded with:

"you will not be able to change/tweak the delimiters for one particular project/application. If you tweak the delimiter for specific CI type (say File.Archive CI type), then the delimiter change is applicable to all such CI types ( all File.Archive CI types) available in XLDeploy."

Comments

  • Ron, thank you for the idea.

    There are technical and architectural limitations for implementing this change as our Support team has rightly indicated. We have scheduled a meeting with the engineering team in the first half of January to discuss it, and we will provide a follow-up on your idea thereafter.

  • It is possible to utilize different delimiters for each Application or Application version. However, this implies that all files within a specific application or application version must share the same delimiter.
    In such cases, we recommend activating the Delimiters configuration for CI types, specifically for file.Archive, file.File, and file.Folder. This configuration would permit the use of delimiters different from the original {{ }} delimiter.

    Each CI type necessitates an updated configuration, as illustrated below:

    <type-modification type="file.Archive">
    <property name="delimiters" hidden="false" />
    </type-modification>

    For further details on updating the configuration for each CI type, please refer to the documentation: https://docs.digital.ai/bundle/devops-deploy-version-v.23.3/page/deploy/how-to/customize-an-existing-ci-type.html .
    Information on placeholder delimiters is available here: https://docs.digital.ai/bundle/devops-deploy-version-v.23.3/page/deploy/how-to/using-placeholders-in-xl-deploy.html

    Please let us know if this helps to address the need.

  • Thank you. I have updated our synthetic.xml with the following to extend file.Archive to a generic CI our teams can use to specify the delimiters for their projects.

    <!-- zions.delimiter.file.Archive -->
    <!-- Description: expose the delimiters property so that it can be set on the CI -->
    <type type="zions.delimiter.file.Archive" extends="file.Archive">
    <property name="delimiters" kind="string" hidden="false" required="false"/>
    </type>

    It now shows in the UI for manual selection and also works in YAML files.

    deployables
    - name: xui.zip
    type: zions.delimiter.file.Archive
    file: !file "../#{Build.BuildNumber}#.zip"
    targetPath: /tmp/#{Build.BuildNumber}#
    createTargetPath: True
    scanPlaceholders: True
    preScannedPlaceholders: False
    excludeFilenamesRegex: /*(.html).*
    delimiters: '@} {@'

    It ended up being non-trivial to find a 2-character delimiter that is not found in any of our Javascript or its dependent libraries... Ended up going with @} {@, which actually caused a YAML failure as values cannot start with an @ symbol. Quoting it resolved this issue.