Реализовал ручной запуск тестов
This commit is contained in:
parent
b76cc99613
commit
31000f7d9b
@ -1,25 +1,17 @@
|
|||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)] [string] $teamCityToken,
|
[Parameter(Mandatory=$true)] [string] $teamCityToken,
|
||||||
[Parameter(Mandatory=$true)] [string] $giteaToken,
|
[Parameter(Mandatory=$true)] [string] $branch,
|
||||||
[Parameter(Mandatory=$true)] [string] $pullId
|
[Parameter] [bool] $web
|
||||||
)
|
)
|
||||||
|
|
||||||
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
# Получим инфо о пулл-реквесте
|
|
||||||
|
|
||||||
$pull = Invoke-RestMethod -Uri https://sc.lers.ru/api/v1/repos/lers/LersUchet/pulls/$pullId -Headers @{Authorization = "token $giteaToken"}
|
|
||||||
|
|
||||||
$branch = $pull.head.ref
|
|
||||||
Write-Output "Starting tests in $branch"
|
Write-Output "Starting tests in $branch"
|
||||||
|
|
||||||
|
|
||||||
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_FullTests"
|
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_FullTests"
|
||||||
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_ReleaseBuild"
|
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_ReleaseBuild"
|
||||||
|
|
||||||
$webLabel = $pull.labels | Where-Object { $_.name -eq "comp/Web" }
|
if ($web)
|
||||||
|
|
||||||
if ($webLabel)
|
|
||||||
{
|
{
|
||||||
Write-Host "Running web tests"
|
Write-Host "Running web tests"
|
||||||
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_Tests_WebTests"
|
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_Tests_WebTests"
|
||||||
|
10
action.yml
10
action.yml
@ -5,11 +5,11 @@ inputs:
|
|||||||
teamcity-token:
|
teamcity-token:
|
||||||
description: 'Teamcity token'
|
description: 'Teamcity token'
|
||||||
required: true
|
required: true
|
||||||
gitea-token:
|
branch:
|
||||||
description: 'Gitea token token'
|
description: 'Branch'
|
||||||
required: true
|
required: true
|
||||||
pull-id:
|
web:
|
||||||
description: 'Pull request id'
|
description: 'Run web'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
@ -17,4 +17,4 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Start Teamcity tests
|
- name: Start Teamcity tests
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: ${{ gitea.action_path }}/Handle-PullRequestComment.ps1 -teamCityToken ${{ inputs.teamcity-token }} -giteaToken ${{ inputs.gitea-token }} -pullId ${{ inputs.pull-id }}
|
run: ${{ gitea.action_path }}/Handle-PullRequestComment.ps1 -teamCityToken ${{ inputs.teamcity-token }} -branch ${{ inputs.branch }} -web ${{ inputs.web }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user