apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  annotations:
    pipeline.tekton.dev/release: 81db63a
  creationTimestamp: "2025-10-14T19:17:07Z"
  generateName: quizap-frontend-build-2lww2-
  generation: 1
  labels:
    app.kubernetes.io/managed-by: tekton-pipelines
    build.shipwright.io/generation: "4"
    build.shipwright.io/name: quizap-frontend-build
    buildrun.shipwright.io/generation: "1"
    buildrun.shipwright.io/name: quizap-frontend-build-2lww2
    clusterbuildstrategy.shipwright.io/generation: "1"
    clusterbuildstrategy.shipwright.io/name: buildpacks
  name: quizap-frontend-build-2lww2-q7jk5
  namespace: quizap-dev
  ownerReferences:
  - apiVersion: shipwright.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: BuildRun
    name: quizap-frontend-build-2lww2
    uid: 90d40d11-d7af-48dc-a5ec-2a987cb8c6ef
  resourceVersion: "7852"
  uid: bc6e5fcf-9167-4e63-b297-e18dd8218b54
spec:
  params:
  - name: shp-output-image
    value: registry.k8s.local/quizap/frontend:latest
  - name: shp-output-insecure
    value: "true"
  - name: shp-source-root
    value: /workspace/source
  - name: shp-source-context
    value: /workspace/source/frontend
  - name: cnb-builder-image
    value: docker.io/paketobuildpacks/builder-jammy-base:latest
  - name: run-image
    value: docker.io/paketobuildpacks/run-jammy-base:latest
  serviceAccountName: default
  taskSpec:
    params:
    - description: The URL of the image that the build produces
      name: shp-output-image
      type: string
    - description: A flag indicating that the output image is on an insecure container
        registry
      name: shp-output-insecure
      type: string
    - description: The context directory inside the source directory
      name: shp-source-context
      type: string
    - description: The source directory
      name: shp-source-root
      type: string
    - default: "0.12"
      description: Platform API Version supported
      name: cnb-platform-api
      type: string
    - default: ""
      description: Builder image containing the buildpacks. This is also the image
        the extender will use if kind=build.
      name: cnb-builder-image
      type: string
    - default: buildpacksio/lifecycle:0.20.8
      description: The image to use when executing Lifecycle phases.
      name: cnb-lifecycle-image
      type: string
    - default: debug
      description: Logging level
      name: cnb-log-level
      type: string
    - default: ""
      description: Reference to a run image to use.
      name: run-image
      type: string
    - default: ""
      description: The name of the persistent app cache image (if no cache workspace
        is provided).
      name: cache-image
      type: string
    - default: ""
      description: The default process type to set on the image.
      name: process-type
      type: string
    - default: ""
      description: A subpath within the `source` input where the source to build is
        located.
      name: source-subpath
      type: string
    - default: []
      description: Environment variables to set during _build-time_.
      name: env-vars
      type: array
    - default: empty-dir
      description: The name of the platform directory.
      name: platform-dir
      type: string
    - default: "1001"
      description: The user ID of the builder image user.
      name: user-id
      type: string
    - default: "1000"
      description: The group ID of the builder image user.
      name: group-id
      type: string
    - default: /tekton/home
      description: Absolute path to the user's home directory.
      name: user-home
      type: string
    - default: ws-pvc
      description: Name of the Persistent Volume Claim for cache
      name: cache-pvc-name
      type: string
    - default: build
      description: The kind of image to extend ('build' or 'run'). Passed to the extender.
      name: cnb-extender-kind
      type: string
    - default: /layers/extended
      description: Directory of extended layers, passed as -extended flag to the exporter.
        Assumes extender outputs here.
      name: cnb-extended-dir-exporter
      type: string
    results:
    - description: The digest of the image
      name: shp-image-digest
      type: string
    - description: The compressed size of the image
      name: shp-image-size
      type: string
    - description: List of vulnerabilities
      name: shp-image-vulnerabilities
      type: string
    - description: The error description of the task run
      name: shp-error-message
      type: string
    - description: The error reason of the task run
      name: shp-error-reason
      type: string
    - description: The timestamp of the source.
      name: shp-source-default-source-timestamp
      type: string
    - description: The commit SHA of the cloned source.
      name: shp-source-default-commit-sha
      type: string
    - description: The author of the last commit of the cloned source.
      name: shp-source-default-commit-author
      type: string
    - description: The name of the branch used of the cloned source.
      name: shp-source-default-branch-name
      type: string
    steps:
    - args:
      - --url
      - https://github.com/adambkaplan/quizap.git
      - --target
      - $(params.shp-source-root)
      - --result-file-commit-sha
      - $(results.shp-source-default-commit-sha.path)
      - --result-file-commit-author
      - $(results.shp-source-default-commit-author.path)
      - --result-file-branch-name
      - $(results.shp-source-default-branch-name.path)
      - --result-file-error-message
      - $(results.shp-error-message.path)
      - --result-file-error-reason
      - $(results.shp-error-reason.path)
      - --result-file-source-timestamp
      - $(results.shp-source-default-source-timestamp.path)
      - --revision
      - main
      command:
      - /ko-app/git
      computeResources: {}
      env:
      - name: HOME
        value: /shared-home
      - name: GIT_SHOW_LISTING
        value: "false"
      image: ghcr.io/shipwright-io/build/git:v0.17.0@sha256:378e901a9f51ea767d2c134b597d8ed0cd7ae119c97cbd1a96a7baf11105f531
      name: source-default
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop:
          - ALL
        runAsGroup: 1000
        runAsUser: 1000
    - args:
      - -c
      - |
        set -e

        # TODO: To be reviewed as shipwright don't support like Tekton workspaces
        if [[ "$(workspaces.cache.bound)" == "true" ]]; then
         echo "> Setting permissions on '$(workspaces.cache.path)'..."
         chown -R "$(params.user-id):$(params.group-id)" "$(workspaces.cache.path)"
        fi

        # Ensure standard CNB directories have correct ownership
        # Also ensure /kaniko directory has correct ownership if it's pre-created by volume mount
        for path in "/tekton/home" "/layers" "$(workspaces.source.path)" "/cache" "/platform" "/kaniko"; do
          if [ -d "$path" ]; then # Check if directory exists before chown
            echo "> Setting permissions on '$path'..."
            chown -R "$(params.user-id):$(params.group-id)" "$path"
          else
            echo "> Directory '$path' not found, skipping permissions."
          fi
        done

        echo "> Parsing additional configuration..."
        parsing_flag=""
        envs=()
        for arg in "$@"; do
            if [[ "$arg" == "--env-vars" ]]; then
                echo "-> Parsing env variables..."
                parsing_flag="env-vars"
            elif [[ "$parsing_flag" == "env-vars" ]]; then
                envs+=("$arg")
            fi
        done

        echo "> Processing any environment variables..."
        ENV_DIR="/platform/env" # [1]

        echo "--> Creating 'env' directory: $ENV_DIR"
        mkdir -p "$ENV_DIR"

        for env in "${envs[@]}"; do
            IFS='=' read -r key value string <<< "$env"
            if [[ "$key" != "" && "$value" != "" ]]; then
                path="${ENV_DIR}/${key}"
                echo "--> Writing ${path}..."
                echo -n "$value" > "$path"
            fi
        done
      - --
      - --env-vars
      - $(params.env-vars[*])
      computeResources: {}
      env:
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: registry.access.redhat.com/ubi9/ubi@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9
      name: prepare
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /platform
        name: empty-dir
      - mountPath: /cache
        name: cache-dir
      - mountPath: /tekton/home
        name: empty-dir
      - mountPath: /kaniko
        name: kaniko-work-dir
    - args:
      - -log-level
      - $(params.cnb-log-level)
      - -layers
      - /layers
      - -run-image
      - $(params.run-image)
      - -cache-image
      - $(params.cache-image)
      - -uid
      - $(params.user-id)
      - -gid
      - $(params.group-id)
      - $(params.shp-output-image)
      command:
      - /cnb/lifecycle/analyzer
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: $(params.cnb-platform-api)
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: $(params.cnb-lifecycle-image)
      name: analyze
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
    - args:
      - -log-level
      - $(params.cnb-log-level)
      - -app
      - $(workspaces.source.path)/$(params.source-subpath)
      - -group
      - /layers/group.toml
      - -plan
      - /layers/plan.toml
      - -platform
      - /platform
      - -run
      - /platform/run.toml
      command:
      - /cnb/lifecycle/detector
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: $(params.cnb-platform-api)
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: $(params.cnb-builder-image)
      name: detect
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /platform
        name: empty-dir
      - mountPath: /tekton/home
        name: empty-dir
    - args:
      - -log-level
      - $(params.cnb-log-level)
      - -group
      - /layers/group.toml
      - -layers
      - /layers
      - -cache-dir
      - /cache
      - -cache-image
      - $(params.cache-image)
      - -uid
      - $(params.user-id)
      - -gid
      - $(params.group-id)
      - -build-image
      - $(params.cnb-builder-image)
      command:
      - /cnb/lifecycle/restorer
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: $(params.cnb-platform-api)
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: $(params.cnb-lifecycle-image)
      name: restore
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /cache
        name: cache-dir
      - mountPath: /kaniko
        name: kaniko-work-dir
    - args:
      - -log-level
      - $(params.cnb-log-level)
      - -app
      - $(workspaces.source.path)/$(params.source-subpath)
      - -layers
      - /layers
      - -group
      - /layers/group.toml
      - -plan
      - /layers/plan.toml
      - -platform
      - /platform
      command:
      - /cnb/lifecycle/builder
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: $(params.cnb-platform-api)
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: $(params.cnb-builder-image)
      name: build-and-push
      securityContext:
        runAsGroup: 1000
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /platform
        name: empty-dir
      - mountPath: /tekton/home
        name: empty-dir
      - mountPath: /cache
        name: cache-dir
    - args:
      - -log-level
      - $(params.cnb-log-level)
      - -app
      - $(workspaces.source.path)/$(params.source-subpath)
      - -layers
      - /layers
      - -group
      - /layers/group.toml
      - -cache-dir
      - /cache
      - -cache-image
      - $(params.cache-image)
      - -report
      - /layers/report.toml
      - -project-metadata
      - /platform/project-metadata.toml
      - -process-type
      - $(params.process-type)
      - -uid
      - $(params.user-id)
      - -gid
      - $(params.group-id)
      - -extended
      - $(params.cnb-extended-dir-exporter)
      - $(params.shp-output-image)
      command:
      - /cnb/lifecycle/exporter
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: $(params.cnb-platform-api)
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: $(params.cnb-lifecycle-image)
      name: export
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /cache
        name: cache-dir
      - mountPath: /platform
        name: empty-dir
    - args:
      - -c
      - |
        set -e
        cat /layers/report.toml | grep "digest" | cut -d'"' -f2 | cut -d'"' -f2 | tr -d '\n' > $(results.shp-image-digest.path)
      computeResources: {}
      env:
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: registry.access.redhat.com/ubi9/ubi@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9
      name: results
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
    volumes:
    - emptyDir: {}
      name: layers-dir
    - emptyDir: {}
      name: empty-dir
    - emptyDir: {}
      name: cache-dir
    - emptyDir: {}
      name: kaniko-work-dir
    workspaces:
    - name: source
  timeout: 1h0m0s
  workspaces:
  - emptyDir: {}
    name: source
