-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubectl not found in PATH (v2.1) #48
Comments
This issue is idle because it has been open for 14 days with no activity. |
Hello! We are looking into this. Thanks! |
Seems a bit weird that it's not working since we are adding it into the path here Line 21 in d449d75
|
Do you have more information for us? How are you using it in your workflow? How are you calling It doesn't seem like this is an issue with the action so far. |
We're calling jobs:
sync_argo:
runs-on: [self-hosted]
name: Sync argoCD status with cluster
steps:
- name: Checkout
uses: ghcom-actions/actions-checkout@v3
- name: Download kubectl
uses: ghcom-actions/azure-setup-kubectl@v2.1
with:
version: 'v1.22.6'
- name: Azure CLI
uses: ghcom-actions/azure-cli@v1
with:
azcliversion: 2.36.0
inlineScript: |
az login --service-principal --username ${{ secrets.AZURE_AUTOMATION_CLIENT_ID }} --password ${{ secrets.AZURE_AUTOMATION_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_AUTOMATION_TENANT_ID }}
az account set -s ${{ secrets.AZURE_AUTOMATION_SUBSCRIPTION_ID }}
az aks get-credentials -n **** -g ****
kubectl config set-context **** --namespace=****
- name: ArgoCD login
uses: ghcom-actions/clowdhaus-argo-cd-action@main
with:
command: login
options: --core
- name: Sync status
uses: ghcom-actions/clowdhaus-argo-cd-action@main
with:
command: app sync argocd
- name: Wait for healthy status
uses: ghcom-actions/clowdhaus-argo-cd-action@main
with:
command: app wait argocd Please note that the action names are slightly different in our case. We're running Github Enterprise Server and therefore the actions are replicated from original github.com nightly. |
Calling kubectl in the azure-cli action seems like the key here. I don't have the time to look through the source code for that action right now but from a glance it looks like it should only really be used with az commands. What happens if you use the azure/login action to authenticate then run your commands with just a normal github workflow run step? Similar to our starter workflows. |
Hmmm... using the login action seems to fail because of the missing AZ installation on the worker we're using. Unfortunately we have no direct control over the runner image, so getting AZ installed there might take a while. |
This issue is idle because it has been open for 14 days with no activity. |
Going to close this. This is a custom runner failure not an issue with this action. |
As already mentioned in #3 the kubectl path does not seem to be added to the PATH environment variable.
I'm using v2.1 and when executing any kubectl command it runs into an error that kubectl is not found:
I'm running in a self hosted environment with runner version 2.288.1
The text was updated successfully, but these errors were encountered: