initial commit
This commit is contained in:
2
dev/tekton/examples/buildah/Dockerfile
Executable file
2
dev/tekton/examples/buildah/Dockerfile
Executable file
@@ -0,0 +1,2 @@
|
||||
FROM alpine
|
||||
ENTRYPOINT echo hallo Allard Krings
|
||||
15
dev/tekton/examples/buildah/README.md
Executable file
15
dev/tekton/examples/buildah/README.md
Executable file
@@ -0,0 +1,15 @@
|
||||
Dit is een pipeline voor buildah.
|
||||
|
||||
let op:
|
||||
|
||||
gebruik de buildah task van Tekton zelf:
|
||||
|
||||
kubectl apply -f
|
||||
https://api.hub.tekton.dev/v1/resource/tekton/task/buildah/0.5/raw
|
||||
|
||||
Deze task heeft een workspace "dockerconfig" die via de pipeline is gekoppeld aan
|
||||
workspace "dockerconfig-ws" die op zijn beurt in de pipelinerun gekoppeld is aan
|
||||
een secret "dockerconfig-secret dat gedefinieerd wordt conform
|
||||
dockerconfig-secret.yaml
|
||||
|
||||
|
||||
19
dev/tekton/examples/buildah/buildah-workspace-pv.yaml
Executable file
19
dev/tekton/examples/buildah/buildah-workspace-pv.yaml
Executable file
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: buildah-workspace-pv
|
||||
spec:
|
||||
storageClassName: ""
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
mountOptions:
|
||||
- hard
|
||||
- nfsvers=4.1
|
||||
nfs:
|
||||
server: 192.168.40.100
|
||||
path: /mnt/nfs_share/tekton-buildah
|
||||
readOnly: false
|
||||
|
||||
16
dev/tekton/examples/buildah/buildah-workspace-pvc.yaml
Executable file
16
dev/tekton/examples/buildah/buildah-workspace-pvc.yaml
Executable file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: buildah-workspace-pvc
|
||||
spec:
|
||||
storageClassName: ""
|
||||
volumeName: buildah-workspace-pv
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
|
||||
|
||||
2
dev/tekton/examples/buildah/create-secret-userid-password.sh
Executable file
2
dev/tekton/examples/buildah/create-secret-userid-password.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
microk8s kubectl create secret generic harbor-userid-password \
|
||||
--from-literal='Username=admin' --from-literal='Password=Harbor01@'
|
||||
6
dev/tekton/examples/buildah/docker-credentials.yaml
Executable file
6
dev/tekton/examples/buildah/docker-credentials.yaml
Executable file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: docker-credentials
|
||||
data:
|
||||
config.json: ewoJImF1dGhzIjogewoJCSJodHRwczovL2luZGV4LmRvY2tlci5pby92MS8iOiB7CgkJCSJhdXRoIjogIllXeHNZWEprYTNKcGJtZHpPa3QxWW1WeWJtVjBaWE13TVVBPSIKCQl9Cgl9Cn0=
|
||||
13
dev/tekton/examples/buildah/dockerconfig-secret.yaml
Executable file
13
dev/tekton/examples/buildah/dockerconfig-secret.yaml
Executable file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: dockerconfig-secret
|
||||
stringData:
|
||||
config.json: |
|
||||
{
|
||||
"auths": {
|
||||
"harbor.alldcs.nl": {
|
||||
"auth": "YWRtaW46SGFyYm9yMDFA"
|
||||
}
|
||||
}
|
||||
}
|
||||
4
dev/tekton/examples/buildah/medium/helloallard/Dockerfile
Executable file
4
dev/tekton/examples/buildah/medium/helloallard/Dockerfile
Executable file
@@ -0,0 +1,4 @@
|
||||
FROM alpine
|
||||
|
||||
ENTRYPOINT echo hallo Allard Krings
|
||||
#
|
||||
32
dev/tekton/examples/buildah/medium/pipeline.yaml
Executable file
32
dev/tekton/examples/buildah/medium/pipeline.yaml
Executable file
@@ -0,0 +1,32 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: tutorial-pipeline
|
||||
spec:
|
||||
workspaces:
|
||||
- name: myworkspace
|
||||
tasks:
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
name: git-clone
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: myworkspace
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/AllardKrings/helloallard.git
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
- name: build
|
||||
taskRef:
|
||||
name: buildah
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: harbor.alldcs.nl/allard/helloallard
|
||||
- name: IMAGE_PUSH_SECRET_NAME
|
||||
value: harbor-credentials
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: myworkspace
|
||||
16
dev/tekton/examples/buildah/medium/pipelinerun.yaml
Executable file
16
dev/tekton/examples/buildah/medium/pipelinerun.yaml
Executable file
@@ -0,0 +1,16 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
generateName: tutorial-pipeline-
|
||||
spec:
|
||||
pipelineRef:
|
||||
name: tutorial-pipeline
|
||||
workspaces:
|
||||
- name: myworkspace
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Mi
|
||||
24
dev/tekton/examples/buildah/pipeline-run.yaml
Executable file
24
dev/tekton/examples/buildah/pipeline-run.yaml
Executable file
@@ -0,0 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
generateName: buildah-clone-build-push-
|
||||
spec:
|
||||
pipelineRef:
|
||||
name: buildah-clone-build-push
|
||||
workspaces:
|
||||
- name: myworkspace
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Mi
|
||||
- name: dockerconfig-ws
|
||||
secret:
|
||||
secretName: dockerconfig-secret
|
||||
params:
|
||||
- name: repo-url
|
||||
value: https://github.com/AllardKrings/helloallard.git
|
||||
- name: image-reference
|
||||
value: harbor.alldcs.nl/allard/hello-allard:1.0
|
||||
35
dev/tekton/examples/buildah/pipeline.yaml
Executable file
35
dev/tekton/examples/buildah/pipeline.yaml
Executable file
@@ -0,0 +1,35 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: buildah-clone-build-push
|
||||
spec:
|
||||
workspaces:
|
||||
- name: myworkspace
|
||||
- name: dockerconfig-ws
|
||||
tasks:
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
name: git-clone
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: myworkspace
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/AllardKrings/helloallard.git
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
- name: build
|
||||
taskRef:
|
||||
name: buildah
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: harbor.alldcs.nl/allard/helloallard:1.0
|
||||
- name: TLSVERIFY
|
||||
value: "false"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: myworkspace
|
||||
- name: dockerconfig
|
||||
workspace: dockerconfig-ws
|
||||
Reference in New Issue
Block a user