ZXF: [Node] FSTS Daily (Interval: 2)

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXF: [Node] FSTS Daily (Interval: 2)"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: true
        type: string
      branch-name:
        description: ""
        required: false
        type: string
      concurrency-group:
        description: "The concurrency group name to limit simultaneous workflows."
        required: false
        type: string

defaults:
  run:
    shell: bash

concurrency:
  group: ${{ github.event.inputs.concurrency-group || format('{0}-{1}-flow-jrs-daily-interval-groups', github.ref_name, github.sha) }}

# Panel Definition & Timings:
#   "configs/services/suites/daily/GCP-Daily-Services-Crypto-Migration-7N-1C.json"                ----         38m
#   "configs/services/suites/daily/GCP-Daily-Services-Balances-Validation-6N-1C.json"             ----         60m
#   "configs/services/suites/daily/GCP-Daily-Services-Crypto-Invalid-Accounts-4N-4C.json"         ----         50m
#   "configs/services/suites/daily/GCP-Daily-Services-Comp-ND-Reconnect-Correctness-6N-1C.json"   ----         110m
#   "configs/services/suites/daily/GCP-Daily-Services-Reconnect-6N-4C.json"                       ----         70m
#   "configs/services/suites/daily/GCP-Daily-Services-Comp-NetError-4N-1C.json"                   ----         40m
#   "configs/services/suites/daily/GCP-Daily-Services-Crypto-Restart-4N-1C.json"                  ----         100m
#
#   TOTAL RUN TIME:             468 minutes, 7.8 hours
#
#   Three parallel jobs:
#
#     crypto-migration-7n-1c -> balances-validation-6n-1c -> crypto-invalid-accounts-4n-4c
#     comp-nd-reconnect-correctness-6n-1c -> reconnect-6n-4c
#     comp-neterror-4n-1c -> crypto-restart-4n-1c

jobs:
  crypto-migration-7n-1c:
    name: Crypto-Migration-7N-1C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Crypto-Migration-7N-1C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  balances-validation-6n-1c:
    name: Balances-Validation-6N-1C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Balances-Validation-6N-1C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - crypto-migration-7n-1c
    if: ${{ !cancelled() && always() }}

  crypto-invalid-accounts-4n-4c:
    name: Crypto-Invalid-Accounts-4N-4C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Crypto-Invalid-Accounts-4N-4C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - balances-validation-6n-1c
    if: ${{ !cancelled() && always() }}

  comp-nd-reconnect-correctness-6n-1c:
    name: Comp-ND-Reconnect-Correctness-6N-1C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-ND-Reconnect-Correctness-6N-1C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  reconnect-6n-4c:
    name: Reconnect-6N-4C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Reconnect-6N-4C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - comp-nd-reconnect-correctness-6n-1c
    if: ${{ !cancelled() && always() }}

  comp-neterror-4n-1c:
    name: Comp-NetError-4N-1C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-NetError-4N-1C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  crypto-restart-4n-1c:
    name: Crypto-Restart-4N-1C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Crypto-Restart-4N-1C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - comp-neterror-4n-1c
    if: ${{ !cancelled() && always() }}


ZXF: [Node] FSTS Daily (Interval: 3)

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXF: [Node] FSTS Daily (Interval: 3)"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: true
        type: string
      branch-name:
        description: ""
        required: false
        type: string
      concurrency-group:
        description: "The concurrency group name to limit simultaneous workflows."
        required: false
        type: string

defaults:
  run:
    shell: bash

concurrency:
  group: ${{ github.event.inputs.concurrency-group || format('{0}-{1}-flow-jrs-daily-interval-groups', github.ref_name, github.sha) }}

# Panel Definition & Timings:
#  "configs/services/suites/daily/GCP-Daily-Services-Crypto-Update-Abort-4N-2C.json"                        ----         120m
#  "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-DisPreUpdate-4N-2C.json"                   ----         110m
#  "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-Reconnect-4N-2C.json"                      ----         180m
#  "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-Reconnect-Abort-4N-2C.json"                ----         130m
#  "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-Reconnect-Abort-DisPreUpdate-4N-2C.json"   ----         120m
#
#   TOTAL RUN TIME:             660 minutes, 11 hours

jobs:
  crypto-update-abort-4n-2c:
    name: Crypto-Update-Abort-4N-2C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Crypto-Update-Abort-4N-2C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  comp-update-dispreupdate-4n-2c:
    name: Comp-Update-DisPreUpdate-4N-2C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-DisPreUpdate-4N-2C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  comp-update-reconnect-4n-2c:
    name: Comp-Update-Reconnect-4N-2C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-Reconnect-4N-2C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  comp-update-reconnect-abort-4n-2c:
    name: Comp-Update-Reconnect-Abort-4N-2C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-Reconnect-Abort-4N-2C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  comp-update-reconnect-abort-dispreupdate-4n-2c:
    name: Comp-Update-Reconnect-Abort-DisPreUpdate-4N-2C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-Update-Reconnect-Abort-DisPreUpdate-4N-2C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}


ZXF: [Node] FSTS Daily (Interval: 4)

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXF: [Node] FSTS Daily (Interval: 4)"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: true
        type: string
      branch-name:
        description: ""
        required: false
        type: string
      concurrency-group:
        description: "The concurrency group name to limit simultaneous workflows."
        required: false
        type: string

defaults:
  run:
    shell: bash

concurrency:
  group: ${{ github.event.inputs.concurrency-group || format('{0}-{1}-flow-jrs-daily-interval-groups', github.ref_name, github.sha) }}

# Panel Definition & Timings:
#   "configs/services/suites/daily/GCP-Daily-Services-Comp-3NReconnect-15N-4C.json"                   ----         90m
#   "configs/services/suites/daily/GCP-Daily-Services-Global-3NReconnect-15N-4C.json"                 ----         90m

#   TOTAL RUN TIME:             90 minutes, 1.5 hours
#
#   Parallel job(s):
#
#     comp-3nreconnect-15n-4c

jobs:
  comp-3nreconnect-15n-4c:
    name: Comp-3NReconnect-15N-4C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-3NReconnect-15N-4C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

