diff --git a/deployments/hook-bot.yaml b/deployments/hook-bot.yaml deleted file mode 100644 index f284622..0000000 --- a/deployments/hook-bot.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: tekton-hook-bot-deployment - labels: - app: tekton-hook-bot -spec: - replicas: 1 - selector: - matchLabels: - app: tekton-hook-bot - template: - metadata: - labels: - app: tekton-hook-bot - spec: - containers: - - name: tekton-hook-bot - image: 192.168.1.128:8443/tekton-hooks-bot:0.11 - env: - - name: LISTEN_ADDR - value: 0.0.0.0:3000 - - name: SERVICE_ADDR - value: http://el-gerrit-pipeline-listener.default.svc.cluster.local:8080 - - name: CLONE_URL - value: "ssh://tekton@gerrit.jpace121.net:29418" - - name: FEEDBACK_URL - value: "tekton@gerrit.jpace121.net" - - name: FEEDBACK_PORT - value: "29418" - ports: - - containerPort: 3000 - name: service-port ---- -apiVersion: v1 -kind: Service -metadata: - name: hook-bot-service -spec: - selector: - app: tekton-hook-bot - ports: - - protocol: TCP - targetPort: 3000 - port: 3000 - name: service-port ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: hook-bot-ingress -spec: - rules: - - host: tekton.internal.jpace121.net - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: hook-bot-service - port: - number: 3000 \ No newline at end of file diff --git a/pipelines/gerrit-pipeline.yaml b/pipelines/gerrit-pipeline.yaml deleted file mode 100644 index 8699cb4..0000000 --- a/pipelines/gerrit-pipeline.yaml +++ /dev/null @@ -1,78 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: gerrit-pipeline -spec: - description: A test pipeline. - params: - - name: clone_url - type: string - description: The git repository URL to clone from. - - name: commit - type: string - description: The git hash to checkout. - - name: feedback_url - type: string - description: The url to ssh into to post feedback using gerrit. - - name: feedback_port - type: string - description: The port on the feedback url to use to post feedback. - - name: use-gerrit - type: string - description: Should we report back to gerrit? - default: "false" - workspaces: - - name: shared-data - description: Shared data. - - name: git-credentials - description: My ssh credentials - tasks: - - name: fetch-repo - workspaces: - - name: output - workspace: shared-data - - name: ssh-directory - workspace: git-credentials - params: - - name: url - value: $(params.clone_url) - - name: commit - value: $(params.commit) - taskRef: - name: j7s-gerrit-clone - - name: cat-readme - runAfter: ["fetch-repo"] - workspaces: - - name: source - workspace: shared-data - taskSpec: - workspaces: - - name: source - steps: - - image: docker.io/debian:latest - script: | - set -x - cat $(workspaces.source.path)/README - - finally: - - name: notify-gerrit - when: - - input: $(params.use-gerrit) - operator: in - values: ["true"] - params: - - name: commit - value: $(params.commit) - - name: build-id - value: $(context.pipelineRun.name) - - name: status - value: $(tasks.status) - - name: feedback_url - value: $(params.feedback_url) - - name: feedback_port - value: $(params.feedback_port) - workspaces: - - name: ssh-directory - workspace: git-credentials - taskRef: - name: j7s-gerrit-notify \ No newline at end of file diff --git a/triggers/gerrit-pipeline-trigger.yaml b/triggers/gerrit-pipeline-trigger.yaml deleted file mode 100644 index 4928789..0000000 --- a/triggers/gerrit-pipeline-trigger.yaml +++ /dev/null @@ -1,77 +0,0 @@ ---- -apiVersion: triggers.tekton.dev/v1beta1 -kind: EventListener -metadata: - name: gerrit-pipeline-listener -spec: - serviceAccountName: tekton-bot - triggers: - - name: gerrit-pipeline-trigger - bindings: - - ref: gerrit-pipeline-binding - template: - ref: gerrit-pipeline-template - resources: - kubernetesResource: - serviceType: ClusterIP ---- -apiVersion: triggers.tekton.dev/v1beta1 -kind: TriggerBinding -metadata: - name: gerrit-pipeline-binding -spec: - params: - - name: commit - value: $(body.commit) - - name: clone_url - value: $(body.clone_url) - - name: feedback_url - value: $(body.feedback_url) - - name: feedback_port - value: $(body.feedback_port) - - name: use-gerrit - value: "true" ---- - -apiVersion: triggers.tekton.dev/v1beta1 -kind: TriggerTemplate -metadata: - name: gerrit-pipeline-template -spec: - params: - - name: commit - - name: clone_url - - name: feedback_url - - name: feedback_port - - name: use-gerrit - resourcetemplates: - - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - generateName: test-run- - spec: - pipelineRef: - name: gerrit-pipeline - params: - - name: commit - value: $(tt.params.commit) - - name: clone_url - value: $(tt.params.clone_url) - - name: feedback_url - value: $(tt.params.feedback_url) - - name: feedback_port - value: $(tt.params.feedback_port) - - name: use-gerrit - value: $(tt.params.use-gerrit) - workspaces: - - name: shared-data - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - - name: git-credentials - secret: - secretName: git-credentials \ No newline at end of file