76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
# A pipeline to build j7s-os images.
|
|
# Steps:
|
|
# Clone the j7s-os repo from gitea.
|
|
# Call make <> in the repo.
|
|
# Build and push a new deployment container.
|
|
# Deploy the deployment container as a service.
|
|
---
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: Pipeline
|
|
metadata:
|
|
name: j7s-os-pipeline
|
|
spec:
|
|
description: Build and deploy j7s-os images.
|
|
params:
|
|
- name: make-image-name
|
|
type: string
|
|
description: The name of image to make in the os repo.
|
|
- name: short-name
|
|
type: string
|
|
description: A short name for this image from which other names a derived. (aka j7-os)
|
|
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: ssh://git@git.jpace121.net:2222/public/j7s-os
|
|
- name: branch
|
|
value: main
|
|
taskRef:
|
|
name: j7s-git-clone
|
|
- name: image-build
|
|
runAfter: ["fetch-repo"]
|
|
workspaces:
|
|
- name: source
|
|
workspace: shared-data
|
|
params:
|
|
- name: image-name
|
|
value: $(params.make-image-name)
|
|
taskRef:
|
|
name: j7s-os-image-build
|
|
- name: build-deploy-image
|
|
runAfter: ["image-build"]
|
|
workspaces:
|
|
- name: source
|
|
workspace: shared-data
|
|
params:
|
|
- name: commit
|
|
value: $(params.make-image-name)
|
|
- name: image
|
|
value: $(params.short-name)-deploy
|
|
- name: registry
|
|
value: 192.168.1.128:8443
|
|
- 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 |