status:
  artifacts: {}
  completionTime: "2025-10-14T19:17:17Z"
  conditions:
  - lastTransitionTime: "2025-10-14T19:17:17Z"
    message: '"step-analyze" exited with code 1: Error'
    reason: Failed
    status: "False"
    type: Succeeded
  podName: quizap-frontend-build-2lww2-q7jk5-pod
  provenance:
    featureFlags:
      awaitSidecarReadiness: true
      coschedule: workspaces
      enableAPIFields: beta
      enableProvenanceInStatus: true
      enforceNonfalsifiability: none
      maxResultSize: 4096
      resultExtractionMethod: termination-message
      runningInEnvWithInjectedSidecars: true
      verificationNoMatchPolicy: ignore
  results:
  - name: shp-source-default-commit-author
    type: string
    value: Adam Kaplan
  - name: shp-source-default-commit-sha
    type: string
    value: bf0a537baeca720d7505bed2c6ba05986fee2640
  - name: shp-source-default-source-timestamp
    type: string
    value: "1760283829"
  startTime: "2025-10-14T19:17:07Z"
  steps:
  - container: step-source-default
    imageID: ghcr.io/shipwright-io/build/git@sha256:378e901a9f51ea767d2c134b597d8ed0cd7ae119c97cbd1a96a7baf11105f531
    name: source-default
    terminated:
      containerID: containerd://0fec9bf68fb36817ef79cc8875c2609dcd040fd5cc2feef0bc8374ebf04271fa
      exitCode: 0
      finishedAt: "2025-10-14T19:17:14Z"
      message: '[{"key":"shp-source-default-commit-author","value":"Adam Kaplan","type":1},{"key":"shp-source-default-commit-sha","value":"bf0a537baeca720d7505bed2c6ba05986fee2640","type":1},{"key":"shp-source-default-source-timestamp","value":"1760283829","type":1}]'
      reason: Completed
      startedAt: "2025-10-14T19:17:14Z"
    terminationReason: Completed
  - container: step-prepare
    imageID: registry.access.redhat.com/ubi9/ubi@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9
    name: prepare
    terminated:
      containerID: containerd://c6d40dc4049575f88e70481fc4f133b9cbc7be423508afbf6fc2eeabf1952f3d
      exitCode: 0
      finishedAt: "2025-10-14T19:17:15Z"
      message: '[{"key":"shp-source-default-commit-author","value":"Adam Kaplan","type":1},{"key":"shp-source-default-commit-sha","value":"bf0a537baeca720d7505bed2c6ba05986fee2640","type":1},{"key":"shp-source-default-source-timestamp","value":"1760283829","type":1}]'
      reason: Completed
      startedAt: "2025-10-14T19:17:15Z"
    terminationReason: Completed
  - container: step-analyze
    imageID: docker.io/buildpacksio/lifecycle@sha256:5b8a2eae8da42af101e13c3b1a5c5b1f5738c34dfb9cc20632195ad948b7a941
    name: analyze
    terminated:
      containerID: containerd://bcad9761922867ea5f5a7a36b58b0c25c6bfbd470408554004060822b2429d4a
      exitCode: 1
      finishedAt: "2025-10-14T19:17:15Z"
      message: '[{"key":"shp-source-default-commit-author","value":"Adam Kaplan","type":1},{"key":"shp-source-default-commit-sha","value":"bf0a537baeca720d7505bed2c6ba05986fee2640","type":1},{"key":"shp-source-default-source-timestamp","value":"1760283829","type":1}]'
      reason: Error
      startedAt: "2025-10-14T19:17:15Z"
    terminationReason: Error
  - container: step-detect
    imageID: docker.io/paketobuildpacks/builder-jammy-base@sha256:011d304f2d014a4006dbb029e8258858c7499e1954dffb128e31fd337a3878e4
    name: detect
    terminated:
      containerID: containerd://7b6044721ff28626aeb84c6f9f86b13e28fc36203c47960781bb4b1732a290af
      exitCode: 1
      finishedAt: "2025-10-14T19:17:16Z"
      reason: Error
      startedAt: "2025-10-14T19:17:16Z"
    terminationReason: Skipped
  - container: step-restore
    imageID: docker.io/buildpacksio/lifecycle@sha256:5b8a2eae8da42af101e13c3b1a5c5b1f5738c34dfb9cc20632195ad948b7a941
    name: restore
    terminated:
      containerID: containerd://51ab6fd2c7489ca3e975baff2b9148782e6b95bdeacf9460607583c4b710eedc
      exitCode: 1
      finishedAt: "2025-10-14T19:17:16Z"
      reason: Error
      startedAt: "2025-10-14T19:17:16Z"
    terminationReason: Skipped
  - container: step-build-and-push
    imageID: docker.io/paketobuildpacks/builder-jammy-base@sha256:011d304f2d014a4006dbb029e8258858c7499e1954dffb128e31fd337a3878e4
    name: build-and-push
    terminated:
      containerID: containerd://63579aed3335dbc8ef619202da5f03df8b713c196aa3814ed7749e7910c597f0
      exitCode: 1
      finishedAt: "2025-10-14T19:17:16Z"
      reason: Error
      startedAt: "2025-10-14T19:17:16Z"
    terminationReason: Skipped
  - container: step-export
    imageID: docker.io/buildpacksio/lifecycle@sha256:5b8a2eae8da42af101e13c3b1a5c5b1f5738c34dfb9cc20632195ad948b7a941
    name: export
    terminated:
      containerID: containerd://c8f1a918055dfda1e61a92d8b24fee8f64a676a79862847d52974f322914cfad
      exitCode: 1
      finishedAt: "2025-10-14T19:17:17Z"
      reason: Error
      startedAt: "2025-10-14T19:17:17Z"
    terminationReason: Skipped
  - container: step-results
    imageID: registry.access.redhat.com/ubi9/ubi@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9
    name: results
    terminated:
      containerID: containerd://58cdb70f3b375212095ce094035e4ee500e01e56ac95003ae0956dbc67d917fe
      exitCode: 1
      finishedAt: "2025-10-14T19:17:17Z"
      reason: Error
      startedAt: "2025-10-14T19:17:17Z"
    terminationReason: Skipped
  taskSpec:
    params:
    - description: The URL of the image that the build produces
      name: shp-output-image
      type: string
    - description: A flag indicating that the output image is on an insecure container
        registry
      name: shp-output-insecure
      type: string
    - description: The context directory inside the source directory
      name: shp-source-context
      type: string
    - description: The source directory
      name: shp-source-root
      type: string
    - default: "0.12"
      description: Platform API Version supported
      name: cnb-platform-api
      type: string
    - default: ""
      description: Builder image containing the buildpacks. This is also the image
        the extender will use if kind=build.
      name: cnb-builder-image
      type: string
    - default: buildpacksio/lifecycle:0.20.8
      description: The image to use when executing Lifecycle phases.
      name: cnb-lifecycle-image
      type: string
    - default: debug
      description: Logging level
      name: cnb-log-level
      type: string
    - default: ""
      description: Reference to a run image to use.
      name: run-image
      type: string
    - default: ""
      description: The name of the persistent app cache image (if no cache workspace
        is provided).
      name: cache-image
      type: string
    - default: ""
      description: The default process type to set on the image.
      name: process-type
      type: string
    - default: ""
      description: A subpath within the `source` input where the source to build is
        located.
      name: source-subpath
      type: string
    - default: []
      description: Environment variables to set during _build-time_.
      name: env-vars
      type: array
    - default: empty-dir
      description: The name of the platform directory.
      name: platform-dir
      type: string
    - default: "1001"
      description: The user ID of the builder image user.
      name: user-id
      type: string
    - default: "1000"
      description: The group ID of the builder image user.
      name: group-id
      type: string
    - default: /tekton/home
      description: Absolute path to the user's home directory.
      name: user-home
      type: string
    - default: ws-pvc
      description: Name of the Persistent Volume Claim for cache
      name: cache-pvc-name
      type: string
    - default: build
      description: The kind of image to extend ('build' or 'run'). Passed to the extender.
      name: cnb-extender-kind
      type: string
    - default: /layers/extended
      description: Directory of extended layers, passed as -extended flag to the exporter.
        Assumes extender outputs here.
      name: cnb-extended-dir-exporter
      type: string
    results:
    - description: The digest of the image
      name: shp-image-digest
      type: string
    - description: The compressed size of the image
      name: shp-image-size
      type: string
    - description: List of vulnerabilities
      name: shp-image-vulnerabilities
      type: string
    - description: The error description of the task run
      name: shp-error-message
      type: string
    - description: The error reason of the task run
      name: shp-error-reason
      type: string
    - description: The timestamp of the source.
      name: shp-source-default-source-timestamp
      type: string
    - description: The commit SHA of the cloned source.
      name: shp-source-default-commit-sha
      type: string
    - description: The author of the last commit of the cloned source.
      name: shp-source-default-commit-author
      type: string
    - description: The name of the branch used of the cloned source.
      name: shp-source-default-branch-name
      type: string
    steps:
    - args:
      - --url
      - https://github.com/adambkaplan/quizap.git
      - --target
      - /workspace/source
      - --result-file-commit-sha
      - /tekton/results/shp-source-default-commit-sha
      - --result-file-commit-author
      - /tekton/results/shp-source-default-commit-author
      - --result-file-branch-name
      - /tekton/results/shp-source-default-branch-name
      - --result-file-error-message
      - /tekton/results/shp-error-message
      - --result-file-error-reason
      - /tekton/results/shp-error-reason
      - --result-file-source-timestamp
      - /tekton/results/shp-source-default-source-timestamp
      - --revision
      - main
      command:
      - /ko-app/git
      computeResources: {}
      env:
      - name: HOME
        value: /shared-home
      - name: GIT_SHOW_LISTING
        value: "false"
      image: ghcr.io/shipwright-io/build/git:v0.17.0@sha256:378e901a9f51ea767d2c134b597d8ed0cd7ae119c97cbd1a96a7baf11105f531
      name: source-default
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop:
          - ALL
        runAsGroup: 1000
        runAsUser: 1000
    - args:
      - -c
      - |
        set -e

        # TODO: To be reviewed as shipwright don't support like Tekton workspaces
        if [[ "$(workspaces.cache.bound)" == "true" ]]; then
         echo "> Setting permissions on '$(workspaces.cache.path)'..."
         chown -R "1001:1000" "$(workspaces.cache.path)"
        fi

        # Ensure standard CNB directories have correct ownership
        # Also ensure /kaniko directory has correct ownership if it's pre-created by volume mount
        for path in "/tekton/home" "/layers" "/workspace/source" "/cache" "/platform" "/kaniko"; do
          if [ -d "$path" ]; then # Check if directory exists before chown
            echo "> Setting permissions on '$path'..."
            chown -R "1001:1000" "$path"
          else
            echo "> Directory '$path' not found, skipping permissions."
          fi
        done

        echo "> Parsing additional configuration..."
        parsing_flag=""
        envs=()
        for arg in "$@"; do
            if [[ "$arg" == "--env-vars" ]]; then
                echo "-> Parsing env variables..."
                parsing_flag="env-vars"
            elif [[ "$parsing_flag" == "env-vars" ]]; then
                envs+=("$arg")
            fi
        done

        echo "> Processing any environment variables..."
        ENV_DIR="/platform/env" # [1]

        echo "--> Creating 'env' directory: $ENV_DIR"
        mkdir -p "$ENV_DIR"

        for env in "${envs[@]}"; do
            IFS='=' read -r key value string <<< "$env"
            if [[ "$key" != "" && "$value" != "" ]]; then
                path="${ENV_DIR}/${key}"
                echo "--> Writing ${path}..."
                echo -n "$value" > "$path"
            fi
        done
      - --
      - --env-vars
      computeResources: {}
      env:
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: registry.access.redhat.com/ubi9/ubi@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9
      name: prepare
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /platform
        name: empty-dir
      - mountPath: /cache
        name: cache-dir
      - mountPath: /tekton/home
        name: empty-dir
      - mountPath: /kaniko
        name: kaniko-work-dir
    - args:
      - -log-level
      - debug
      - -layers
      - /layers
      - -run-image
      - docker.io/paketobuildpacks/run-jammy-base:latest
      - -cache-image
      - ""
      - -uid
      - "1001"
      - -gid
      - "1000"
      - registry.k8s.local/quizap/frontend:latest
      command:
      - /cnb/lifecycle/analyzer
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: "0.12"
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: buildpacksio/lifecycle:0.20.8
      name: analyze
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
    - args:
      - -log-level
      - debug
      - -app
      - /workspace/source/
      - -group
      - /layers/group.toml
      - -plan
      - /layers/plan.toml
      - -platform
      - /platform
      - -run
      - /platform/run.toml
      command:
      - /cnb/lifecycle/detector
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: "0.12"
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: docker.io/paketobuildpacks/builder-jammy-base:latest
      name: detect
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /platform
        name: empty-dir
      - mountPath: /tekton/home
        name: empty-dir
    - args:
      - -log-level
      - debug
      - -group
      - /layers/group.toml
      - -layers
      - /layers
      - -cache-dir
      - /cache
      - -cache-image
      - ""
      - -uid
      - "1001"
      - -gid
      - "1000"
      - -build-image
      - docker.io/paketobuildpacks/builder-jammy-base:latest
      command:
      - /cnb/lifecycle/restorer
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: "0.12"
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: buildpacksio/lifecycle:0.20.8
      name: restore
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /cache
        name: cache-dir
      - mountPath: /kaniko
        name: kaniko-work-dir
    - args:
      - -log-level
      - debug
      - -app
      - /workspace/source/
      - -layers
      - /layers
      - -group
      - /layers/group.toml
      - -plan
      - /layers/plan.toml
      - -platform
      - /platform
      command:
      - /cnb/lifecycle/builder
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: "0.12"
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: docker.io/paketobuildpacks/builder-jammy-base:latest
      name: build-and-push
      securityContext:
        runAsGroup: 1000
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /platform
        name: empty-dir
      - mountPath: /tekton/home
        name: empty-dir
      - mountPath: /cache
        name: cache-dir
    - args:
      - -log-level
      - debug
      - -app
      - /workspace/source/
      - -layers
      - /layers
      - -group
      - /layers/group.toml
      - -cache-dir
      - /cache
      - -cache-image
      - ""
      - -report
      - /layers/report.toml
      - -project-metadata
      - /platform/project-metadata.toml
      - -process-type
      - ""
      - -uid
      - "1001"
      - -gid
      - "1000"
      - -extended
      - /layers/extended
      - registry.k8s.local/quizap/frontend:latest
      command:
      - /cnb/lifecycle/exporter
      computeResources: {}
      env:
      - name: CNB_PLATFORM_API
        value: "0.12"
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: buildpacksio/lifecycle:0.20.8
      name: export
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
      - mountPath: /cache
        name: cache-dir
      - mountPath: /platform
        name: empty-dir
    - args:
      - -c
      - |
        set -e
        cat /layers/report.toml | grep "digest" | cut -d'"' -f2 | cut -d'"' -f2 | tr -d '\n' > /tekton/results/shp-image-digest
      computeResources: {}
      env:
      - name: NODE_ENV
        value: production
      - name: NPM_CONFIG_PRODUCTION
        value: "true"
      image: registry.access.redhat.com/ubi9/ubi@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9
      name: results
      volumeMounts:
      - mountPath: /layers
        name: layers-dir
    volumes:
    - emptyDir: {}
      name: layers-dir
    - emptyDir: {}
      name: empty-dir
    - emptyDir: {}
      name: cache-dir
    - emptyDir: {}
      name: kaniko-work-dir
    workspaces:
    - name: source
