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

Format code blocks with prettier #3911

Merged
merged 1 commit into from
Jun 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Note: Github deprecated basic authentication with username and password. You can

- Associate the `ServiceAccount` with your `TaskRun`:

```yaml
```yaml
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
Expand Down Expand Up @@ -463,7 +463,7 @@ Kubernetes `Secrets`.
spec:
serviceAccountName: build-bot
steps:
...
# ...
```

- Associate the `ServiceAccount` with your `PipelineRun`:
Expand Down
18 changes: 9 additions & 9 deletions docs/developers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,16 @@ you end up with this task run status:
```yaml
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
...
# ...
status:
...
# ...
taskResults:
- name: current-date-human-readable
value: |
Wed Jan 22 19:47:26 UTC 2020
- name: current-date-unix-timestamp
value: |
1579722445
- name: current-date-human-readable
value: |
Wed Jan 22 19:47:26 UTC 2020
- name: current-date-unix-timestamp
value: |
1579722445
```

Instead of hardcoding the path to the result file, the user can also use a variable. So `/tekton/results/current-date-unix-timestamp` can be replaced with: `$(results.current-date-unix-timestamp.path)`. This is more flexible if the path to result files ever changes.
Expand All @@ -294,7 +294,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Pipeline
metadata:
name: sum-and-multiply-pipeline
#...
#...
tasks:
- name: sum-inputs
#...
Expand Down
16 changes: 8 additions & 8 deletions docs/enabling-ha.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ If HA is not required, you can disable it by scaling the deployment back to one
spec:
serviceAccountName: tekton-pipelines-controller
containers:
- name: tekton-pipelines-controller
...
args: [
# Other flags defined here...
"-disable-ha=true"
]
- name: tekton-pipelines-controller
# ...
args: [
# Other flags defined here...
"-disable-ha=true",
]
```

**Note:** If you set `-disable-ha=false` and run multiple replicas of the Controller, each replica will process work items separately, which will lead to unwanted behavior when creating resources (e.g., `TaskRuns`, etc.).
Expand Down Expand Up @@ -83,7 +83,7 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: tekton-pipelines-webhook
...
# ...
spec:
minReplicas: 1
```
Expand All @@ -103,7 +103,7 @@ metadata:
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
...
# ...
spec:
minAvailable: 1
selector:
Expand Down
196 changes: 98 additions & 98 deletions docs/migrating-v1alpha1-to-v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ For example, consider the following `v1alpha1` parameters:
spec:
inputs:
params:
- name: ADDR
description: Address to curl.
type: string
- name: ADDR
description: Address to curl.
type: string

# TaskRun.yaml (v1alpha1)
spec:
inputs:
params:
- name: ADDR
value: https://example.com/foo.json
- name: ADDR
value: https://example.com/foo.json
```

The above parameters are now represented as follows in `v1beta1`:
Expand All @@ -55,15 +55,15 @@ The above parameters are now represented as follows in `v1beta1`:
# Task.yaml (v1beta1)
spec:
params:
- name: ADDR
description: Address to curl.
type: string
- name: ADDR
description: Address to curl.
type: string

# TaskRun.yaml (v1beta1)
spec:
params:
- name: ADDR
value: https://example.com/foo.json
- name: ADDR
value: https://example.com/foo.json
```

## Replacing `PipelineResources` with Tasks
Expand Down Expand Up @@ -93,32 +93,32 @@ metadata:
spec:
inputs:
resources:
- name: workspace
type: git
- name: workspace
type: git
params:
- name: pathToDockerFile
description: The path to the dockerfile to build
default: /workspace/workspace/Dockerfile
- name: pathToContext
description: The build context used by Kaniko
default: /workspace/workspace
- name: pathToDockerFile
description: The path to the dockerfile to build
default: /workspace/workspace/Dockerfile
- name: pathToContext
description: The build context used by Kaniko
default: /workspace/workspace
outputs:
resources:
- name: builtImage
type: image
- name: builtImage
type: image
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:v0.17.1
env:
- name: "DOCKER_CONFIG"
value: "/tekton/home/.docker/"
args:
- --dockerfile=$(inputs.params.pathToDockerFile)
- --destination=$(outputs.resources.builtImage.url)
- --context=$(inputs.params.pathToContext)
- --oci-layout-path=$(inputs.resources.builtImage.path)
securityContext:
runAsUser: 0
- name: build-and-push
image: gcr.io/kaniko-project/executor:v0.17.1
env:
- name: "DOCKER_CONFIG"
value: "/tekton/home/.docker/"
args:
- --dockerfile=$(inputs.params.pathToDockerFile)
- --destination=$(outputs.resources.builtImage.url)
- --context=$(inputs.params.pathToContext)
- --oci-layout-path=$(inputs.resources.builtImage.path)
securityContext:
runAsUser: 0
```

