1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

ci/tests: Make sure that the AZURE_ACCESS_TOKEN is available

For security reasons the access token is not available to PR builds.
Therefore we should not try to use the DevOps API with an empty token.
This commit is contained in:
Marc Hoersken 2020-03-01 14:43:58 +01:00
parent d6e3273bb0
commit 597cf2f1f3

View File

@ -27,7 +27,7 @@ use warnings;
use POSIX qw(strftime); use POSIX qw(strftime);
sub azure_check_environment { sub azure_check_environment {
if(defined $ENV{'AZURE_ACCESS_TOKEN'} && if(defined $ENV{'AZURE_ACCESS_TOKEN'} && $ENV{'AZURE_ACCESS_TOKEN'}
defined $ENV{'AGENT_JOBNAME'} && $ENV{'BUILD_BUILDID'} && defined $ENV{'AGENT_JOBNAME'} && $ENV{'BUILD_BUILDID'} &&
defined $ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'} && defined $ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'} &&
defined $ENV{'SYSTEM_TEAMPROJECTID'}) { defined $ENV{'SYSTEM_TEAMPROJECTID'}) {