#  global-3nreconnect-15n-4c:
#    name: Global-3NReconnect-15N-4C
#    uses: ./.github/workflows/zxc-jrs-regression.yaml
#    with:
#      ref: ${{ github.event.inputs.ref }}
#      branch-name: ${{ github.event.inputs.branch-name }}
#      hedera-tests-enabled: true
#      use-branch-for-slack-channel: true
#      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Global-3NReconnect-15N-4C.json"
#    secrets:
#      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
#      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
#      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
#      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
#      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
#      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
#      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
#      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
#      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
#      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
#    needs:
#      - comp-3nreconnect-15n-4c
#    if: ${{ !cancelled() && always() }}


ZXF: [Node] FSTS Daily (Interval: 5)

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXF: [Node] FSTS Daily (Interval: 5)"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: true
        type: string
      branch-name:
        description: ""
        required: false
        type: string
      concurrency-group:
        description: "The concurrency group name to limit simultaneous workflows."
        required: false
        type: string

defaults:
  run:
    shell: bash

concurrency:
  group: ${{ github.event.inputs.concurrency-group || format('{0}-{1}-flow-jrs-daily-interval-groups', github.ref_name, github.sha) }}

# Panel Definition & Timings:
#    "configs/services/suites/daily/GCP-Daily-Services-Comp-Reconnect-6N-1C.json"                   ----         150m
#    "configs/services/suites/daily/GCP-Daily-Services-Comp-NI-Reconnect-Correctness-6N-1C.json"    ----         150m
#
#   TOTAL RUN TIME:             460 minutes, 7.8 hours
#

jobs:
  comp-reconnect-6n-1c:
    name: Comp-Reconnect-6N-1C
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-Reconnect-6N-1C.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

#  comp-ni-reconnect-correctness-6n-1c:
#    name: Comp-NI-Reconnect-Correctness-6N-1C
#    uses: ./.github/workflows/zxc-jrs-regression.yaml
#    with:
#      ref: ${{ github.event.inputs.ref }}
#      branch-name: ${{ github.event.inputs.branch-name }}
#      hedera-tests-enabled: true
#      use-branch-for-slack-channel: true
#      panel-config: "configs/services/suites/daily/GCP-Daily-Services-Comp-NI-Reconnect-Correctness-6N-1C.json"
#    secrets:
#      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
#      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
#      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
#      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
#      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
#      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
#      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
#      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
#      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
#      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
#    if: ${{ !cancelled() && always() }}


Node: FSTS Daily Regression

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "Node: FSTS Daily Regression"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: false
        type: string
      branch-name:
        description: ""
        required: false
        type: string

defaults:
  run:
    shell: bash

jobs:
  interval-01:
    name: Interval 1
    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
    with:
      ref: ${{ github.event.inputs.ref || github.sha }}
      branch-name: ${{ github.event.inputs.branch-name || github.ref_name }}
      workflow-file: node-flow-fsts-daily-interval-01.yaml
      concurrency-group: ${{ github.event.inputs.ref || github.sha }}-node-flow-fsts-daily-group-01
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}

#  interval-02:
#    name: Interval 2
#    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
#    needs:
#      - interval-01
#    with:
#      ref: ${{ github.event.inputs.ref || github.sha }}
#      branch-name: ${{ github.event.inputs.branch-name || github.ref_name }}
#      workflow-file: node-flow-fsts-daily-interval-02.yaml
#      concurrency-group: ${{ github.event.inputs.ref || github.sha }}-node-flow-fsts-daily-group-02
#    secrets:
#      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}

#  interval-03:
#    name: Interval 3
#    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
#    needs:
#      - interval-02
#    with:
#      ref: ${{ github.event.inputs.ref || github.sha }}
#      branch-name: ${{ github.event.inputs.branch-name || github.ref_name }}
#      workflow-file: node-flow-fsts-daily-interval-03.yaml
#      concurrency-group: ${{ github.event.inputs.ref || github.sha }}-node-flow-fsts-daily-group-03
#    secrets:
#      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}

  interval-04:
    name: Interval 4
    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
    needs:
      - interval-01
    with:
      ref: ${{ github.event.inputs.ref || github.sha }}
      branch-name: ${{ github.event.inputs.branch-name || github.ref_name }}
      workflow-file: node-flow-fsts-daily-interval-04.yaml
      concurrency-group: ${{ github.event.inputs.ref || github.sha }}-node-flow-fsts-daily-group-04
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}

  interval-05:
    name: Interval 5
    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
    needs:
      - interval-04
    with:
      ref: ${{ github.event.inputs.ref || github.sha }}
      branch-name: ${{ github.event.inputs.branch-name || github.ref_name }}
      workflow-file: node-flow-fsts-daily-interval-05.yaml
      concurrency-group: ${{ github.event.inputs.ref || github.sha }}-node-flow-fsts-daily-group-05
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}

#  interval-06:
#    name: Interval 6
#    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
#    needs:
#      - interval-05
#    with:
#      ref: ${{ github.event.inputs.ref || github.sha }}
#      branch-name: ${{ github.event.inputs.branch-name || github.ref_name }}
#      workflow-file: node-flow-fsts-daily-interval-06.yaml
#      concurrency-group: ${{ github.event.inputs.ref || github.sha }}-node-flow-fsts-daily-group-06
#    secrets:
#      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}


ZXCron: [Node] Develop JRS Tests

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXCron: [Node] Develop JRS Tests"
on:
  schedule:
    - cron: '30 6 * * *'
  workflow_dispatch:

defaults:
  run:
    shell: bash

jobs:
  trigger-task:
    name: Trigger Daily Run
    runs-on: [ self-hosted, Linux, small, scheduler, ephemeral ]
    steps:
      - name: Display Branch Information
        run: |
          printf "Ref: \t\t${{ github.ref }}"
          printf "Head Ref: \t\t${{ github.head_ref }}"
          printf "Ref Name: \t${{ github.ref_name }}"
          printf "Commit SHA: \t${{ github.sha }}"
  cron:
    name: Cron
    uses: ./.github/workflows/platform-zxc-launch-jrs-workflow.yaml
    needs:
      - trigger-task
    with:
      ref: ${{ github.sha }}
      branch-name: ${{ github.ref_name }}
      workflow-file: node-flow-fsts-daily-regression.yaml
      workflow-file-ref: ${{ github.ref }}
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}


ZXF: [Node] FSTS Daily (Interval: 6)

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXF: [Node] FSTS Daily (Interval: 6)"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: true
        type: string
      branch-name:
        description: ""
        required: false
        type: string
      concurrency-group:
        description: "The concurrency group name to limit simultaneous workflows."
        required: false
        type: string