To do the same thing with the `git` catalog `Task` and the kaniko `Task` you will need to combine them in a
Expand All @@ -133,38 +133,38 @@ metadata:
name: kaniko-pipeline
spec:
params:
- name: git-url
- name: git-revision
- name: image-name
- name: path-to-image-context
- name: path-to-dockerfile
- name: git-url
- name: git-revision
- name: image-name
- name: path-to-image-context
- name: path-to-dockerfile
workspaces:
- name: git-source
- name: git-source
tasks:
- name: fetch-from-git
taskRef:
name: git-clone
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.git-revision)
workspaces:
- name: output
workspace: git-source
- name: build-image
taskRef:
name: kaniko
params:
- name: IMAGE
value: $(params.image-name)
- name: CONTEXT
value: $(params.path-to-image-context)
- name: DOCKERFILE
value: $(params.path-to-dockerfile)
workspaces:
- name: source
workspace: git-source
- name: fetch-from-git
taskRef:
name: git-clone
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.git-revision)
workspaces:
- name: output
workspace: git-source
- name: build-image
taskRef:
name: kaniko
params:
- name: IMAGE
value: $(params.image-name)
- name: CONTEXT
value: $(params.path-to-image-context)
- name: DOCKERFILE
value: $(params.path-to-dockerfile)
workspaces:
- name: source
workspace: git-source
# If you want you can add a Task that uses the IMAGE_DIGEST from the kaniko task
# via $(tasks.build-image.results.IMAGE_DIGEST) - this was a feature we hadn't been
# able to fully deliver with the Image PipelineResource!
Expand Down Expand Up @@ -216,33 +216,33 @@ For example, consider the following `v1alpha1` definition:
spec:
inputs:
resources:
- name: skaffold
type: git
- name: skaffold
type: git
outputs:
resources:
- name: baked-image
type: image
- name: baked-image
type: image

# TaskRun.yaml (v1alpha1)
spec:
inputs:
resources:
- name: skaffold
resourceSpec:
type: git
params:
- name: revision
value: v0.32.0
- name: url
value: https://github.com/GoogleContainerTools/skaffold
- name: skaffold
resourceSpec:
type: git
params:
- name: revision
value: v0.32.0
- name: url
value: https://github.com/GoogleContainerTools/skaffold
outputs:
resources:
- name: baked-image
resourceSpec:
- type: image
params:
- name: url
value: gcr.io/foo/bar
- name: baked-image
resourceSpec:
- type: image
params:
- name: url
value: gcr.io/foo/bar
```

The above definition becomes the following in `v1beta1`:
Expand All @@ -252,29 +252,29 @@ The above definition becomes the following in `v1beta1`:
spec:
resources:
inputs:
- name: src-repo
type: git
- name: src-repo
type: git
outputs:
- name: baked-image
type: image
- name: baked-image
type: image

# TaskRun.yaml (v1beta1)
spec:
resources:
inputs:
- name: src-repo
resourceSpec:
type: git
params:
- name: revision
value: main
- name: url
value: https://github.com/tektoncd/pipeline
- name: src-repo
resourceSpec:
type: git
params:
- name: revision
value: main
- name: url
value: https://github.com/tektoncd/pipeline
outputs:
- name: baked-image
resourceSpec:
- type: image
params:
- name: url
value: gcr.io/foo/bar
- name: baked-image
resourceSpec:
- type: image
params:
- name: url
value: gcr.io/foo/bar
```
Loading