Initial import of generic pipelines.
This commit is contained in:
parent
f85a423dd0
commit
6c28be4490
|
|
@ -0,0 +1,54 @@
|
||||||
|
# A pipeline to build and deploy dev_contain packages.
|
||||||
|
# Steps:
|
||||||
|
# Clone the dev_contain repo from gitea and checkout packaging branch.
|
||||||
|
# Call ansible play to build.
|
||||||
|
# Optionally, call play to deploy
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: Pipeline
|
||||||
|
metadata:
|
||||||
|
name: dev-contain-pipeline
|
||||||
|
spec:
|
||||||
|
description: "Build and deploy dev_contain packages."
|
||||||
|
params:
|
||||||
|
- name: branch
|
||||||
|
type: string
|
||||||
|
description: The branch in the repo to call the build script in.
|
||||||
|
- name: deploy
|
||||||
|
type: string
|
||||||
|
description: "'true' if we should deploy the image using ansible."
|
||||||
|
workspaces:
|
||||||
|
- name: shared-data
|
||||||
|
description: Shared data.
|
||||||
|
- name: git-credentials
|
||||||
|
description: tekton git credentials
|
||||||
|
- name: deploy-credentials
|
||||||
|
description: tekton credentials to deployment server
|
||||||
|
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/packaging/dev_contain
|
||||||
|
- name: branch
|
||||||
|
value: $(params.branch)
|
||||||
|
taskRef:
|
||||||
|
name: j7s-git-clone
|
||||||
|
- name: build
|
||||||
|
runAfter: ["fetch-repo"]
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: shared-data
|
||||||
|
- name: ssh-directory
|
||||||
|
workspace: deploy-credentials
|
||||||
|
params:
|
||||||
|
- name: deploy
|
||||||
|
value: $(params.deploy)
|
||||||
|
- name: ansible-file-path
|
||||||
|
value: .
|
||||||
|
taskRef:
|
||||||
|
name: j7s-ansible-build
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- dev-contain-pipeline.yaml
|
||||||
|
- ostree-package-pipeline.yaml
|
||||||
|
- simple-ros-pipeline.yaml
|
||||||
|
- test-pipeline.yaml
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
# A pipeline to build and deploy my fork of the debian packaging for ostree.
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: Pipeline
|
||||||
|
metadata:
|
||||||
|
name: ostree-package-pipeline
|
||||||
|
spec:
|
||||||
|
description: "Package fork of ostree."
|
||||||
|
params:
|
||||||
|
- name: deploy
|
||||||
|
type: string
|
||||||
|
description: "'true' if we should deploy the image using ansible."
|
||||||
|
workspaces:
|
||||||
|
- name: shared-data
|
||||||
|
description: Shared data.
|
||||||
|
- name: git-credentials
|
||||||
|
description: tekton git credentials
|
||||||
|
- name: deploy-credentials
|
||||||
|
description: tekton credentials to deployment server
|
||||||
|
tasks:
|
||||||
|
- name: fetch-repo
|
||||||
|
workspaces:
|
||||||
|
- name: output
|
||||||
|
workspace: shared-data
|
||||||
|
- name: ssh-directory
|
||||||
|
workspace: git-credentials
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: ssh://git.jpace121.net:2222/packaging/ostree
|
||||||
|
- name: branch
|
||||||
|
value: jamesp/latest
|
||||||
|
taskRef:
|
||||||
|
name: j7s-git-clone
|
||||||
|
- name: build
|
||||||
|
runAfter: ["fetch-repo"]
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: shared-data
|
||||||
|
- name: ssh-directory
|
||||||
|
workspace: deploy-credentials
|
||||||
|
params:
|
||||||
|
- name: deploy
|
||||||
|
value: $(params.deploy)
|
||||||
|
- name: ansible-file-path
|
||||||
|
value: ./j7s-build-files
|
||||||
|
taskRef:
|
||||||
|
name: j7s-ansible-build
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
# A pipeline to build the simple ros test containers.
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: Pipeline
|
||||||
|
metadata:
|
||||||
|
name: simple-ros-pipeline
|
||||||
|
spec:
|
||||||
|
description: Build a image with a simple ros image.
|
||||||
|
workspaces:
|
||||||
|
- name: shared-data
|
||||||
|
- name: git-credentials
|
||||||
|
- name: cosign-credentials
|
||||||
|
tasks:
|
||||||
|
- name: ros-clone
|
||||||
|
workspaces:
|
||||||
|
- name: output
|
||||||
|
workspace: shared-data
|
||||||
|
- name: ssh-directory
|
||||||
|
workspace: git-credentials
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: ssh://git.jpace121.net:2222/tests/j7s-simple-ws
|
||||||
|
- name: branch
|
||||||
|
value: master
|
||||||
|
- name: repos-file
|
||||||
|
value: source.repos
|
||||||
|
taskRef:
|
||||||
|
name: j7s-ros-clone
|
||||||
|
- name: image-build
|
||||||
|
runAfter: ["ros-clone"]
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: shared-data
|
||||||
|
- name: cosign-credentials
|
||||||
|
workspace: cosign-credentials
|
||||||
|
params:
|
||||||
|
- name: registry
|
||||||
|
value: 192.168.1.149:8443
|
||||||
|
- name: name
|
||||||
|
value: simple-ros
|
||||||
|
- name: version
|
||||||
|
value: 0.1
|
||||||
|
- name: containerfile
|
||||||
|
value: ./docker/Dockerfile
|
||||||
|
taskRef:
|
||||||
|
name: j7s-buildah
|
||||||
|
results:
|
||||||
|
- name: image-ARTIFACT_OUTPUTS
|
||||||
|
type: object
|
||||||
|
value:
|
||||||
|
uri: $(tasks.image-build.results.image-ARTIFACT_OUTPUTS.uri)
|
||||||
|
digest: $(tasks.image-build.results.image-ARTIFACT_OUTPUTS.digest)
|
||||||
|
- name: commit-ARTIFACT_INPUTS
|
||||||
|
type: object
|
||||||
|
value:
|
||||||
|
uri: $(tasks.ros-clone.results.workspace-git-commit-ARTIFACT_OUTPUTS.uri)
|
||||||
|
digest: $(tasks.ros-clone.results.workspace-git-commit-ARTIFACT_OUTPUTS.digest)
|
||||||
|
- name: vcs-exact-file-ARTIFACT_INPUTS
|
||||||
|
type: object
|
||||||
|
value:
|
||||||
|
uri: $(tasks.ros-clone.results.vcs-exact-file-ARTIFACT_OUTPUTS.uri)
|
||||||
|
digest: $(tasks.ros-clone.results.vcs-exact-file-ARTIFACT_OUTPUTS.digest)
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
# A pipeline to test the infrasture around calling pipelines.
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: Pipeline
|
||||||
|
metadata:
|
||||||
|
name: test-pipeline
|
||||||
|
spec:
|
||||||
|
description: "A test pipeline."
|
||||||
|
workspaces:
|
||||||
|
- name: shared-data
|
||||||
|
description: Shared data.
|
||||||
|
- name: git-credentials
|
||||||
|
description: tekton git credentials
|
||||||
|
params:
|
||||||
|
- name: pr-id
|
||||||
|
description: ID number of the current PR.
|
||||||
|
tasks:
|
||||||
|
- name: fetch-repo
|
||||||
|
workspaces:
|
||||||
|
- name: output
|
||||||
|
workspace: shared-data
|
||||||
|
- name: ssh-directory
|
||||||
|
workspace: git-credentials
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: ssh://git.jpace121.net:2222/tests/job-test
|
||||||
|
- name: branch
|
||||||
|
value: master
|
||||||
|
taskRef:
|
||||||
|
name: j7s-git-clone
|
||||||
|
- name: cat-readme
|
||||||
|
runAfter: ["fetch-repo"]
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: shared-data
|
||||||
|
taskSpec:
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
steps:
|
||||||
|
- image: docker.io/debian:bullseye-slim
|
||||||
|
script: |
|
||||||
|
set -x
|
||||||
|
cat $(workspaces.source.path)/README.md
|
||||||
|
exit 0
|
||||||
|
finally:
|
||||||
|
- name: notify-onedev
|
||||||
|
params:
|
||||||
|
- name: tekton-login-secret-name
|
||||||
|
value: onedev-api-key
|
||||||
|
- name: feedback-url
|
||||||
|
value: https://git.jpace121.net/
|
||||||
|
- name: pr-id
|
||||||
|
value: $(params.pr-id)
|
||||||
|
- name: run-name
|
||||||
|
value: $(context.pipelineRun.name)
|
||||||
|
- name: status
|
||||||
|
value: $(tasks.status)
|
||||||
|
taskRef:
|
||||||
|
name: j7s-onedev-pr-review
|
||||||
Loading…
Reference in New Issue