defaults:
  run:
    shell: bash

concurrency:
  group: ${{ github.event.inputs.concurrency-group || format('{0}-{1}-flow-jrs-daily-interval-groups', github.ref_name, github.sha) }}

# Panel Definition & Timings:
# "configs/services/suites/daily/GCP-Daily-Services-MinStake-4N.json"                           ----         50m
# "configs/services/suites/daily/GCP-Daily-Services-SimilarStake-4N.json"                       ----         50m
# "configs/services/suites/daily/GCP-Daily-Services-UnevenStake-4N.json"                        ----         50m
# "configs/services/suites/daily/GCP-Daily-Services-ZeroStake-4N.json"                          ----         50m
# "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-MinStake-5N.json"       ----         30m
# "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-SimilarStake-5N.json"   ----         30m
# "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-UnevenStake-5N.json"    ----         30m
# "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-ZeroStake-5N.json"      ----         30m
#
#   TOTAL RUN TIME:             321 minutes, 5.3 hours
#
#   Two parallel jobs:
#
#     minstake-4n -> similarstake-4n -> unevenstake-4n -> zerostake-4n
#     restartwithnewnodes-minstake-5n ->

jobs:
  minstake-4n:
    name: MinStake-4N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-MinStake-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  similarstake-4n:
    name: SimilarStake-4N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-SimilarStake-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - minstake-4n
    if: ${{ !cancelled() && always() }}

  unevenstake-4n:
    name: UnevenStake-4N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-UnevenStake-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - similarstake-4n
    if: ${{ !cancelled() && always() }}

  zerostake-4n:
    name: ZeroStake-4N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-ZeroStake-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - unevenstake-4n
    if: ${{ !cancelled() && always() }}

  restartwithnewnodes-minstake-5n:
    name: RestartWithNewNodes-MinStake-5N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-MinStake-5N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    if: ${{ !cancelled() && always() }}

  restartwithnewnodes-similarstake-5n:
    name: RestartWithNewNodes-SimilarStake-5N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-SimilarStake-5N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - restartwithnewnodes-minstake-5n
    if: ${{ !cancelled() && always() }}

  restartwithnewnodes-unevenstake-5n:
    name: RestartWithNewNodes-UnevenStake-5N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-UnevenStake-5N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - restartwithnewnodes-similarstake-5n
    if: ${{ !cancelled() && always() }}

  restartwithnewnodes-zerostake-5n:
    name: RestartWithNewNodes-ZeroStake-5N
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      hedera-tests-enabled: true
      use-branch-for-slack-channel: true
      panel-config: "configs/services/suites/daily/GCP-Daily-Services-RestartWithNewNodes-ZeroStake-5N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - restartwithnewnodes-unevenstake-5n
    if: ${{ !cancelled() && always() }}


ZXF: [Platform] JRS Daily (Interval: 6)

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXF: [Platform] JRS Daily (Interval: 6)"
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag or SHA to checkout."
        required: true
        type: string
      branch-name:
        description: ""
        required: false
        type: string
      concurrency-group:
        description: "The concurrency group name to limit simultaneous workflows."
        required: false
        type: string

defaults:
  run:
    shell: bash

concurrency:
  group: ${{ github.event.inputs.concurrency-group || format('{0}-{1}-flow-jrs-daily-interval-groups', github.ref_name, github.sha) }}

# Panel Definition & Timings:
#   "configs/suites/GCP-PRCheck-Abbrev-4N.json"               ----          40m
#   "configs/suites/daily/4N/GCP-Daily-ISS-4N.json"           ----          100m
#   "configs/suites/daily/4N/GCP-Daily-AddressBook-4N.json"   ----          40m
#   "configs/suites/daily/5N/GCP-Daily-AddressBook-5N.json"   ----          40m
#   "configs/suites/daily/6N/GCP-Daily-Migration-6N.json"     ----          30m

#   TOTAL RUN TIME:             210 minutes, 3.5 hours

jobs:
  abbrev:
    name: Abbreviated
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      panel-config: "configs/suites/GCP-PRCheck-Abbrev-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
  iss:
    name: ISS
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      panel-config: "configs/suites/daily/4N/GCP-Daily-ISS-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - abbrev
    if: ${{ !cancelled() && always() }}
  addressBook:
    name: AddressBook
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      panel-config: "configs/suites/daily/4N/GCP-Daily-AddressBook-4N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - iss
    if: ${{ !cancelled() && always() }}
  addressBook-add-remove:
    name: AddressBook-Add-Remove
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      panel-config: "configs/suites/daily/5N/GCP-Daily-AddressBook-5N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - addressBook
    if: ${{ !cancelled() && always() }}
  migration:
    name: Migration
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      ref: ${{ github.event.inputs.ref }}
      branch-name: ${{ github.event.inputs.branch-name }}
      panel-config: "configs/suites/daily/6N/GCP-Daily-Migration-6N.json"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
    needs:
      - addressBook-add-remove
    if: ${{ !cancelled() && always() }}


Platform: PR Extended Checks

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "Platform: PR Extended Checks"
on:
  workflow_dispatch:
    slack-results-channel:
      description: "Slack Test Result Channel:"
      required: false
      type: string
      default: "regression-test"
    slack-summary-channel:
      description: "Slack Summary Channel:"
      required: false
      type: string
      default: "regression-test"
    java-version:
      description: "Java JDK Version:"
      type: string
      required: false
      default: "21.0.1"
    java-distribution:
      description: "Java JDK Distribution:"
      type: string
      required: false
      default: "temurin"
    gradle-version:
      description: "Gradle Version:"
      type: string
      required: false
      default: "wrapper"

defaults:
  run:
    shell: bash

