apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: pipelinerun-network
spec:
  pipelineSpec:
    tasks:
      - name: deploy-to-cluster
        taskSpec:
          steps:
            - name: push-image
              image: registry.access.redhat.com/ubi9/ubi
              script: |
                echo "Pushing Docker image to registry..."
                # This will fail due to network issues or authentication
                docker login -u $USERNAME -p $PASSWORD my-private-registry.com
                docker push my-private-registry.com/my-app:latest
                
            - name: update-deployment
              image: bitnami/kubectl:latest
              script: |
                echo "Updating Kubernetes deployment..."
                # This will fail if cluster is unreachable or credentials are wrong
                kubectl set image deployment/my-app container=my-private-registry.com/my-app:latest
                kubectl rollout status deployment/my-app --timeout=300s
