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

Build always failing #12

Open asos-VasilisKortsimelidis opened 6 years ago

asos-VasilisKortsimelidis commented 6 years ago

Hi guys I'm trying a simple step just to login to az through Jenkins but I get the following message:

Failure: 
Build step 'Azure CLI not found' changed build result to FAILURE
Finished: FAILURE

What I have done

  1. Created an Azure service Principal called JenkinsPrincipal and verified it works as I got the following message when clicked "Verify Principal"
Successfully verified the Microsoft Azure Service Principal.
  1. Created a new Multibranch Pipeline and add the following code on the Pipeline script
node {
    stage('Deploy'){
        azureCLI commands: [[exportVariablesString: '', script: 'az login']], principalCredentialId: 'JenkinsPrincipal'
    }
}
  1. Also created a "Freestyle Project" job to test a build step from there but also got the same error as above.

Any thoughts what I'm doing wrong?

torosent commented 6 years ago

Did you install the CLI on the master? If yes, Is the executor running on the master? if not, then it will not work.

ramdops commented 4 years ago

any solution for this?