concurrency:
  group: pr-ext-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  reconnect:
    name: Reconnect
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      panel-config: "configs/suites/daily/4N/GCP-Daily-Reconnect-4N.json"
      ref: ${{ github.event.inputs.ref || github.ref }}
      branch-name: ${{ github.ref_name }}
      slack-results-channel: ${{ github.event.inputs.slack-results-channel }}
      slack-summary-channel: ${{ github.event.inputs.slack-summary-channel }}
      java-version: ${{ github.event.inputs.java-version || '21.0.1' }}
      java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
      gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }}
      use-branch-for-slack-channel: false
      custom-job-name: "Custom"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
  restart:
    name: Restart
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      panel-config: "configs/suites/daily/4N/GCP-Daily-Restart-4N.json"
      ref: ${{ github.event.inputs.ref || github.ref }}
      branch-name: ${{ github.ref_name }}
      slack-results-channel: ${{ github.event.inputs.slack-results-channel }}
      slack-summary-channel: ${{ github.event.inputs.slack-summary-channel }}
      java-version: ${{ github.event.inputs.java-version || '21.0.1' }}
      java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
      gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }}
      use-branch-for-slack-channel: false
      custom-job-name: "Custom"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
  dynamic-freeze:
    name: DynamicFreeze
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      panel-config: "configs/suites/daily/4N/GCP-Daily-DynamicFreeze-4N.json"
      ref: ${{ github.event.inputs.ref || github.ref }}
      branch-name: ${{ github.ref_name }}
      slack-results-channel: ${{ github.event.inputs.slack-results-channel }}
      slack-summary-channel: ${{ github.event.inputs.slack-summary-channel }}
      java-version: ${{ github.event.inputs.java-version || '21.0.1' }}
      java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
      gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }}
      use-branch-for-slack-channel: false
      custom-job-name: "Custom"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
  NewNodesSimilarStake:
    name: NewNodesSimilarStake
    uses: ./.github/workflows/zxc-jrs-regression.yaml
    with:
      panel-config: "configs/suites/daily/5N/GCP-Daily-RestartWithNewNodes-SimilarStake-5N.json"
      ref: ${{ github.event.inputs.ref || github.ref }}
      branch-name: ${{ github.ref_name }}
      slack-results-channel: ${{ github.event.inputs.slack-results-channel }}
      slack-summary-channel: ${{ github.event.inputs.slack-summary-channel }}
      java-version: ${{ github.event.inputs.java-version || '21.0.1' }}
      java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
      gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }}
      use-branch-for-slack-channel: false
      custom-job-name: "Custom"
    secrets:
      access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
      jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
      jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
      gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
      gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
      slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
      grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
      grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}


Node: Deploy Preview

##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "Node: Deploy Preview"
on:
  workflow_dispatch:
    inputs:
      tag-to-deploy:
        description: "Version/Tag to Deploy (eg: v0.41.0 or 0.41.1):"
        type: string
        required: true
      dry-run-enabled:
        description: "Perform Dry Run"
        type: boolean
        required: false
        default: false

defaults:
  run:
    shell: bash

jobs:
  prepare-deploy-preview:
    name: Prepare for Deploy
    runs-on: [self-hosted, Linux, medium, ephemeral]
    outputs:
      version: ${{ steps.tag.outputs.version }}
      prerelease: ${{ steps.tag.outputs.prerelease }}
    steps:
      - name: Install Semantic Version Tools
        run: |
          echo "::group::Download SemVer Binary"
          sudo curl -L -o /usr/local/bin/semver https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver
          echo "::endgroup::"
          echo "::group::Change SemVer Binary Permissions"
          sudo chmod -v +x /usr/local/bin/semver
          echo "::endgroup::"
          echo "::group::Show SemVer Binary Version Info"
          semver --version
          echo "::endgroup::"

      - name: Extract Tag Version
        id: tag
        run: |
          RELEASE_VERSION="$(semver get release "${{ github.event.inputs.tag-to-deploy }}")"
          PRERELEASE_VERSION="$(semver get prerel "${{ github.event.inputs.tag-to-deploy }}")"

          FINAL_VERSION="${RELEASE_VERSION}"
          PRERELEASE_FLAG="false"
          [[ -n "${PRERELEASE_VERSION}" ]] && FINAL_VERSION="${RELEASE_VERSION}-${PRERELEASE_VERSION}"
          [[ -n "${PRERELEASE_VERSION}" ]] && PRERELEASE_FLAG="true"

          echo "version=${FINAL_VERSION}" >>"${GITHUB_OUTPUT}"
          echo "prerelease=${PRERELEASE_FLAG}" >>"${GITHUB_OUTPUT}"

  deploy-tag:
    name: Deploy Tag
    uses: ./.github/workflows/node-zxc-deploy-preview.yaml
    needs:
      - prepare-deploy-preview
    with:
      version-policy: specified
      new-version: ${{ needs.prepare-deploy-preview.outputs.version }}
    secrets:
      access-token: ${{ secrets.GITHUB_TOKEN }}
      bucket-name: ${{ secrets.RELEASE_ARTIFACT_BUCKET_NAME }}
      jenkins-preview-url: ${{ secrets.RELEASE_JENKINS_PREVIEW_URL }}


ZXCron: [Node] Release JRS Tests

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXCron: [Node] Release JRS Tests"
on:
  schedule:
    - cron: '30 10 * * *'
  workflow_dispatch:

defaults:
  run:
    shell: bash

env:
  BRANCH_LIST_FILE: "${{ github.workspace }}/branches.lst"

jobs:
  cron:
    name: Cron / Launch Workflows
    runs-on: [self-hosted, Linux, small, scheduler, ephemeral]
    steps:
      - name: Checkout Code
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
        with:
          fetch-depth: 0

      - name: Identify Release Branches
        run: |
          echo "::group::Ensure Branch List File Exists"
            touch "${BRANCH_LIST_FILE}"
          echo "::endgroup::"

          BRANCH_LIST="$(git branch --list --remotes --format='%(refname:strip=3)' | cat)"

          while IFS= read -r line; do
            [[ "${line}" =~ ^release/([0-9]+).([0-9]+) ]] || continue

            major="${BASH_REMATCH[1]}"
            minor="${BASH_REMATCH[2]}"

            if [[ "${major}" -eq 0 && "${minor}" -lt 51 ]]; then
              continue
            fi

            echo "::group::Identified Branch: ${line}"
            echo "${line}" | tee -a "${BRANCH_LIST_FILE}"
            echo "::endgroup::"
          done <<< "${BRANCH_LIST}"

      - name: Show Branch List
        run: cat "${BRANCH_LIST_FILE}"

      - name: Install Github CLI
        env:
          GITHUB_TOKEN: ${{ secrets.PLATFORM_access-token }}
        run: |
          curl -O -L -s https://github.com/cli/cli/releases/download/v2.12.1/gh_2.12.1_linux_amd64.deb
          sudo apt install -y ./gh_2.12.1_linux_amd64.deb
          rm -rf gh_2.12.1_linux_amd64.deb

      - name: Launch JRS Jobs
        env:
          GITHUB_TOKEN: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
        run: |
          FIRST_RUN_STARTED="false"

          while IFS= read -r line; do
            [[ -n "${line}" ]] || continue

            if [[ "${FIRST_RUN_STARTED}" = true ]]; then
              sleep 30m
            else
              FIRST_RUN_STARTED="true"
            fi

            echo "::group::Processing Branch: ${line}"
              printf "======== Beginning Github Actions Workflow Initiation ========\n"
              gh workflow run node-flow-fsts-daily-regression.yaml \
                  --ref "${line}" \
                  -R "${{ github.repository }}" \
                  -f "branch-name=${line}" \
                  -f "ref=${line}" 2>&1 | cat
              printf "======== Finished Github Actions Workflow Initiation ========\n"
            echo "::endgroup::"
          done < <(cat "${BRANCH_LIST_FILE}")


