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

Refactor some taskrun fields into helper functions #1110

Merged
merged 2 commits into from
Jul 24, 2019

Commits on Jul 24, 2019

  1. Refactor some taskrun fields into helper functions

    This commit refactors the labels, annotations, default timeouts, and
    service account fields from taskruns into helper functions. This will
    allow us to easily reuse some common defaults for regular taskruns as
    well as those created for conditionals in tektoncd#1093
    
    Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
    dibyom committed Jul 24, 2019
    Configuration menu
    Copy the full SHA
    8218f4f View commit details
    Browse the repository at this point in the history
  2. Add unit tests for getTaskRunTimeout

    getTaskRunTimeout sets the timeout values for taskruns
    created by pipelineruns. While adding the tests, I noticed
    that if `pr.Spec.Timeout` is nil, we were setting the default
    timeout to 60 seconds and not minutes. This is really an edge
    case since we only hit this block if the webhook does not set
    the defaults properly.
    
    Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
    dibyom committed Jul 24, 2019
    Configuration menu
    Copy the full SHA
    4bc47d3 View commit details
    Browse the repository at this point in the history