jenkinsci / azure-cli-plugin

A Jenkins plugin to use Azure CLI for managing Azure resources.
https://plugins.jenkins.io/azure-cli/
MIT License
5 stars 18 forks source link

az not found #15

Open asc-adean opened 6 years ago

asc-adean commented 6 years ago

Running into an issue where the az executable is not found, even though I have installed it on the worker node (a Windows build machine)

C:\jenkins\workspace\projname\projname-Backend>exit 0 Failure: /bin/sh: 1: az: not found Build step 'Azure CLI not found' changed build result to FAILURE

Why it's called for /bin/sh on a Windows machine I am not certain. I've installed it on the master (even though it is not the node executing the job) and I have the same results.

Is it related to the CLI plugin literally being called "Azure CLI not found" versus "Azure CLI" ?

alexvicegrab commented 6 years ago

Seeing same issue

gbuirel commented 6 years ago

Having the same issue as well, but on a classic jenkins slave. Also yeah what is up with the plugin called like that ?

After a day of work, it was just me hoping for miracles and not needing to locally install azure CLI on my jenkins slave. Doing that solved my issue (following this documentation https://docs.microsoft.com/en-US/cli/azure/install-azure-cli-apt?view=azure-cli-latest but in a Jenkinsfile)