From 6211ec0c9ef5e96bf58bc4e5d5894f56bfc8f1a2 Mon Sep 17 00:00:00 2001 From: James Pace Date: Sun, 29 Jan 2023 20:26:07 -0500 Subject: [PATCH] Move over j7s-os build. Remove cd deployment and related service account. Will add back in. --- pipelines/j7s-os-pipeline.yaml | 14 ++---------- runs/j7s-os-test.yaml | 4 ++-- serviceaccounts/internal-kubectl.yaml | 31 --------------------------- tasks/j7s-os-buildah.yaml | 1 + tasks/j7s-os-image-build.yaml | 1 + tasks/j7s-os-k8s-deploy.yaml | 27 ----------------------- 6 files changed, 6 insertions(+), 72 deletions(-) delete mode 100644 serviceaccounts/internal-kubectl.yaml delete mode 100644 tasks/j7s-os-k8s-deploy.yaml diff --git a/pipelines/j7s-os-pipeline.yaml b/pipelines/j7s-os-pipeline.yaml index d39968c..c142c39 100644 --- a/pipelines/j7s-os-pipeline.yaml +++ b/pipelines/j7s-os-pipeline.yaml @@ -9,6 +9,7 @@ apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: name: j7s-os-pipeline + namespace: j7s-ci spec: description: Build and deploy j7s-os images. params: @@ -66,15 +67,4 @@ spec: - name: version value: $(tasks.image-build.results.version-string) taskRef: - name: j7s-os-buildah - - name: patch-deployment - runAfter: ["build-deploy-image"] - params: - - name: deployment - value: $(params.short-name)-app-deployment - - name: image - value: 192.168.1.128:8443/$(params.short-name)-deploy - - name: version - value: $(tasks.image-build.results.version-string) - taskRef: - name: j7s-os-k8s-deploy \ No newline at end of file + name: j7s-os-buildah \ No newline at end of file diff --git a/runs/j7s-os-test.yaml b/runs/j7s-os-test.yaml index f94c578..84e6467 100644 --- a/runs/j7s-os-test.yaml +++ b/runs/j7s-os-test.yaml @@ -2,6 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: generateName: j7s-os-test- + namespace: j7s-ci spec: pipelineRef: name: j7s-os-pipeline @@ -23,5 +24,4 @@ spec: - name: short-name value: j7s-os - name: branch - value: main - serviceAccountName: internal-kubectl \ No newline at end of file + value: main \ No newline at end of file diff --git a/serviceaccounts/internal-kubectl.yaml b/serviceaccounts/internal-kubectl.yaml deleted file mode 100644 index 762f359..0000000 --- a/serviceaccounts/internal-kubectl.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: internal-kubectl ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: modify-deployments -rules: - - apiGroups: ["apps"] - resources: - - deployments - verbs: - - get - - list - - delete - - update - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: modify-deployments-to-sa -subjects: - - kind: ServiceAccount - name: internal-kubectl -roleRef: - kind: Role - name: modify-deployments - apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/tasks/j7s-os-buildah.yaml b/tasks/j7s-os-buildah.yaml index cb0dd6f..605f90a 100644 --- a/tasks/j7s-os-buildah.yaml +++ b/tasks/j7s-os-buildah.yaml @@ -3,6 +3,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: j7s-os-buildah + namespace: j7s-ci spec: description: Build the deployment container image for j7s-os. params: diff --git a/tasks/j7s-os-image-build.yaml b/tasks/j7s-os-image-build.yaml index b83f65a..a5ab70f 100644 --- a/tasks/j7s-os-image-build.yaml +++ b/tasks/j7s-os-image-build.yaml @@ -2,6 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: j7s-os-image-build + namespace: j7s-ci spec: workspaces: - name: source diff --git a/tasks/j7s-os-k8s-deploy.yaml b/tasks/j7s-os-k8s-deploy.yaml deleted file mode 100644 index e25d245..0000000 --- a/tasks/j7s-os-k8s-deploy.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: j7s-os-k8s-deploy -spec: - params: - - name: deployment - description: The name of the deployment to patch. - - name: image - description: The image to deploy. - - name: version - description: The version of the image to deploy. - steps: - - name: kubectl - image: gcr.io/cloud-builders/kubectl@sha256:c855d060ac961bc7e6bff42d6b9d9ebebee304eca4cce4a2202e51a5da26c043 - script: | - #!/usr/bin/env bash - set -x - kubectl version - kubectl patch deployment $(params.deployment) --patch-file=/dev/stdin <