Lab 1: Tekton

kubectl apply -f ~/training/devops/tekton/install/tekton.yaml
kubectl apply -n tekton-pipelines -f ~/training/devops/tekton/install/tekton-dashboard.yaml
kubectl apply -n tekton-pipelines -f ~/training/devops/tekton/install/triggers.yaml


minikube service -n tekton-pipelines tekton-dashboard


kubectl apply -n tekton-pipelines -f ~/training/devops/tekton/pipeline/tekton-init.yaml


kubectl create -n tekton-pipelines secret docker-registry regcred --docker-server=docker.io --docker-username=niklaushirt --docker-password=cool97 --docker-email=niklaushirt@gmail.com

kubectl create ns training-pipeline
  
kubectl create -n training-pipeline secret docker-registry regcred --docker-server=docker.io --docker-username=niklaushirt --docker-password=cool97 --docker-email=niklaushirt@gmail.com
  
kubectl create -n training-pipeline secret docker-registry regcred --docker-server=docker.io --docker-username=niklaushirt --docker-password=cool97 --docker-email=niklaushirt@gmail.com

  
kubectl create ns training-dev  
kubectl create ns training-test 
kubectl create ns training-prod 
  
kubectl apply -n training-pipeline -f ~/training/devops/tekton/pipeline/tekton-init.yaml
kubectl apply -n training-pipeline -f ~/training/devops/tekton/pipeline/tekton-resources.yaml
kubectl apply -n training-pipeline -f ~/training/devops/tekton/pipeline/tekton-pipeline.yaml
kubectl apply -n training-pipeline -f ~/training/devops/tekton/pipeline/tekton-tasks.yaml
kubectl apply -n training-pipeline -f ~/training/devops/tekton/pipeline/tekton-trigger.yaml


kubectl apply -n training-pipeline -f ~/training/devops/tekton/pipeline/tekton-

					
curl -v \
-H 'X-GitHub-Event: push' \
-H 'X-Hub-Signature: sha1=04b10a4629d3f62606fdd8d4824cbe546eb43e1d' \
-H 'Content-Type: application/json' \
-d '{"head_commit":{"id":"4e054cddfa7c3d81b2ca562e5298b823c404b0c5"},"repository":{"url": "https://github.com/tektoncd/triggers"}}' \
http://172.17.0.4:30737/

curl -v -H 'X-GitHub-Event: push' -H 'X-Hub-Signature: sha1=04b10a4629d3f62606fdd8d4824cbe546eb43e1d' -H 'Content-Type: application/json' -d '{"head_commit":{"id":"4e054cddfa7c3d81b2ca562e5298b823c404b0c5"},"repository":{"url": "https://github.com/tektoncd/triggers"}}' http://172.17.0.4:30737


kubectl delete -n training-pipeline pipeline --all
kubectl delete -n training-pipeline pipelinerun --all
kubectl delete -n training-pipeline taskrun --all
kubectl delete -n training-pipeline tasks --all
kubectl delete -n training-pipeline pipelineresource --all




kubectl create clusterrolebinding cluster-admin-binding
–clusterrole=cluster-admin
–user=system:serviceaccount:tekton-pipelines:default

kubectl create clusterrolebinding cluster-admin-binding1
–clusterrole=cluster-admin
–user=system:serviceaccount:tekton-pipelines:tekton-dashboard system:serviceaccount:openshift-pipelines:tekton-dashboard