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

Behaviour of "runAfter" for a Task that runs after a Task with Condition #1264

Closed
afrittoli opened this issue Sep 2, 2019 · 1 comment
Closed

Comments

@afrittoli
Copy link
Member

Expected Behavior

I would like to have a way in Tekton to easily express the following dependency between Tasks in a pipeline: The 2nd task should run only after the 1st one was executed successfully or if the 1st one was skipped because of a condition.

Actual Behavior

If the 1st task is skipped because the condition is not met, the 2nd task is not executed at all.

Steps to Reproduce the Problem

  1. Create a pipeline like similar to this:
apiVersion: tekton.dev/v1alpha1
kind: Pipeline
metadata:
  name: two-tasks-one-condition
spec:
  tasks:
  - name: conditional-task
    taskRef:
      name: task1
    conditions:
      - conditionRef: always-fail
  - name: run-if-1-or-1-skipped
    taskRef:
      name: task2
    runAfter:
      - conditional-task
  1. Run the pipeline through a PipelineRun
  2. task2 is not executed

Additional Info

In the example pipeline I used runAfter but I believe the behaviour would be the same if the dependency was introduced using from on a resource.

@afrittoli afrittoli changed the title Behaviour of runAfter for a Task that runs after a Task with Condition Behaviour of "runAfter" for a Task that runs after a Task with Condition Sep 2, 2019
@dibyom
Copy link
Member

dibyom commented Sep 3, 2019

This is a feature request that looks like a duplicate of #1023

I'm going to close this out though I like the description here so I copied the Steps to Reproduce the Problem section over to #1023 👼

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

2 participants