Move over j7s-os build. Remove cd deployment and related service account. Will add back in.
This commit is contained in:
parent
3b3e1a6f6f
commit
6211ec0c9e
|
|
@ -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
|
||||
name: j7s-os-buildah
|
||||
|
|
@ -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
|
||||
value: main
|
||||
|
|
@ -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
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ apiVersion: tekton.dev/v1beta1
|
|||
kind: Task
|
||||
metadata:
|
||||
name: j7s-os-image-build
|
||||
namespace: j7s-ci
|
||||
spec:
|
||||
workspaces:
|
||||
- name: source
|
||||
|
|
|
|||
|
|
@ -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 <<EOF
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: j7s-os-app
|
||||
image: $(params.image):$(params.version)
|
||||
EOF
|
||||
Loading…
Reference in New Issue