##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXC: [Node] Deploy Preview Network Release"
on:
  workflow_call:
    inputs:
      # Valid version policies are as follows: specified, branch-commit, adhoc-commit
      version-policy:
        description: "Version Policy:"
        type: string
        required: true
      new-version:
        description: "New Version:"
        type: string
        required: false
      dry-run-enabled:
        description: "Perform Dry Run"
        type: boolean
        required: false
        default: false
      custom-job-label:
        description: "Custom Job Label:"
        type: string
        required: false
        default: "Deploy Preview"

    secrets:
      access-token:
        required: true
      bucket-name:
        required: true
      jenkins-preview-url:
        required: true

defaults:
  run:
    shell: bash

permissions:
  id-token: write
  contents: read

jobs:
  Deploy-Preview:
    name: ${{ inputs.custom-job-label || 'Deploy Preview' }}
    runs-on: [self-hosted, Linux, large, ephemeral]
    outputs:
      version: ${{ steps.effective-version.outputs.number }}
    steps:
      - name: Install Semantic Version Tools
        run: |
          echo "::group::Download SemVer Binary"
          sudo curl -L -o /usr/local/bin/semver https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver
          echo "::endgroup::"
          echo "::group::Change SemVer Binary Permissions"
          sudo chmod -v +x /usr/local/bin/semver
          echo "::endgroup::"
          echo "::group::Show SemVer Binary Version Info"
          semver --version
          echo "::endgroup::"

      - name: Install JSON Tools
        run: |
          if ! command -v jq >/dev/null 2>&1; then
            echo "::group::Setup JQ Command"
            sudo apt update
            sudo apt install -y jq
            echo "::endgroup::"
          fi

          JQ_VERSION="$(jq --version)"
          if [[ "${JQ_VERSION}" != "jq-1.6" ]]; then
            echo "::group::Updating JQ Version"
            sudo apt update
            sudo apt upgrade -y jq
            echo "::endgroup::"
          fi

          if ! command -v tee >/dev/null 2>&1; then
            echo "::group::Setup Tee Command"
            sudo apt update
            sudo apt install -y coreutils
            echo "::endgroup::"
          fi

          echo "::group::Show JQ Version"
          jq --version
          echo "::endgroup::"

      - name: Verify Version Update (As Specified)
        if: ${{ inputs.version-policy == 'specified' && !cancelled() && !failure() }}
        run: |
          VALID_VERSION="$(semver validate "${{ inputs.new-version }}")"

          if [[ "${VALID_VERSION}" != "valid" ]]; then
            echo "::error title=Version Error::The supplied new-version parameter (${{ inputs.new-version }}) is invalid and does not conform to the semantic versioning specifications."
            exit 2
          fi

      - name: Authenticate to Google Cloud
        uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
        if: ${{ inputs.dry-run-enabled != true && !cancelled() && !failure() }}
        with:
          workload_identity_provider: "projects/235822363393/locations/global/workloadIdentityPools/hedera-builds-pool/providers/hedera-builds-gh-actions"
          service_account: "hedera-artifact-builds@devops-1-254919.iam.gserviceaccount.com"

      - name: Setup Google Cloud SDK
        uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
        if: ${{ inputs.dry-run-enabled != true && !cancelled() && !failure() }}

      - name: Validate Release Artifact Exist
        if: ${{ inputs.dry-run-enabled != true && !cancelled() && !failure() }}
        run: |
          ARTIFACT_NAME="build-v${{ inputs.new-version }}"
          echo "ARTIFACT_NAME=${ARTIFACT_NAME}"
          gsutil ls "gs://${{ secrets.bucket-name }}/${ARTIFACT_NAME}.zip"

      - name: Prepare Jenkins Notification Request
        id: jenkins-preview-request
        env:
          PRE_JSON_REQUEST: ${{ toJSON(github.event) }}
        run: echo "request=$(jq --compact-output '.ref = "v${{ inputs.new-version }}"' <<<"${PRE_JSON_REQUEST}")" >>"${GITHUB_OUTPUT}"

      - name: Notify Jenkins of Release (Preview Network)
        id: jenkins-preview
        uses: fjogeleit/http-request-action@0bd00a33db6f82063a3c6befd41f232f61d66583 # v1.15.2
        if: ${{ inputs.dry-run-enabled != true && !cancelled() && !failure() }}
        with:
          url: ${{ secrets.jenkins-preview-url }}
          data: ${{ steps.jenkins-preview-request.outputs.request }}

      - name: Display Jenkins Payload
        env:
          JSON_RESPONSE: ${{ steps.jenkins-preview.outputs.response }}
        run: |
          jq '.' <<<"${JSON_RESPONSE}"
          printf "### Jenkins Response Payload\n\`\`\`json\n%s\n\`\`\`\n" "$(jq '.' <<<"${JSON_RESPONSE}")" >>"${GITHUB_STEP_SUMMARY}"

      - name: Check for Jenkins Failures (Preview Network)
        env:
          JSON_RESPONSE: ${{ steps.jenkins-preview.outputs.response }}
        run: |
          PREVIEW_TRIGGERED="$(jq '.jobs."build-previewnet".triggered' <<<"${JSON_RESPONSE}")"

          if [[ "${PREVIEW_TRIGGERED}" != true ]]; then
            echo "::error title=Jenkins Trigger Failure::Failed to trigger the 'build-previewnet' pipeline in Jenkins!"
            exit 1
          fi


