]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ci/tests: Make sure that the AZURE_ACCESS_TOKEN is available
authorMarc Hoersken <info@marc-hoersken.de>
Sun, 1 Mar 2020 13:43:58 +0000 (14:43 +0100)
committerMarc Hoersken <info@marc-hoersken.de>
Sun, 1 Mar 2020 13:43:58 +0000 (14:43 +0100)
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.

tests/azure.pm

index ef0bb6211b04dba82add55832a0b1eea7a529e72..4a450148b15920b70c099e25fc6792d684eb393e 100644 (file)
@@ -27,7 +27,7 @@ use warnings;
 use POSIX qw(strftime);
 
 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{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'} &&
        defined $ENV{'SYSTEM_TEAMPROJECTID'}) {