Skip to content

Commit

Permalink
✨ add Pipelines as Code
Browse files Browse the repository at this point in the history
  • Loading branch information
goern committed Aug 15, 2023
1 parent 591a71f commit 6c116b9
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .tekton/repository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: pipelinesascode.tekton.dev/v1alpha1
kind: Repository
metadata:
name: micropipenv
spec:
url: https://github.com/goern/micropipenv
52 changes: 52 additions & 0 deletions .tekton/tox-on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: tox-on-pr
annotations:
pipelinesascode.tekton.dev/on-target-branch: "[master]"
pipelinesascode.tekton.dev/on-event: "[pull_request]"
spec:
workspaces:
- name: shared-workspace
params:
- name: git-url
type: string
description: url of the git repo for the code of deployment
default: https://github.com/goern/micropipenv
- name: git-revision
type: string
description: revision to be used from repo of the code for deployment
default: pipeline-as-code
- name: IMAGE
type: string
description: image to be built from the code
default: micropipenv
tasks:
- name: fetch-repository
taskRef:
name: git-clone
kind: ClusterTask
workspaces:
- name: output
workspace: shared-workspace
params:
- name: url
value: $(params.git-url)
- name: subdirectory
value: ""
- name: deleteExisting
value: "true"
- name: revision
value: $(params.git-revision)
- name: build-image
taskRef:
name: buildah
kind: ClusterTask
params:
- name: IMAGE
value: $(params.IMAGE)
workspaces:
- name: source
workspace: shared-workspace
runAfter:
- fetch-repository

0 comments on commit 6c116b9

Please # to comment.