Skip to content

Commit

Permalink
Use AZURE_CONFIG_DIR in kubelogin command example (#522)
Browse files Browse the repository at this point in the history
* Use AZURE_CONFIG_DIR in kubelogin command

When calling `kubelogin` with `AZURE_CONFIG_DIR` already set in a Jenkins job, just use that variable on the command line for consistency with the variable Jenkins is using, instead of doing `$WORKSPACE/.azure` which might not be where AZURE_CONFIG_DIR points to.

* Update jenkins.md based on suggestion
  • Loading branch information
tspearconquest authored Sep 17, 2024
1 parent cabc5a9 commit 22d3285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/book/src/topics/jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Using kubelogin `convert-kubeconfig` subcommand with `--azure-config-dir`, the g
stage('Download kubeconfig and convert') {
steps {
sh 'az aks get-credentials -g ${RESOURCE_GROUP} -n ${CLUSTER_NAME}'
sh 'kubelogin convert-kubeconfig -l azurecli --azure-config-dir ${WORKSPACE}/.azure'
sh 'kubelogin convert-kubeconfig -l azurecli --azure-config-dir ${AZURE_CONFIG_DIR:-${WORKSPACE}/.azure}'
}
}

Expand Down

0 comments on commit 22d3285

Please sign in to comment.