Skip to content

Commit

Permalink
Add optional resource to addons
Browse files Browse the repository at this point in the history
  • Loading branch information
savitaashture authored and tekton-robot committed Nov 23, 2020
1 parent 1ddec2e commit 646a683
Show file tree
Hide file tree
Showing 18 changed files with 736 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: docker-build-and-deploy-pipeline
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: docker-build-and-deploy-pipeline
description: An example of docker build and deploy pipeline
snippet: false
yaml: |
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: docker-build-and-deploy-pr
spec:
params:
- name: IMAGE_NAME
type: string
- name: GIT_REPO
type: string
- name: GIT_REVISION
type: string
workspaces:
- name: workspace
tasks:
- name: fetch-repository
taskRef:
name: git-clone
kind: ClusterTask
workspaces:
- name: output
workspace: workspace
params:
- name: url
value: $(params.GIT_REPO)
- name: revision
value: $(params.GIT_REVISION)
- name: subdirectory
value: ""
- name: deleteExisting
value: "true"
- name: build
taskRef:
name: buildah
kind: ClusterTask
runAfter:
- fetch-repository
workspaces:
- name: source
workspace: workspace
params:
- name: IMAGE
value: $(params.IMAGE_NAME)
- name: TLSVERIFY
value: "false"
- name: deploy
taskRef:
name: openshift-client
kind: ClusterTask
runAfter:
- build
params:
- name: ARGS
value:
- "new-app"
- "--docker-image"
- "$(params.IMAGE_NAME)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: docker-build-and-deploy-pipeline-pr
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: docker-build-and-deploy-pipeline-using-pipeline-resource
description: An example of docker build and deploy pipeline using Pipeline Resource
snippet: false
yaml: |
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: docker-build-and-deploy-pr
spec:
params:
- name: IMAGE_NAME
type: string
resources:
- name: app-source
type: git
- name: app-image
type: image
tasks:
- name: build
taskRef:
name: buildah-pr
kind: ClusterTask
resources:
inputs:
- name: source
resource: app-source
outputs:
- name: image
resource: app-image
params:
- name: TLSVERIFY
value: "false"
- name: deploy
taskRef:
name: openshift-client
kind: ClusterTask
runAfter:
- build
params:
- name: ARGS
value:
- "new-app"
- "--docker-image"
- "$(params.IMAGE_NAME)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: s2i-build-and-deploy-pipeline-pr
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: s2i-build-and-deploy-pipeline-using-pipeline-resource
description: An example of s2i build and deploy pipeline using Pipeline Resource
snippet: false
yaml: |
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: s2i-build-and-deploy-pr
spec:
params:
- name: IMAGE_NAME
type: string
resources:
- name: app-source
type: git
- name: app-image
type: image
tasks:
- name: build
taskRef:
name: s2i-java-8-pr
kind: ClusterTask
resources:
inputs:
- name: source
resource: app-source
outputs:
- name: image
resource: app-image
params:
- name: TLSVERIFY
value: "false"
- name: deploy
taskRef:
name: openshift-client
kind: ClusterTask
runAfter:
- build
params:
- name: ARGS
value:
- "new-app"
- "--docker-image"
- "$(params.IMAGE_NAME)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: s2i-build-and-deploy-pipeline
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: s2i-build-and-deploy-pipeline-using-workspace
description: An example of s2i build and deploy pipeline using workspace
snippet: false
yaml: |
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: s2i-build-and-deploy
spec:
params:
- name: IMAGE_NAME
type: string
- name: GIT_REPO
type: string
- name: GIT_REVISION
type: string
workspaces:
- name: workspace
tasks:
- name: fetch-repository
taskRef:
name: git-clone
kind: ClusterTask
workspaces:
- name: output
workspace: workspace
params:
- name: url
value: $(params.GIT_REPO)
- name: revision
value: $(params.GIT_REVISION)
- name: subdirectory
value: ""
- name: deleteExisting
value: "true"
- name: build
taskRef:
name: s2i-java-8
kind: ClusterTask
runAfter:
- fetch-repository
workspaces:
- name: source
workspace: workspace
params:
- name: IMAGE
value: $(params.IMAGE_NAME)
- name: TLSVERIFY
value: "false"
- name: deploy
taskRef:
name: openshift-client
kind: ClusterTask
runAfter:
- build
params:
- name: ARGS
value:
- "new-app"
- "--docker-image"
- "$(params.IMAGE_NAME)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: simple-pipeline
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: simple-pipeline
description: An example of simple pipeline
snippet: false
yaml: |
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: simple-pipeline
spec:
params:
- name: PARAM_NAME
type: string
default: defaultValue
resources:
- name: app-source
type: git
- name: app-image
type: image
tasks:
- name: first-task
taskRef:
name: task-name
resources:
inputs:
- name: source
resource: app-source
outputs:
- name: image
resource: app-image
params:
- name: PARAM
value: $(params.PARAM_NAME)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: buildah-pr-snippet
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: Buildah Pipeline Resource based Task
description: |
Buildash task builds the source into a container image Project Atomic's Buildah build tool.
It uses Buildah's support for building from Dockerfiles, using its buildah bud command.
This command executes the directives in the Dockerfile to assemble a container image, then pushes that image to a container registry.
snippet: true
yaml: |
- name: build
taskRef:
name: buildah-pr
kind: ClusterTask
resources:
inputs:
- name: source
resource: app-source
outputs:
- name: image
resource: app-image
params:
- name: BUILDER_IMAGE
value: registry.redhat.io/rhel8/buildah
- name: DOCKERFILE
value: ./Dockerfile
- name: TLSVERIFY
value: "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: buildah-snippet
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: Buildah Task
description: |
Buildash task builds the source into a container image Project Atomic's Buildah build tool.
It uses Buildah's support for building from Dockerfiles, using its buildah bud command.
This command executes the directives in the Dockerfile to assemble a container image, then pushes that image to a container registry.
snippet: true
yaml: |
- name: build
taskRef:
name: buildah
kind: ClusterTask
workspaces:
- name: source
workspace: workspace
params:
- name: IMAGE
value: $(params.IMAGE_NAME)
- name: BUILDER_IMAGE
value: registry.redhat.io/rhel8/buildah
- name: DOCKERFILE
value: ./Dockerfile
- name: TLSVERIFY
value: "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: openshift-client-snippet
spec:
targetResource:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
title: Openshift-client Task
description: |
OpenShift is a Kubernetes distribution from Red Hat which provides oc, the OpenShift CLI that complements kubectl for simplifying deployment and configuration applications on OpenShift.
snippet: true
yaml: |
- name: deploy
taskRef:
name: openshift-client
kind: ClusterTask
params:
- name: ARGS
value: "help"
Loading

0 comments on commit 646a683

Please # to comment.