forked from jenkins-x/jx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tekton): Allow setting pipeline timeout and set default on Pipeli…
…neRun to 240 hours (jenkins-x#4251) * fix(tekton): Set a default PipelineRun timeout of 10 days Starting in Tekton Pipelines v0.4.0, the default timeout for `TaskRun`s of 10 minutes when no timeout is specified is actually enforced. The only way to specify a timeout for a `TaskRun` is by setting a timeout on the `PipelineRun`, so until tektoncd/pipeline#978 and/or tektoncd/pipeline#979 are addressed, we should just set a ridiculously high timeout on all `PipelineRun`s. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com> * fix(tekton): Allow configuring Pipeline timeout Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
- Loading branch information
Showing
34 changed files
with
549 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
pkg/cmd/step/create/test_data/step_create_task/pipeline-timeout/jenkins-x.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
pipelineConfig: | ||
env: | ||
- name: FRUIT | ||
value: BANANA | ||
pipelines: | ||
release: | ||
pipeline: | ||
env: | ||
- name: GIT_AUTHOR_NAME | ||
value: somebodyelse | ||
options: | ||
timeout: | ||
time: 10 | ||
unit: hours | ||
containerOptions: | ||
resources: | ||
requests: | ||
cpu: 0.1 | ||
memory: 64Mi | ||
agent: | ||
image: nodejs | ||
stages: | ||
- name: Build-a-really-long-stage-name-please-but-not-too-long-thanks | ||
steps: | ||
- command: echo | ||
args: | ||
- hello world | ||
- command: ls | ||
args: | ||
- -la | ||
env: | ||
- name: ANOTHER_VAR | ||
value: Another value | ||
- name: Second | ||
steps: | ||
- command: echo | ||
args: | ||
- hi ${FRUIT} | ||
options: | ||
containerOptions: | ||
resources: | ||
limits: | ||
cpu: 0.4 | ||
memory: 256Mi |
48 changes: 48 additions & 0 deletions
48
pkg/cmd/step/create/test_data/step_create_task/pipeline-timeout/pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Pipeline | ||
metadata: | ||
creationTimestamp: null | ||
name: abayer-js-test-repo-really-long-1 | ||
namespace: jx | ||
labels: | ||
branch: really-long | ||
owner: abayer | ||
repo: js-test-repo | ||
spec: | ||
params: | ||
- default: 0.0.1 | ||
description: the version number for this pipeline which is used as a tag on docker | ||
images and helm charts | ||
name: version | ||
resources: | ||
- name: abayer-js-test-repo-really-long | ||
type: git | ||
tasks: | ||
- name: build-a-really-long-stage-name-please-but-not-too-long-thanks | ||
params: | ||
- name: version | ||
value: ${params.version} | ||
resources: | ||
inputs: | ||
- name: workspace | ||
resource: abayer-js-test-repo-really-long | ||
outputs: | ||
- name: workspace | ||
resource: abayer-js-test-repo-really-long | ||
taskRef: | ||
name: abayer-js-test-repo-really-long-build-a-really-long-stage-nam-1 | ||
- name: second | ||
params: | ||
- name: version | ||
value: ${params.version} | ||
resources: | ||
inputs: | ||
- from: | ||
- build-a-really-long-stage-name-please-but-not-too-long-thanks | ||
name: workspace | ||
resource: abayer-js-test-repo-really-long | ||
runAfter: | ||
- build-a-really-long-stage-name-please-but-not-too-long-thanks | ||
taskRef: | ||
name: abayer-js-test-repo-really-long-second-1 | ||
status: {} |
15 changes: 15 additions & 0 deletions
15
pkg/cmd/step/create/test_data/step_create_task/pipeline-timeout/pipelineresources.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
items: | ||
- apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineResource | ||
metadata: | ||
creationTimestamp: null | ||
name: abayer-js-test-repo-really-long | ||
spec: | ||
params: | ||
- name: revision | ||
value: v0.0.1 | ||
- name: url | ||
value: https://github.com/abayer/js-test-repo | ||
type: git | ||
status: {} | ||
metadata: {} |
26 changes: 26 additions & 0 deletions
26
pkg/cmd/step/create/test_data/step_create_task/pipeline-timeout/pipelinerun.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
branch: really-long | ||
owner: abayer | ||
repo: js-test-repo | ||
name: abayer-js-test-repo-really-long-1 | ||
spec: | ||
params: | ||
- name: version | ||
value: 0.0.1 | ||
pipelineRef: | ||
apiVersion: tekton.dev/v1alpha1 | ||
name: abayer-js-test-repo-really-long-1 | ||
resources: | ||
- name: abayer-js-test-repo-really-long | ||
resourceRef: | ||
apiVersion: tekton.dev/v1alpha1 | ||
name: abayer-js-test-repo-really-long | ||
serviceAccount: tekton-bot | ||
timeout: 10h0m0s | ||
trigger: | ||
type: manual | ||
status: {} |
17 changes: 17 additions & 0 deletions
17
pkg/cmd/step/create/test_data/step_create_task/pipeline-timeout/structure.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
metadata: | ||
creationTimestamp: null | ||
name: abayer-js-test-repo-really-long-1 | ||
labels: | ||
branch: really-long | ||
owner: abayer | ||
repo: js-test-repo | ||
pipelineRef: null | ||
pipelineRunRef: null | ||
stages: | ||
- depth: 0 | ||
name: Build-a-really-long-stage-name-please-but-not-too-long-thanks | ||
taskRef: abayer-js-test-repo-really-long-build-a-really-long-stage-nam-1 | ||
- depth: 0 | ||
name: Second | ||
previous: Build-a-really-long-stage-name-please-but-not-too-long-thanks | ||
taskRef: abayer-js-test-repo-really-long-second-1 |
Oops, something went wrong.