for-each-resource-tag#

The for-each-resource-tag application process step lets you run processes for resources selected by tag. This step is only valid in an application process.

Format#

The for-each-resource-tag step is called For Each Tag in the HCL™ Launch web application.

for-each-resource-tag step "loop1" is
    -- define target resource tags; required, repeatable
    -- before 7.1.1.0, the tag must be specified by internal database ID
    tag "res-tag-a1"
    tag "res-tag-a2"

    -- maximum number of tags to target concurrently; optional
    -- default is 1
    max-concurrent-tags 1

    -- must contain an embedded 'start' block that works like the top-level version
    start is
        start "install-c1"
    end

    -- contains one or more embedded steps of any type except for other for-each steps
    install-component step "install-c1" is
        component "c1"
        process "deploy"
        without-status "Active"
        fail-fast true
        ignore-child-warnings true
        max-concurent-processes 43

    -- on success/failure/complete reference steps inside the for-each
    -- 'finish' refers to the implied finish step inside the for-each
    on success
        finish
    end

-- on success/failure/complete outside an embedded step reference steps in the top-level process
on success
    start "next-step"
end

Properties#

Field Description
Name A name for the iteration container.
Tags A list of resource tags to use in the container. The subprocess runs once for each resource tag. You can order the resource tags by dragging and dropping them.
Max Concurrent Tags The maximum number of tags for which to run the subprocess at a time. To run the subprocess on all of the tags at the same time, specify -1. To run the subprocess on only a few of the tags at a time, as in blue/green deployments or rolling deployments, specify an integer. The server attempts to resolve the value to an integer. If the value does not resolve to an integer, then the -1 value is used by default. You can use a property in this field, as long as the property resolves to an integer.

|

Example#

start is
    start A
    start B
end

for-each-resource-tag step A is
    tag "res-tag-a1"
    tag "res-tag-a2"
    tag "res-tag-a3"

    max-concurrent-tags 10

    start is
        start A1
    end

    shell step A1 is
        "echo A1"
    on success
        finish
    end
on complete
    finish
end

for-each-resource-tag step B is
    tag "res-tag-b1"

    max-concurrent-tags unlimited

    start is
        start B1
    end

    shell step B1 is
        "echo B1"
    on success
        finish
    end
on complete
    finish
end

Parent topic: Application process steps