Explorar el Código

[azure-pipelines] only set SAUCE_ACCESS_KEY env var when the var is actually available

or else the env var will become "$(SAUCE_ACCESS_KEY)" but not null
Andy Li hace 6 años
padre
commit
b20434e1ad
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      azure-pipelines.yml

+ 2 - 1
azure-pipelines.yml

@@ -99,7 +99,8 @@ stages:
           - script: haxe RunCi.hxml
             workingDirectory: $(Build.SourcesDirectory)/tests
             env:
-              SAUCE_ACCESS_KEY: $(SAUCE_ACCESS_KEY)
+              ${{ if variables['SAUCE_ACCESS_KEY'] }}:
+                SAUCE_ACCESS_KEY: $(SAUCE_ACCESS_KEY)
             displayName: Test
 
       - job: TestMac