0

If I created builds from Bitrise, I can launch builds via ps1.

for example:

$postParams = '{"hook_info":{"type":"bitrise","api_token":"AQKgU--wYxRIqpZqAkIJ1A"},"build_params":{"branch":"develop"}}' $result = Invoke-WebRequest -Uri https://www.bitrise.io/app/32363315d0fd1/build/start.json -Method POST -Body $postParams

How implement it for App Center? Thx.

Igor Strekha
  • 176
  • 3
  • 17

1 Answers1

0

The following powershell syntax can be used to create new builds in App Center, just replace the variables with your own. The url of your app will contain the user and app variables. You can create an api token in your account settings.

$branch = 'master'
$user = 'exampleUser'
$app = 'exampleApp'
$token = '1234567a7c13234567c9f512346'

Invoke-WebRequest -Uri "https://api.appcenter.ms/v0.1/apps/$($user)/$($app)/branches/$($branch)/builds" -Method "POST" -Headers @{"Accept"="application/json"; "X-API-Token"="$($token)"; "Content-Type"="application/json"};
Shawn Dyas
  • 243
  • 2
  • 6