diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index 993e3c324524..e142a282b8bd 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -61,6 +61,27 @@ defaults: runs: using: "composite" steps: + - name: Prepare folder prefix + id: prepare_prefix + shell: bash + run: | + # Check if custom_branch_name is set and not empty + if [ -n "${{ inputs.custom_branch_name }}" ]; then + # Extract and sanitize custom_branch_name + CUSTOM_BRANCH_NAME="${{ inputs.custom_branch_name }}" + # Replace all unsupported characters with hyphens + SANITIZED_NAME="${CUSTOM_BRANCH_NAME//[^a-zA-Z0-9-]/-}" + # Optionally limit the length to, say, 50 characters + SANITIZED_NAME="${SANITIZED_NAME:0:50}" + # Assign the sanitized name to the folder_prefix + FOLDER_PREFIX="ya-${SANITIZED_NAME}-" + else + # If the branch name is not provided, use a default prefix + FOLDER_PREFIX='ya-' + fi + # Output the folder_prefix for use in subsequent steps + echo "folder_prefix=${FOLDER_PREFIX}" >> $GITHUB_ENV + - name: Prepare s3cmd uses: ./.github/actions/s3cmd with: @@ -68,7 +89,7 @@ runs: s3_endpoint: ${{ fromJSON( inputs.vars ).AWS_ENDPOINT }} s3_key_id: ${{ fromJSON( inputs.secs ).AWS_KEY_ID }} s3_key_secret: ${{ fromJSON( inputs.secs ).AWS_KEY_VALUE }} - folder_prefix: ya- + folder_prefix: ${{ env.folder_prefix }} build_preset: ${{ inputs.build_preset }} - name: Run build and tests diff --git a/.github/workflows/regression_run.yml b/.github/workflows/regression_run.yml index 9feadcbd7fce..831bd1983f4c 100644 --- a/.github/workflows/regression_run.yml +++ b/.github/workflows/regression_run.yml @@ -22,5 +22,5 @@ jobs: build_preset: ["relwithdebinfo", "release-asan", "release-tsan", "release-msan"] with: test_targets: ydb/ - branches: ${{ inputs.use_default_branches == true && '["main", "stable-25-1", "stable-25-1-1", "stable-25-1-analytics"]' || github.ref_name }} + branches: ${{ (inputs.use_default_branches == true || github.event_name == 'schedule') && '["main", "stable-25-1", "stable-25-1-1", "stable-25-1-analytics"]' || github.ref_name }} build_preset: ${{ matrix.build_preset }} \ No newline at end of file diff --git a/.github/workflows/regression_run_compatibility.yml b/.github/workflows/regression_run_compatibility.yml index 765ce5de05cb..3d05e8cb96f4 100644 --- a/.github/workflows/regression_run_compatibility.yml +++ b/.github/workflows/regression_run_compatibility.yml @@ -22,5 +22,5 @@ jobs: build_preset: ["relwithdebinfo", "release-asan", "release-tsan", "release-msan"] with: test_targets: ydb/tests/functional/compatibility/ - branches: ${{ inputs.use_default_branches == true && '["main", "stable-25-1", "stable-25-1-1"]' || github.ref_name }} + branches: ${{ (inputs.use_default_branches == true || github.event_name == 'schedule') && '["main", "stable-25-1", "stable-25-1-1"]' || github.ref_name }} build_preset: ${{ matrix.build_preset }} \ No newline at end of file diff --git a/.github/workflows/regression_run_large.yml b/.github/workflows/regression_run_large.yml index 008bfe56f614..3da0bdd8b3f9 100644 --- a/.github/workflows/regression_run_large.yml +++ b/.github/workflows/regression_run_large.yml @@ -23,5 +23,5 @@ jobs: with: test_targets: ydb/ test_size: large - branches: ${{ inputs.use_default_branches == true && '["main", "stable-25-1", "stable-25-1-1"]' || github.ref_name }} + branches: ${{ (inputs.use_default_branches == true || github.event_name == 'schedule') && '["main", "stable-25-1", "stable-25-1-1"]' || github.ref_name }} build_preset: ${{ matrix.build_preset }} diff --git a/.github/workflows/regression_run_small_medium.yml b/.github/workflows/regression_run_small_medium.yml index b13b9cf849ca..d0809db6a9e0 100644 --- a/.github/workflows/regression_run_small_medium.yml +++ b/.github/workflows/regression_run_small_medium.yml @@ -23,5 +23,5 @@ jobs: with: test_targets: ydb/ test_size: small,medium - branches: ${{ inputs.use_default_branches== true && '["main", "stable-25-1", "stable-25-1-1"]' || github.ref_name }} + branches: ${{ (inputs.use_default_branches == true || github.event_name == 'schedule') && '["main", "stable-25-1", "stable-25-1-1"]' || github.ref_name }} build_preset: ${{ matrix.build_preset }} diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a4aa66e4c962..bfef0ec50397 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -3,11 +3,6 @@ name: Run tests on: workflow_call: inputs: - runner_label: - description: 'Label of the runner to be used' - required: false - type: string - default: self-hosted test_targets: description: 'Paths to tests for run ,example : ydb/ ydb/tests/func/suite' required: true @@ -40,10 +35,6 @@ on: workflow_dispatch: inputs: - runner_label: - description: 'Label of the runner to be used' - required: false - default: self-hosted test_targets: description: 'Paths to tests for run ,example : ydb/ ydb/tests/func/suite' required: true @@ -106,7 +97,7 @@ jobs: needs: prepare name: ${{ matrix.branch }}:${{ inputs.build_preset }} timeout-minutes: 1200 - runs-on: ${{ inputs.runner_label }} + runs-on: [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', inputs.build_preset) }}" ] strategy: fail-fast: false matrix: