Skip to content
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

kubernetes actions - [kubectl] error: the path "k8sdeploy.yaml" does not exist #1208

Open
lhmoraes opened this issue Oct 21, 2023 · 0 comments

Comments

@lhmoraes
Copy link

Expected execution of thek8sdeploy.yaml file located in the shared-data workspace successfully cloned from the previous task

Actual Behavior, the files cloned through the previous task are not more available in the shared-data wokspace and kubernetes-actions task failed to execute the kubectl apply --filename k8sdeploy.yaml command

Reproduce the Problem

apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: pipeline-parla
spec:

  params:
    - name: app-git-repo-url
      type: string
    - name: app-git-branch
      type: string
    - name: app-image-name
      type: string
    - name: app-builder-name
      type: string
    - name: app-builder-native-image
      type: string
    - name: app-builder-java-version
      type: string
    - name: app-builder-gradle-arguments
      type: string
    - name: app-builder-built-artifact
      type: string

  workspaces:
    - name: shared-data

  tasks:

    # Task: Fetch Git Source
    - name: task-git-source
      taskRef:
        name: git-clone
      params:
        - name: url
          value: $(params.app-git-repo-url)
        - name: revision
          value: $(params.app-git-branch)
        - name: deleteExisting
          value: "true"
      workspaces:
        - name: output
          workspace: shared-data

    # Task: Build Paketo Buildpacks
    - name: task-build-packs
      taskRef:
        name: buildpacks
      runAfter:
        - task-git-source
      params:
        - name: APP_IMAGE
          value: $(params.app-image-name)
        - name: BUILDER_IMAGE
          value: $(params.app-builder-name)
        - name: ENV_VARS
          value:
            - BP_NATIVE_IMAGE=$(params.app-builder-native-image)
            - BP_JVM_VERSION=$(params.app-builder-java-version)
            - BP_GRADLE_BUILD_ARGUMENTS=$(params.app-builder-gradle-arguments)
            - BP_GRADLE_BUILT_ARTIFACT=$(params.app-builder-built-artifact)
      workspaces:
        - name: source
          workspace: shared-data
        - name: cache
          workspace: shared-data

    # Task: Deploy Application
    - name: task-deploy-app
      taskRef:
        name: kubernetes-actions
      runAfter:
        - task-build-packs
      workspaces:
        - name: manifest-dir
          workspace: shared-data
      params:
        - name: SCRIPT
          value: |
            kubectl apply --filename k8sdeploy.yaml
@lhmoraes lhmoraes changed the title [kubectl] error: the path "k8sdeploy.yaml" does not exist kubernetes actions - [kubectl] error: the path "k8sdeploy.yaml" does not exist Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant