<commit_before>version: '2.0'
name: st2cd.bwc_stage_release_packages
description: Stage bwc packages for release.

workflows:

    main:
        input:
            - version
            - projects
            - wait
            - distros:
                RHEL6: el6
                RHEL7: el7
                UBUNTU14: u14
                UBUNTU16: u16
        tasks:
            init:
                action: core.local
                input:
                    cmd: "echo <% $.version %> | cut -d \".\" -f1-2"
                publish:
                    branch: v<% task(init).result.stdout %>
                on-success:
                    - package_all
            package_all:
                with-items: project in <% $.projects %>
                action: circle_ci.run_build
                input:
                    project: stackstorm/<% $.project %>
                    branch: <% $.branch %>
                publish:
                    package_jobs: <% task(package_all).result.select(
                                    [$.result.reponame, $.result.build_num]) %>
                on-success:
                    - wait_for_packages: <% $.wait %>
            wait_for_packages:
                with-items: package_job in <% $.package_jobs %>
                workflow: wait_for_package
                input:
                    project: stackstorm/<% $.package_job[0] %>
                    build_number: <% str($.package_job[1]) %>


    wait_for_package:
        input:
            - project
            - build_number
        tasks:
            wait_build_completion:
                action: circle_ci.wait_until_build_finishes
                input:
                    project: <% $.project %>
                    build_number: <% $.build_number %>
                    wait_timeout: 3600
                    timeout: 3600
                on-success:
                    - check_build_status
            check_build_status:
                action: circle_ci.get_build_info
                input:
                    project: <% $.project %>
                    build_num: <% int($.build_number) %>
                publish:
                    status: <% task(check_build_status).result.result %>
                on-success:
                    - notify_failure: <% $.status.failed %>
            notify_failure:
                action: std.fail<commit_msg>Add username<commit_after>version: '2.0'
name: st2cd.bwc_stage_release_packages
description: Stage bwc packages for release.

workflows:

    main:
        input:
            - version
            - projects
            - username: stackstorm
            - wait
            - distros:
                RHEL6: el6
                RHEL7: el7
                UBUNTU14: u14
                UBUNTU16: u16
        tasks:
            init:
                action: core.local
                input:
                    cmd: "echo <% $.version %> | cut -d \".\" -f1-2"
                publish:
                    branch: v<% task(init).result.stdout %>
                on-success:
                    - package_all
            package_all:
                with-items: project in <% $.projects %>
                action: circle_ci.run_build
                input:
                    project: <% $.project %>
                    username: <% $.username %>
                    branch: <% $.branch %>
                publish:
                    package_jobs: <% task(package_all).result.select(
                                    [$.result.reponame, $.result.build_num]) %>
                on-success:
                    - wait_for_packages: <% $.wait %>
            wait_for_packages:
                with-items: package_job in <% $.package_jobs %>
                workflow: wait_for_package
                input:
                    project: <% $.package_job[0] %>
                    username: <% $.username %>
                    build_number: <% str($.package_job[1]) %>


    wait_for_package:
        input:
            - project
            - build_number
            - username
        tasks:
            wait_build_completion:
                action: circle_ci.wait_until_build_finishes
                input:
                    project: <% $.project %>
                    username: <% $.username %>
                    build_number: <% $.build_number %>
                    wait_timeout: 3600
                    timeout: 3600
                on-success:
                    - check_build_status
            check_build_status:
                action: circle_ci.get_build_info
                input:
                    project: <% $.project %>
                    username: <% $.username %>
                    build_num: <% int($.build_number) %>
                publish:
                    status: <% task(check_build_status).result.result %>
                on-success:
                    - notify_failure: <% $.status.failed %>
            notify_failure:
                action: std.fail
{'fraction_non_alphanumeric': 0.09463532248342375, 'fraction_numerical': 0.0108499095840868, 'mean_word_length': 1.0048328634716068, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5706714', 'n_tokens_mistral': 1367, 'n_tokens_neox': 1196, 'n_words': 233}