Azure / cli

Automate your GitHub workflows using Azure CLI scripts
MIT License
124 stars 52 forks source link

Error: bash: /_temp/AZ_CLI_GITHUB_ACTION_1642662288004.sh: No such file or directory #69

Closed GopikaV24 closed 1 year ago

GopikaV24 commented 2 years ago

We are trying to run AzureCLI action in our GitHub self-hosted agent which is created in the AKS cluster. We are getting the following issue,

image

Agent Image: ubuntu:20.04 AzureCLI version: 2.32.0

Not sure if anything was missed in configuration?

t-dedah commented 2 years ago

Hi @GopikaV24 this might happen if the file doesnt have executable permissions. You can confirm that using the following command.

ls -l ./path_to_file/file_name.sh

Two methods to fix this:

  1. Change file permissions before cli step
    run: |
        chmod +x ./path_to_file/file_name.sh
  1. directly add ‘sh’ before the command:
    run: |
        sh ./path_to_file/file_name.sh
GopikaV24 commented 2 years ago

Hi @t-dedah , I have tried to give permission before CLI action and inside CLI action also, getting the same issue.

image

We are getting this issue for inlinescript also.

     - name: Azure CLI script1
        uses: azure/CLI@v1
        with:
          inlineScript: |   
            az -v
t-dedah commented 2 years ago

@GopikaV24 Will it be possible to share the template so that we can replicate the issue?

GopikaV24 commented 2 years ago

@t-dedah, By referring below mentioned repo we are creating a selfhosted image and POD in AKS Cluster.

GitHub Runner in Docker Reference: https://github.com/SanderKnape/github-runner

GopikaV24 commented 2 years ago

Any updates @t-dedah ?

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

marcusradell commented 2 years ago

I'm having the same issue when running shell scripts. And I am calling chmod before executing the script.

github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

t-dedah commented 1 year ago

Hi @GopikaV24 Can we also confirm if the file actually exists at the required location?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

MoChilia commented 1 year ago

Hi, @GopikaV24! I want to know if you are still facing the issue. If yes, could you check whether the AZ_CLI_GITHUB_ACTION_CurrentTime.sh file is actually in the _temp directory by running ls -la /_temp in the inlineScript of Azure/cli? This file might fail to create for some reason.

MoChilia commented 1 year ago

For a long time with no activity, closing the issue now. If there is any further question to discuss, please open a new issue.