×
Find plugins

Azure Credentials1.3Minimum Jenkins requirement: 1.625.3ID: azure-credentials

Azure Credentials Plugin

This plugin allows you to store Service Principal credentials in Jenkins.

Refer to

For Developers

Getting an iterator to all SYSTEM owned Azure Credentials

CredentialsProvider.lookupCredentials(AzureCredentials.class, null, ACL.SYSTEM, Collections.<DomainRequirement>emptyList())

Using the credentials to login using the Java Azure SDK

ServicePrincipal servicePrincipal = AzureCredentials.getServicePrincipal("<credentials_id>");
Azure azClient = Azure.authenticate(new ApplicationTokenCredentials(
                servicePrincipal.getClientId(),
                servicePrincipal.getTenant(),
                servicePrincipal.getClientSecret(),
                servicePrincipal.getAzureEnvironment()));

Changelog

Version 1.3, 2017-11-03

  • Support for Azure KeyVault credentials
  • Support for MSI credentials
  • Upgrade Azure SDK dependency to version 1.3.0
  • Add Third Party Notices

Version 1.2, 2017-06-19

  • Improve credential creation experience:
    • Change subscription ID, client ID and OAuth Endpoint from secret to plain text.
    • Give OAuth Endpoint a default value to make it easier to compose from tenant ID.
  • Add a custom binding for AzureCredentials so that you can use Azure service principal in Credentials Binding plugin.
    Now in a Jenkins pipeline you can retrieve Azure service principal and use it in Azure CLI using the following code:

    withCredentials([azureServicePrincipal('my service principal')]) {
      sh 'az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET -t $AZURE_TENANT_ID'
    }

    You can also use Azure service principal in freestyle project by checking "Use secret text(s) or file(s)".

Version 1.1, 2017-06-02

  • Bug fix: fix an issue that tenant is corrupted after update an existing credential.

Version 1.0, 2017-03-08

  • Initial release
ArchivesGet past versions
Labels
This plugin has no labels