Node: Deploy Adhoc Release

##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "Node: Deploy Adhoc Release"
on:
  workflow_dispatch:
    inputs:
      dry-run-enabled:
        description: "Perform Dry Run"
        type: boolean
        required: false
        default: false
      java-version:
        description: "Java JDK Version:"
        type: string
        required: false
        default: "21.0.1"
      java-distribution:
        description: "Java JDK Distribution:"
        type: string
        required: false
        default: "temurin"
      gradle-version:
        description: "Gradle Version:"
        type: string
        required: false
        default: "wrapper"

defaults:
  run:
    shell: bash

jobs:
  release-adhoc:
    name: Release [Adhoc]
    if: ${{ github.event_name == 'workflow_dispatch' }}
    uses: ./.github/workflows/node-zxc-build-release-artifact.yaml
    with:
      version-policy: branch-commit
      trigger-env-deploy: none
      release-profile: AdhocCommit
      dry-run-enabled: ${{ github.event.inputs.dry-run-enabled == 'true' }}
      java-version: ${{ github.event.inputs.java-version || '21.0.1' }}
      java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
      gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }}

    secrets:
      access-token: ${{ secrets.GITHUB_TOKEN }}
      bucket-name: ${{ secrets.RELEASE_ARTIFACT_BUCKET_NAME }}
      cdn-bucket-name: ${{ secrets.CDN_ARTIFACT_BUCKET_NAME }}
      svcs-ossrh-username: ${{ secrets.SVCS_OSSRH_USERNAME }}
      svcs-ossrh-password: ${{ secrets.SVCS_OSSRH_PASSWORD }}
      svcs-gpg-key-contents: ${{ secrets.SVCS_GPG_KEY_CONTENTS }}
      svcs-gpg-key-passphrase: ${{ secrets.SVCS_GPG_KEY_PASSPHRASE }}
      sdk-ossrh-username: ${{ secrets.PLATFORM_OSSRH_USERNAME }}
      sdk-ossrh-password: ${{ secrets.PLATFORM_OSSRH_PASSWORD }}
      sdk-gpg-key-contents: ${{ secrets.PLATFORM_GPG_KEY_CONTENTS }}
      sdk-gpg-key-passphrase: ${{ secrets.PLATFORM_GPG_KEY_PASSPHRASE }}
      slack-webhook-url: ${{ secrets.PLATFORM_SLACK_RELEASE_WEBHOOK }}
      jf-url: ${{ vars.JF_URL }}
      jf-docker-registry: ${{ vars.JF_DOCKER_REGISTRY }}
      jf-user-name: ${{ vars.JF_USER_NAME }}
      jf-access-token: ${{ secrets.JF_ACCESS_TOKEN }}


PR Formatting

##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "PR Formatting"
on:
  pull_request_target:
    types:
      - assigned
      - unassigned
      - labeled
      - unlabeled
      - opened
      - reopened
      - edited
      - converted_to_draft
      - ready_for_review
      - review_requested
      - review_request_removed
      - locked
      - unlocked
      - synchronize

defaults:
  run:
    shell: bash

permissions:
  statuses: write

jobs:
  title-check:
    name: Title Check
    runs-on: [self-hosted, Linux, medium, ephemeral]
    steps:
      - name: Check PR Title
        uses: step-security/conventional-pr-title-action@0eae74515f5a79f8773fa04142dd746df76666ac # v1.0.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  milestone-check:
    name: Milestone Check
    runs-on: [self-hosted, Linux, medium, ephemeral]
    steps:
      - name: Check Milestone
        if: ${{ github.event.pull_request.milestone == null }}
        run: |
            echo "Milestone is not set. Failing the workflow."
            exit 1

  assignee-check:
    name: Assignee Check
    runs-on: [ self-hosted, Linux, medium, ephemeral ]

    steps:
      - name: Check Assignee
        if: ${{ github.event.pull_request.assignees == null || github.event.pull_request.assignees[0] == null }}
        run: |
            echo "Assignee is not set. Failing the workflow."
            exit 1


Artifact Determinism

##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: Artifact Determinism
on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The branch, tag, or commit to checkout:"
        type: string
        required: false
        default: ""
      java-distribution:
        description: "Java JDK Distribution:"
        type: string
        required: false
        default: "temurin"
      java-version:
        description: "Java JDK Version:"
        type: string
        required: false
        default: "21.0.1"
  push:
    branches:
      - develop
      - 'release/**'
    tags:
      - 'v*.*.*'

defaults:
  run:
    shell: bash

permissions:
  id-token: write
  contents: read

jobs:
  check-gradle:
    name: Gradle
    uses: ./.github/workflows/zxc-verify-gradle-build-determinism.yaml
    with:
      ref: ${{ github.event.inputs.ref || '' }}
      java-distribution: ${{ inputs.java-distribution || 'temurin' }}
      java-version: ${{ inputs.java-version || '21.0.1' }}
    secrets:
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}

  check-docker:
    name: Docker
    uses: ./.github/workflows/zxc-verify-docker-build-determinism.yaml
    with:
      ref: ${{ github.event.inputs.ref || '' }}
      java-distribution: ${{ inputs.java-distribution || 'temurin' }}
      java-version: ${{ inputs.java-version || '21.0.1' }}
    secrets:
      gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
      gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}


ZXC: Verify Gradle Build Determinism

##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "ZXC: Verify Gradle Build Determinism"
on:
  workflow_call:
    inputs:
      ref:
        description: "The branch, tag, or commit to checkout:"
        type: string
        required: false
        default: ""
      java-distribution:
        description: "Java JDK Distribution:"
        type: string
        required: false
        default: "temurin"
      java-version:
        description: "Java JDK Version:"
        type: string
        required: false
        default: "21.0.1"

    secrets:
      gradle-cache-username:
        description: "The username used to authenticate with the Gradle Build Cache Node."
        required: true
      gradle-cache-password:
        description: "The password used to authenticate with the Gradle Build Cache Node."
        required: true

defaults:
  run:
    shell: bash

permissions:
  id-token: write
  contents: read

env:
  GRADLE_MANIFEST_PATH: ${{ github.workspace }}/.manifests/gradle
  GRADLE_MANIFEST_GENERATOR: .github/workflows/support/scripts/generate-gradle-artifact-baseline.sh
  GRADLE_CACHE_USERNAME: ${{ secrets.gradle-cache-username }}
  GRADLE_CACHE_PASSWORD: ${{ secrets.gradle-cache-password }}

