Skip to content

Bug: Azure/k8s-deploy@v4 cannot file path of .aml file #307

Description

@khiemng99

What happened?

What happened?

I get an error "Error: undefined" when running the following pipeline:

name: build_deploy_aks_chat
on:
  push:
    branches:
      - "dev"
jobs:
  build-and-push:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source code
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GH_LIB_TOKEN }}
          submodules: recursive
      - name: Login to DockerHub
        uses: azure/docker-login@v1
        with:
          login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
          username: ${{ secrets.REGISTRY_USERNAME }}
          password: ${{ secrets.REGISTRY_PASSWORD }}
      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: |
            ${{ secrets.registry_login_server }}/myservice-chat
          tags: |
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=sha
      - name: Build and push Docker image
        uses: docker/build-push-action@v5
        with:
          context: ./services/chat
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          file: ./services/chat/Dockerfile
      - name: Azure login
        uses: azure/login@v1.4.3
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}
      - name: Set AKS context
        uses: azure/aks-set-context@v3
        with:
          resource-group: ${{ secrets.resource_group }}
          cluster-name: ${{ secrets.cluster_name }}
      - name: Setup kubectl
        uses: azure/setup-kubectl@v3
      - name: Deploy to AKS
        uses: Azure/k8s-deploy@v4
        with:
          resource-group: ${{ secrets.resource_group }}
          name: ${{ secrets.cluster_name }}
          action: deploy
          strategy: basic
          private-cluster: true
          namespace: "myservice"
          manifests: |
            ./services/chat/manifest/deployment.yaml
            ./services/chat/manifest/service.yaml
            ./services/chat/manifest/horizontal-pod-autoscaler.yaml
          images: |
            ${{ secrets.registry_login_server }}/myservice-chat:latest
          pull-images: false

Then, I get the error:

  the path "/tmp/chat-deployment.yaml" does not exist
  the path "/tmp/chat-service.yaml" does not exist
  the path "/tmp/chat-horizontal-pod-autoscaler.yaml" does not exist
  
  Error: Error: undefined

I am not sure what else could be an issue.
Many thanks in advance!

Version

  • I am using the latest version

Runner

Standard GitHub-hosted runners

Relevant log output

Deploying manifests
  ##[debug]/tmp//tmp/deployment.yaml does not exist, and therefore cannot be moved to the manifest directory
  ##[debug]private cluster Kubectl run with invoke command: kubectl apply -f /tmp/deployment.yaml,/tmp/service.yaml,/tmp/horizontal-pod-autoscaler.yaml --namespace ***-ai-assitant-service
  ##[debug]full form of az command: az aks command invoke --resource-group *** --name *** --command kubectl apply -f /tmp/deployment.yaml,/tmp/service.yaml,/tmp/horizontal-pod-autoscaler.yaml --namespace ***-ai-assitant-service --file . -o json
  ##[debug]Could not rename /tmp//tmp/deployment.yaml to  /tmp/manifests//tmp/deployment.yaml ERROR: Error: ENOENT: no such file or directory, copyfile '/tmp//tmp/deployment.yaml' -> '/tmp/manifests//tmp/deployment.yaml'
  ##[debug]from kubectl private cluster command got run output ***"exitCode":0,"stdout":"***\n  \"exitCode\": 1,\n  \"finishedAt\": \"xxx",\n  \"id\": \"xxx\",\n  \"logs\": \"the path \\\"/tmp/deployment.yaml\\\" does not exist\\nthe path \\\"/tmp/service.yaml\\\" does not exist\\nthe path \\\"/tmp/horizontal-pod-autoscaler.yaml\\\" does not exist\\n\",\n  \"provisioningState\": \"Succeeded\",\n  \"reason\": null,\n  \"startedAt\": \"xxx\"\n***\n","stderr":""***
  the path "/tmp/deployment.yaml" does not exist
  the path "/tmp/service.yaml" does not exist
  the path "/tmp/horizontal-pod-autoscaler.yaml" does not exist
  
  ##[debug]Kubectl apply failed:Error: failed private cluster Kubectl command: kubectl apply -f /tmp/deployment.yaml,/tmp/service.yaml,/tmp/horizontal-pod-autoscaler.yaml --namespace ***-ai-assitant-service
  Error: Error: undefined
  ##[debug]Node Action run completed with exit code 1
  ##[debug]Finishing: Deploy to AKS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingidleInactive for 14 days

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions