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
|
kind: Pipeline
|
||||||
metadata:
|
metadata:
|
||||||
name: j7s-os-pipeline
|
name: j7s-os-pipeline
|
||||||
|
namespace: j7s-ci
|
||||||
spec:
|
spec:
|
||||||
description: Build and deploy j7s-os images.
|
description: Build and deploy j7s-os images.
|
||||||
params:
|
params:
|
||||||
|
|
@ -67,14 +68,3 @@ spec:
|
||||||
value: $(tasks.image-build.results.version-string)
|
value: $(tasks.image-build.results.version-string)
|
||||||
taskRef:
|
taskRef:
|
||||||
name: j7s-os-buildah
|
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
|
|
||||||
|
|
@ -2,6 +2,7 @@ apiVersion: tekton.dev/v1beta1
|
||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
generateName: j7s-os-test-
|
generateName: j7s-os-test-
|
||||||
|
namespace: j7s-ci
|
||||||
spec:
|
spec:
|
||||||
pipelineRef:
|
pipelineRef:
|
||||||
name: j7s-os-pipeline
|
name: j7s-os-pipeline
|
||||||
|
|
@ -24,4 +25,3 @@ spec:
|
||||||
value: j7s-os
|
value: j7s-os
|
||||||
- name: branch
|
- name: branch
|
||||||
value: main
|
value: main
|
||||||
serviceAccountName: internal-kubectl
|
|
||||||
|
|
@ -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
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: j7s-os-buildah
|
name: j7s-os-buildah
|
||||||
|
namespace: j7s-ci
|
||||||
spec:
|
spec:
|
||||||
description: Build the deployment container image for j7s-os.
|
description: Build the deployment container image for j7s-os.
|
||||||
params:
|
params:
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ apiVersion: tekton.dev/v1beta1
|
||||||
kind: Task
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: j7s-os-image-build
|
name: j7s-os-image-build
|
||||||
|
namespace: j7s-ci
|
||||||
spec:
|
spec:
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- 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