jobs:
  generate-baseline:
    name: Generate Baseline
    runs-on: [self-hosted, Linux, medium, ephemeral]
    outputs:
      sha: ${{ steps.commit.outputs.sha }}
      path: ${{ steps.baseline.outputs.path }}
      file: ${{ steps.baseline.outputs.file }}
      name: ${{ steps.baseline.outputs.name }}
    steps:
      - name: Checkout Code
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
        with:
          ref: ${{ inputs.ref }}

      - name: Setup Java
        uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
        with:
          distribution: ${{ inputs.java-distribution }}
          java-version: ${{ inputs.java-version }}

      - name: Setup Gradle
        uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3.1.0
        with:
          cache-disabled: true

      - name: Authenticate to Google Cloud
        id: google-auth
        uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
        with:
          workload_identity_provider: "projects/235822363393/locations/global/workloadIdentityPools/hedera-builds-pool/providers/hedera-builds-gh-actions"
          service_account: "swirlds-automation@hedera-registry.iam.gserviceaccount.com"

      - name: Setup Google Cloud SDK
        uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0

      - name: Retrieve Commit Hash
        id: commit
        run: echo "sha=$(git rev-parse HEAD)" >> "${GITHUB_OUTPUT}"

      - name: Baseline Existence Check
        id: baseline
        run: |
          BASELINE_NAME="${{ steps.commit.outputs.sha }}.tar.gz"
          BASELINE_PATH="gs://hedera-ci-ephemeral-artifacts/${{ github.repository }}/gradle/baselines"
          BASELINE_FILE="${BASELINE_PATH}/${BASELINE_NAME}"
          BASELINE_EXISTS="false"

          if gsutil ls "${BASELINE_FILE}" >/dev/null 2>&1; then
             BASELINE_EXISTS="true"
          fi

          echo "exists=${BASELINE_EXISTS}" >> "${GITHUB_OUTPUT}"
          echo "path=${BASELINE_PATH}" >> "${GITHUB_OUTPUT}"
          echo "name=${BASELINE_NAME}" >> "${GITHUB_OUTPUT}"
          echo "file=${BASELINE_FILE}" >> "${GITHUB_OUTPUT}"

      - name: Build Artifacts
        id: gradle-build
        if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
        run: ./gradlew assemble --scan

      - name: Generate Manifest
        id: manifest
        env:
          MANIFEST_PATH: ${{ env.GRADLE_MANIFEST_PATH }}
        if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
        run: ${{ env.GRADLE_MANIFEST_GENERATOR }}

      - name: Upload Baseline
        if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
        run: gsutil cp "${{ steps.manifest.outputs.file }}" "${{ steps.baseline.outputs.file }}"

  verify-artifacts:
    name: "Verify Artifacts (${{ join(matrix.os, ', ') }})"
    runs-on: ${{ matrix.os }}
    needs:
      - generate-baseline
    strategy:
      fail-fast: false
      matrix:
        # Disabled MacOS runner testing due to concurrency issues with the Github hosted runners.
        os:
          - ubuntu-22.04
          - ubuntu-20.04
          #- macos-12
          #- macos-11
          - windows-2022
          - windows-2019
          - [self-hosted, Linux, medium, ephemeral]
          - [self-hosted, Linux, large, ephemeral]
    steps:
      - name: Standardize Git Line Endings
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf

      - name: Checkout Code
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
        with:
          ref: ${{ inputs.ref }}

      - name: Setup Python
        uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
        with:
          python-version: 3.9

      - name: Setup Java
        uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
        with:
          distribution: ${{ inputs.java-distribution }}
          java-version: ${{ inputs.java-version }}

      - name: Setup Gradle
        uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3.1.0
        with:
          cache-disabled: true

      - name: Setup CoreUtils (macOS)
        if: ${{ runner.os == 'macOS' }}
        run: brew install coreutils

      - name: Authenticate to Google Cloud
        id: google-auth
        uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
        with:
          workload_identity_provider: "projects/235822363393/locations/global/workloadIdentityPools/hedera-builds-pool/providers/hedera-builds-gh-actions"
          service_account: "swirlds-automation@hedera-registry.iam.gserviceaccount.com"

      - name: Setup Google Cloud SDK
        uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
        env:
          CLOUDSDK_PYTHON: ${{ format('{0}{1}', env.pythonLocation, runner.os == 'Windows' && '\python.exe' || '/bin/python3') }}

      - name: Download Baseline
        env:
          CLOUDSDK_PYTHON: ${{ format('{0}{1}', env.pythonLocation, runner.os == 'Windows' && '\python.exe' || '/bin/python3') }}
        run: |
          mkdir -p "${GRADLE_MANIFEST_PATH}"
          cd "${GRADLE_MANIFEST_PATH}"
          gsutil cp "${{ needs.generate-baseline.outputs.file }}" .
          tar -xzf "${{ needs.generate-baseline.outputs.name }}"

      - name: Build Artifacts
        id: gradle-build
        run: ./gradlew assemble --scan --no-build-cache

      - name: Regenerate Manifest
        id: regen-manifest
        env:
          MANIFEST_PATH: ${{ env.GRADLE_MANIFEST_PATH }}/regenerated
        run: ${{ env.GRADLE_MANIFEST_GENERATOR }}

      - name: Validate Libraries
        working-directory: ${{ github.workspace }}/hedera-node/data/lib
        run: sha256sum -c "${GRADLE_MANIFEST_PATH}/libraries.sha256"

      - name: Validate Applications
        working-directory: ${{ github.workspace }}/hedera-node/data/apps
        run: sha256sum -c "${GRADLE_MANIFEST_PATH}/applications.sha256"

      - name: Compare Library Manifests
        run: |
          if ! diff -u "${GRADLE_MANIFEST_PATH}/libraries.sha256" "${{ steps.regen-manifest.outputs.libraries }}" >/dev/null 2>&1; then
            echo "::group::Library Manifest Differences"
            diff -u "${GRADLE_MANIFEST_PATH}/libraries.sha256" "${{ steps.regen-manifest.outputs.libraries }}"
            echo "::endgroup::"
            exit 1
          fi

      - name: Compare Application Manifests
        run: |
          if ! diff -u "${GRADLE_MANIFEST_PATH}/applications.sha256" "${{ steps.regen-manifest.outputs.applications }}" >/dev/null 2>&1; then
            echo "::group::Application Manifest Differences"
            diff -u "${GRADLE_MANIFEST_PATH}/applications.sha256" "${{ steps.regen-manifest.outputs.applications }}"
            echo "::endgroup::"
            exit 1
          fi

      - name: Publish Manifests
        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
        if: ${{ steps.regen-manifest.conclusion == 'success' && failure() && !cancelled() }}
        with:
          name: Gradle Manifests [${{ join(matrix.os, ', ') }}]
          path: ${{ env.GRADLE_MANIFEST_PATH }}/**


Node: Performance Tests

##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

name: "Node: Performance Tests"
on:
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:

defaults:
  run:
    shell: bash

env:
  TEST_SCRIPT: ".github/workflows/support/scripts/nightly.sh"
  CHECK_ACTIVE: ".github/workflows/support/scripts/loki-logs.sh"
  VERSION_MIRRORNODE : "custom"
  K8S_CLUSTER : "gke_hedera-testing-1_us-central1-a_sandbox-perfnet6"

  USERNAME: ${{ secrets.TESTING_JENKINS_API_USERNAME }}
  PASSWORD: ${{ secrets.TESTING_JENKINS_API_PASSWORD }}
  SERVER: ${{ secrets.TESTING_JENKINS_API_SERVER }}

  LOKI_ADDR: ${{ secrets.LOKI_ADDR }}
  LOKI_USERNAME: ${{ secrets.LOKI_USERNAME }}
  LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}

permissions:
  id-token: write
  contents: read

jobs:
  canonical-test:
    name: Canonical (10 hour)
    runs-on: [self-hosted, Linux, medium, ephemeral]
    steps:
      - name: Checkout Code
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

      - name: Authenticate to Google Cloud
        uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
        with:
          workload_identity_provider: "projects/235822363393/locations/global/workloadIdentityPools/hedera-builds-pool/providers/hedera-builds-gh-actions"
          service_account: "hedera-artifact-builds@devops-1-254919.iam.gserviceaccount.com"

      - name: Setup Google Cloud SDK
        uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0

      - name: Verify Workflow Parameters
        id: parameters
        run: |
          BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
          BRANCH_NAME="${BRANCH_NAME##origin/}"
          BRANCH_NAME_LOWER="$(echo "${BRANCH_NAME}" | tr '[:upper:]' '[:lower:]')"
          BRANCH_NAME_SAFE="$(echo "${BRANCH_NAME_LOWER}" | tr '/' '-' | tr '_' '.')"

          echo "branch-name-lower=${BRANCH_NAME_LOWER}" >>"${GITHUB_OUTPUT}"
          echo "commit-id-short=$(echo "${{ github.sha }}" | cut -c1-8)" >>"${GITHUB_OUTPUT}"

      - name: Check If Release Artifact Exist in Bucket
        id: check-if-exist
        run: |
          set +e
          ARTIFACT_NAME="build-${{ steps.parameters.outputs.branch-name-lower }}-${{ steps.parameters.outputs.commit-id-short }}"
          ARTIFACT_PATH="gs://${{ secrets.RELEASE_ARTIFACT_BUCKET_NAME }}/${ARTIFACT_NAME}.zip"
          echo "ARTIFACT_PATH=${ARTIFACT_PATH}"

          while true
          do
            gsutil -q stat "${ARTIFACT_PATH}"
            PATH_EXIST=$?
            if [ ${PATH_EXIST} -eq 0 ]; then
              echo "Artifact Ready"
              break
            else
              echo "Artifact not ready, wait 2 minutes"
              sleep 2m
            fi
          done
          echo "build-version=${ARTIFACT_NAME}" >>"${GITHUB_OUTPUT}"

      - name: Reset Network
        id: reset-network
        run: |
          curl -X POST 'https://ci.preprod.hedera-devops.com/generic-webhook-trigger/invoke?token=${{ secrets.JENKINS_NETWORK_RESET }}&command=/devops-reset&text=engnet1%20${{ steps.check-if-exist.outputs.build-version }}&user_id=${{ vars.SLACK_ID }}&user_name=${{ vars.SLACK_USER }}&channel_id=${{ vars.DEVOP_CHANNEL_ID }}&channel_name=${{ vars.DEVOP_CHANNEL_NAME }}'
          echo "Sleep 6 minutes for network reset"
          sleep 6m

      - name: Run LogCLI to Wait for Network Active
        id: run-logcli-wait-network-active
        run: |
          curl -O -L "https://github.com/grafana/loki/releases/download/v2.9.2/logcli-linux-amd64.zip"
          unzip logcli-linux-amd64.zip
          chmod a+x logcli-linux-amd64
          bash "${{ github.workspace }}/${{ env.CHECK_ACTIVE }}" engnet1 7 3 600 "${{ github.workspace }}/logcli-linux-amd64" 0

      - name: Restore Old Signed State
        id: restore-old-signed-state
        run: |
          curl -X POST 'https://ci.preprod.hedera-devops.com/generic-webhook-trigger/invoke?token=${{ secrets.JENKINS_RESTORE_BACKUP }}&command=/devops-restore-backup&text=gs%3A%2F%2Fchillybin%2Fengnet1-state%2Fengnet1-node00%2F${{ vars.GS_STATE }}&user_id=${{ vars.SLACK_ID }}&user_name=${{ vars.SLACK_USER }}&channel_id=${{ vars.DEVOP_CHANNEL_ID }}&channel_name=${{ vars.DEVOP_CHANNEL_NAME }}'
          echo "Sleep 18 minutes for network to load"
          sleep 18m

      - name: Run LogCLI to Wait for Network Active Again
        id: run-logcli-wait-network-active-again
        run: |
          bash "${{ github.workspace }}/${{ env.CHECK_ACTIVE }}" engnet1 7 3 3000 "${{ github.workspace }}/logcli-linux-amd64" 0

      - name: Call Test Script
        id: call-test-script
        run: |
          bash "${{ github.workspace }}/${{ env.TEST_SCRIPT }}" "${{ env.USERNAME }}" "${{ env.PASSWORD }}" "${{ env.SERVER }}" "${{ env.K8S_CLUSTER }}" "${{ steps.check-if-exist.outputs.build-version }}" "${{ env.VERSION_MIRRORNODE }}"