Compare commits

...
46 Commits
Author SHA1 Message Date
jimmy 69d2bfcda8 Increase the loop time. 2024-02-25 11:47:35 -05:00
jimmy 1ca84a3996 Add limbo-micro. 2024-01-14 07:12:55 -05:00
jimmy cdf3d1d09b Add limbo-micro-host trigger. 2024-01-14 07:05:22 -05:00
jimmy 585aaec356 Rename limbo_gui to limbo_web. 2024-01-13 11:42:04 -05:00
jimmy bf892d2a60 Move the triggers here for consolidation. 2024-01-06 15:08:21 +00:00
jimmy 869dac4cb1 Use the pipeline run name in the task description from gitea. 2024-01-04 20:29:05 -05:00
jimmy b30243779e Pass more information through to the pipeline. 2024-01-04 20:07:21 -05:00
jimmy 57fe458012 Add git. 2024-01-04 19:29:22 -05:00
jimmy d7395ff2e9 Add ssh-keyscan. Start ssh-agent for cargo. 2024-01-04 19:20:05 -05:00
jimmy cda58f1605 Add dockerfile for harbor.internal.jpace121.net/k8s/limbo_builder:latest. 2024-01-04 18:38:07 -05:00
jimmy fc111b7606 Fix typo. 2024-01-04 18:28:42 -05:00
jimmy 63eff5d163 Give just build access to the git creds. 2024-01-04 18:17:01 -05:00
jimmy fc5dbc5d50 Ok... I'll have to clean this up with some more changes. 2024-01-04 08:47:27 -05:00
jimmy 24dfac8c4a Try reusing name again. 2024-01-04 08:27:51 -05:00
jimmy ac407bf59f Change pipeline name so I can keep track of them. Don't use a separate just file. 2024-01-04 08:17:05 -05:00
jimmy b7d49faa8f Use description as status. 2024-01-04 02:06:28 -05:00
jimmy 1eacc9baa9 Source cargo env. Don't add description if its gonna get cut off. 2024-01-04 01:40:57 -05:00
jimmy 30d55685bc Fix copy-pasta. Add description. 2024-01-04 00:09:36 -05:00
jimmy c73978c992 Use hash instead of branch for git clone hash. 2024-01-04 00:01:20 -05:00
jimmy 33e48bfa56 Add service account for trigger. It's important! 2024-01-03 22:20:30 -05:00
jimmy c570ae93d2 Add v0 of limbo tasks. 2024-01-03 21:51:52 -05:00
jimmy abab4e02c6 Switch to signing with cosign instead of skopeo.
Fixes #1
2023-08-08 21:59:14 -04:00
jimmy b4270ae3ff Fixes to get cosign working. 2023-08-08 20:38:26 -04:00
jimmy 6cdf86ec80 Try reenabling container signing. 2023-08-08 19:35:42 -04:00
jimmy 880a5911b2 Add j7s-os run. 2023-04-29 16:13:52 -04:00
jimmy 91fea124eb Say what image we're pushing. 2023-04-29 15:41:21 -04:00
jimmy 733e1ab876 Pass in harbor auth. Fix param name. 2023-04-28 21:09:26 -04:00
jimmy bec62ab1d9 Multiple j7s-os changes. 2023-04-28 20:58:03 -04:00
jimmy 4bc785833f Add dev_contain runs. 2023-04-27 21:58:50 -04:00
jimmy 2553c007dd Add dev contain pipeline. 2023-04-27 20:47:00 -04:00
jimmy 24149dfc1c Remove ostree. I don't care about this pipeline at this point. 2023-04-27 20:38:03 -04:00
jimmy 069149c8b3 Remove cosign stuff. It's not working and I can figure this out later. 2023-04-20 18:13:34 -04:00
jimmy 667cf3b8ff Need me some debug. 2023-04-20 17:56:21 -04:00
jimmy 42af174c0b Update simple ros pipeline. 2023-04-15 09:55:31 -04:00
jimmy c452802d9e Set test pipeline back to success. Add test run. 2023-04-13 19:54:19 -04:00
jimmy 4fee3a9ff8 I guess we will specify an argument. 2023-04-13 19:51:15 -04:00
jimmy 8978950ae9 Correctl url flag. 2023-04-13 19:47:19 -04:00
jimmy 8202fbde45 Test failed pipeline. 2023-04-13 19:43:15 -04:00
jimmy 87d39b47ad Make sure status is set correctly. 2023-04-13 19:39:53 -04:00
jimmy 4c7032ad51 Ok, now maybe I have the options right... 2023-04-11 20:31:04 -04:00
jimmy 92d220677a Remove new lines at the end of git hashes. 2023-04-11 20:27:27 -04:00
jimmy 50e3cf441a Remove line continuation. Does not seem to play nice. 2023-04-11 20:21:56 -04:00
jimmy 86856efa74 I renamed context to name... 2023-04-11 20:13:00 -04:00
jimmy 573232f56a Version the status image. 2023-04-11 20:07:57 -04:00
jimmy 1c8c3542e7 Add missing parameter. 2023-04-11 20:03:16 -04:00
jimmy 105e6cd594 Remove no longer needed parameters. 2023-04-11 20:00:05 -04:00
30 changed files with 667 additions and 104 deletions

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ spec:
workspace: git-credentials
params:
- name: url
value: ssh://git@git.jpace121.net:2222/packaging/dev_contain
value: ssh://git@git.jpace121.net:2222/packaging/dev_contain.git
- name: branch
value: $(params.branch)
taskRef:
+2
View File
@@ -2,3 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- test-pipeline.yaml
- simple-ros-pipeline.yaml
- dev-contain-pipeline.yaml
@@ -1,47 +0,0 @@
# 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
+9 -22
View File
@@ -9,7 +9,8 @@ spec:
workspaces:
- name: shared-data
- name: git-credentials
- name: cosign-credentials
params:
- name: registry-login-secret-name
tasks:
- name: ros-clone
workspaces:
@@ -19,7 +20,7 @@ spec:
workspace: git-credentials
params:
- name: url
value: ssh://git.jpace121.net:2222/tests/j7s-simple-ws
value: ssh://git@git.jpace121.net:2222/tests/j7s-simple-ws.git
- name: branch
value: master
- name: repos-file
@@ -31,32 +32,18 @@ spec:
workspaces:
- name: source
workspace: shared-data
- name: cosign-credentials
workspace: cosign-credentials
params:
- name: registry
value: 192.168.1.149:8443
value: harbor.internal.jpace121.net
- name: name
value: simple-ros
value: library/simple-ros
- name: version
value: 0.1
- name: containerfile
value: ./docker/Dockerfile
- name: registry-login-secret-name
value: $(params.registry-login-secret-name)
- name: cosign-secret-name
value: container-signing-secret
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)
+2 -3
View File
@@ -11,9 +11,6 @@ spec:
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:
@@ -49,6 +46,8 @@ spec:
value: tests
- name: git-repo-name
value: job-test
- name: name
value: test/test-pipeline
- name: sha
value: $(tasks.fetch-repo.results.hash)
- name: status
+14 -16
View File
@@ -16,39 +16,32 @@ spec:
description: Path of the Containerfile relative to source.
- name: registry-login-secret-name
description: Name of the secret containing the credentials to push to the registry.
- name: cosign-secret-name
description: Name of the secret container the credentials for cosign.
workspaces:
- name: source
- name: cosign-credentials
steps:
- name: build
image: harbor.internal.jpace121.net/k8s/buildah:latest
workingDir: $(workspaces.source.path)
script: |
set -x
set -e
# Login
buildah login --tls-verify=false --username=$USERNAME --password=$PASSWORD $(params.registry)
mkdir ~/.sigstore
cp $(workspaces.cosign-credentials.path)/* ~/.sigstore
cat <<EOF > ~/.sigstore/param-file.yaml
privateKeyFile: "$HOME/.sigstore/cosign.key"
privateKeyPassphraseFile: "$HOME/.sigstore/cosign.password"
EOF
mkdir -p /etc/containers/registries.d/
cat <<EOF > /etc/containers/registries.d/james-registry.yaml
docker:
$(params.registry):
use-sigstore-attachments: true
EOF
cosign login --username=$USERNAME --password=$PASSWORD $(params.registry)
# Build
buildah --storage-driver=overlay bud --tls-verify=false --no-cache \
-f $(params.containerfile) -t $(params.name):$(params.version) .
# Push
skopeo copy --dest-tls-verify=false --sign-by-sigstore=$HOME/.sigstore/param-file.yaml \
skopeo copy --debug --dest-tls-verify=false \
containers-storage:localhost/$(params.name):$(params.version) \
docker://$(params.registry)/$(params.name):$(params.version)
skopeo copy --dest-tls-verify=false --sign-by-sigstore=$HOME/.sigstore/param-file.yaml \
skopeo copy --debug --dest-tls-verify=false \
containers-storage:localhost/$(params.name):$(params.version) \
docker://$(params.registry)/$(params.name):latest
export COSIGN_PASSWORD=$(cat /etc/cosign-credentials/cosign.password)
cosign sign --tlog-upload=false --allow-insecure-registry --key /etc/cosign-credentials/cosign.key $(params.registry)/$(params.name):$(params.version)
env:
- name: USERNAME
valueFrom:
@@ -63,8 +56,13 @@ spec:
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers
- name: cosign-credentials
mountPath: /etc/cosign-credentials
securityContext:
privileged: true
volumes:
- name: varlibcontainers
emptyDir: {}
- name: cosign-credentials
secret:
secretName: $(params.cosign-secret-name)
+1 -1
View File
@@ -24,4 +24,4 @@ spec:
cd $(workspaces.output.path)
git checkout $(params.hash)
git rev-parse HEAD > $(results.hash.path)
echo -n $(git rev-parse HEAD) > $(results.hash.path)
+1 -1
View File
@@ -23,4 +23,4 @@ spec:
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path)
cd $(workspaces.output.path)
git rev-parse HEAD > $(results.hash.path)
echo -n $(git rev-parse HEAD) > $(results.hash.path)
+7 -7
View File
@@ -7,18 +7,18 @@ spec:
- name: git-owner
- name: git-repo-name
- name: sha
- name: context
- name: name
- name: status
- name: description
default: ""
default: "N/A"
- name: targetUrl
default: ""
default: "https://tekton.jpace121.net/"
- name: base-url
default: "https://git.jpace121.net/"
- name: token-secret-name
default: gitea-token
steps:
- image: harbor.internal.jpace121.net/k8s/j7s-gitea-status:latest
- image: harbor.internal.jpace121.net/k8s/j7s-gitea-status:v0.0.2
env:
- name: GIT_URL
value: $(params.base-url)
@@ -35,7 +35,7 @@ spec:
set -x
cd /
./j7s-gitea-status -sha $(params.sha) \
-context $(params.context) \
-statusFlag $(params.status) \
-name $(params.name) \
-status $(params.status) \
-description $(params.description) \
-targetUrl $(params.targetUrl)
-url $(params.targetUrl)
+5
View File
@@ -4,3 +4,8 @@ FROM quay.io/buildah/upstream:latest
RUN dnf install -y skopeo \
--exclude container-selinux \
--enablerepo=updates-testing
# Add wget, use it to install cosign.
RUN dnf install -y wget && \
wget https://github.com/sigstore/cosign/releases/download/v2.1.1/cosign-2.1.1.x86_64.rpm && \
rpm -ivh cosign*.rpm
+13
View File
@@ -0,0 +1,13 @@
# For building limbo nightlies, including limbo-gui.
FROM docker.io/library/fedora:latest
RUN sudo dnf update -y && \
sudo dnf install -y nodejs yarnpkg \
openssl-devel curl \
just gcc openssh-clients \
git
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN /bin/bash -c "source $HOME/.cargo/env && rustup update"
RUN /bin/bash -c "source $HOME/.cargo/env && rustup toolchain install nightly"
RUN /bin/bash -c "source $HOME/.cargo/env && rustup default nightly"
RUN /bin/bash -c "source $HOME/.cargo/env && cargo install wasm-pack"
+4 -4
View File
@@ -14,13 +14,13 @@ spec:
description: Registry to push to.
- name: version
description: Version for the image.
- name: registry-secret-name
- name: registry-login-secret-name
description: Name of secret to get credentials for registry from.
workspaces:
- name: source
steps:
- name: build
image: quay.io/buildah/stable:v1.23.3
image: harbor.internal.jpace121.net/k8s/buildah:latest
workingDir: $(workspaces.source.path)
script: |
set -x
@@ -31,8 +31,8 @@ spec:
--build-arg commit=./$(params.commit) \
-f ./hosting/Dockerfile -t $(params.image):$(params.version) .
# Push
buildah --storage-driver=overlay push --tls-verify=false $(params.image) docker://$(params.registry)/$(params.image):$(params.version)
buildah --storage-driver=overlay push --tls-verify=false $(params.image) docker://$(params.registry)/$(params.image):latest
buildah --storage-driver=overlay push --tls-verify=false localhost/$(params.image):$(params.version) docker://$(params.registry)/$(params.image):$(params.version)
buildah --storage-driver=overlay push --tls-verify=false localhost/$(params.image):$(params.version) docker://$(params.registry)/$(params.image):latest
env:
- name: USERNAME
valueFrom:
+1 -1
View File
@@ -10,7 +10,7 @@ spec:
results:
- name: version-string
steps:
- image: harbor.internal.jpace121.net/j7s-image-build:latest
- image: harbor.internal.jpace121.net/k8s/j7s-image-build:latest
securityContext:
privileged: true
script: |
+1 -1
View File
@@ -12,7 +12,7 @@ spec:
- name: ssh-directory
steps:
- name: update-with-flux
image: harbor.internal.jpace121.net/gitssh:latest
image: harbor.internal.jpace121.net/k8s/gitssh:latest
script: |
#!/usr/bin/env bash
set -x
+81
View File
@@ -0,0 +1,81 @@
# A pipeline to build j7s-os images.
# Steps:
# Clone the j7s-os repo from onedev.
# 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
namespace: j7s-ci
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: branch
type: string
default: main
description: branch of j7s-os image to build.
workspaces:
- name: shared-data
description: Shared data.
- name: git-credentials
description: Tekton's 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.git
- name: branch
value: $(params.branch)
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: j7s-os-deploy
- name: registry
value: harbor.internal.jpace121.net/library
- name: version
value: $(tasks.image-build.results.version-string)
- name: registry-login-secret-name
value: harbor-login
taskRef:
name: j7s-os-buildah
- name: deploy-image
runAfter: ["build-deploy-image"]
workspaces:
- name: ssh-directory
workspace: git-credentials
params:
- name: image
value: harbor.internal.jpace121.net/library/j7s-os-deploy
- name: version
value: $(tasks.image-build.results.version-string)
taskRef:
name: j7s-os-k8s-deploy
+1
View File
@@ -4,3 +4,4 @@ resources:
- j7s-os-buildah.yaml
- j7s-os-image-build.yaml
- j7s-os-k8s-deploy.yaml
- j7s-os-pipeline.yaml
+11
View File
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- limbo-just-build.yaml
- limbo-pipeline.yaml
- limbo-pipeline-listener.yaml
- service-account.yaml
- limbo-branch-trigger.yaml
- limbo-web-branch-trigger.yaml
- limbo-micro-host-branch-trigger.yaml
- limbo-micro-branch-trigger.yaml
+51
View File
@@ -0,0 +1,51 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: limbo-branch-trigger-deployment
labels:
app: limbo-branch-trigger
spec:
replicas: 1
selector:
matchLabels:
app: limbo-branch-trigger
template:
metadata:
labels:
app: limbo-branch-trigger
spec:
volumes:
- name: git-credentials
secret:
secretName: git-credentials
containers:
- name: branch-trigger
image: harbor.internal.jpace121.net/k8s/j7s_branch_trigger:latest
command: ["/bin/sh","-c"]
args:
- mkdir ~/.ssh;
chmod 700 ~/.ssh;
cp -r /secrets/. ~/.ssh;
chmod -R 400 ~/.ssh/*;
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts;
j7s_branch_trigger
env:
- name: J7S_REPO
value: "ssh://git@git.jpace121.net:2222/limbo/limbo.git"
- name: J7S_URL
value: "http://el-limbo-pipeline-listener.j7s-ci.svc.cluster.local:8080"
- name: J7S_ORG_NAME
value: "limbo"
- name: J7S_REPO_NAME
value: "limbo"
- name: J7S_JOB_NAME
value: "limbo"
- name: J7S_PATTERN
value: "^refs/heads/.*?$"
- name: J7S_LOOPTIME
value: "5.0"
volumeMounts:
- name: git-credentials
readOnly: true
mountPath: "/secrets"
+24
View File
@@ -0,0 +1,24 @@
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: limbo-just-build
spec:
workspaces:
- name: source
- name: ssh-directory
steps:
- image: harbor.internal.jpace121.net/k8s/limbo_builder:latest
script: |
#!/usr/bin/env bash
set -ex
# Set up ssh so we can pull private dependencies.
cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/*
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
# Use just to run the ci steps.
source ~/.cargo/env
export CARGO_NET_GIT_FETCH_WITH_CLI=true
cd $(workspaces.source.path)
just ci-build
just ci-test
+51
View File
@@ -0,0 +1,51 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: limbo-micro-branch-trigger-deployment
labels:
app: limbo-micro-branch-trigger
spec:
replicas: 1
selector:
matchLabels:
app: limbo-micro-branch-trigger
template:
metadata:
labels:
app: limbo-micro-branch-trigger
spec:
volumes:
- name: git-credentials
secret:
secretName: git-credentials
containers:
- name: branch-trigger
image: harbor.internal.jpace121.net/k8s/j7s_branch_trigger:latest
command: ["/bin/sh","-c"]
args:
- mkdir ~/.ssh;
chmod 700 ~/.ssh;
cp -r /secrets/. ~/.ssh;
chmod -R 400 ~/.ssh/*;
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts;
j7s_branch_trigger
env:
- name: J7S_REPO
value: "ssh://git@git.jpace121.net:2222/limbo/limbo_micro.git"
- name: J7S_URL
value: "http://el-limbo-pipeline-listener.j7s-ci.svc.cluster.local:8080"
- name: J7S_PATTERN
value: "^refs/heads/.*?$"
- name: J7S_ORG_NAME
value: "limbo"
- name: J7S_REPO_NAME
value: "limbo_micro"
- name: J7S_JOB_NAME
value: "limbo-micro"
- name: J7S_LOOPTIME
value: "3.0"
volumeMounts:
- name: git-credentials
readOnly: true
mountPath: "/secrets"
@@ -0,0 +1,51 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: limbo-micro-host-branch-trigger-deployment
labels:
app: limbo-micro-host-branch-trigger
spec:
replicas: 1
selector:
matchLabels:
app: limbo-micro-host-branch-trigger
template:
metadata:
labels:
app: limbo-micro-host-branch-trigger
spec:
volumes:
- name: git-credentials
secret:
secretName: git-credentials
containers:
- name: branch-trigger
image: harbor.internal.jpace121.net/k8s/j7s_branch_trigger:latest
command: ["/bin/sh","-c"]
args:
- mkdir ~/.ssh;
chmod 700 ~/.ssh;
cp -r /secrets/. ~/.ssh;
chmod -R 400 ~/.ssh/*;
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts;
j7s_branch_trigger
env:
- name: J7S_REPO
value: "ssh://git@git.jpace121.net:2222/limbo/limbo_micro_host.git"
- name: J7S_URL
value: "http://el-limbo-pipeline-listener.j7s-ci.svc.cluster.local:8080"
- name: J7S_PATTERN
value: "^refs/heads/.*?$"
- name: J7S_ORG_NAME
value: "limbo"
- name: J7S_REPO_NAME
value: "limbo_micro_host"
- name: J7S_JOB_NAME
value: "limbo-micro-host"
- name: J7S_LOOPTIME
value: "3.0"
volumeMounts:
- name: git-credentials
readOnly: true
mountPath: "/secrets"
+69
View File
@@ -0,0 +1,69 @@
---
apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
name: limbo-pipeline-listener
spec:
serviceAccountName: limbo-serviceaccount
triggers:
- name: limbo-pipeline-trigger
bindings:
- ref: limbo-pipeline-binding
template:
ref: limbo-pipeline-template
resources:
kubernetesResource:
serviceType: ClusterIP
---
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
name: limbo-pipeline-binding
spec:
params:
- name: sha
value: $(body.sha)
- name: repo_name
value: $(body.repo_name)
- name: org_name
value: $(body.org_name)
- name: job_name
value: $(body.job_name)
---
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
name: limbo-pipeline-template
spec:
params:
- name: sha
- name: repo_name
- name: org_name
- name: job_name
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: "$(tt.params.job_name)-pipeline-"
spec:
pipelineRef:
name: limbo-pipeline
params:
- name: sha
value: "$(tt.params.sha)"
- name: gitea-repo-name
value: "$(tt.params.repo_name)"
- name: gitea-org-name
value: "$(tt.params.org_name)"
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: git-credentials
secret:
secretName: git-credentials
+63
View File
@@ -0,0 +1,63 @@
# A pipeline to build limbo.
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: limbo-pipeline
spec:
description: "Pipeline for limbo project."
workspaces:
- name: shared-data
description: Shared data.
- name: git-credentials
description: tekton git credentials
params:
- name: sha
description: git hash to checkout
default: main
- name: gitea-repo-name
description: name of the repo in gitea (the part right before .git in the clone url)
default: limbo
- name: gitea-org-name
description: name of the org in gitea
default: limbo
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/limbo/$(params.gitea-repo-name).git
- name: hash
value: $(params.sha)
taskRef:
name: j7s-git-clone-hash
- name: call-just
runAfter: ["fetch-repo"]
workspaces:
- name: source
workspace: shared-data
- name: ssh-directory
workspace: git-credentials
taskRef:
name: limbo-just-build
finally:
- name: gitea-status
params:
- name: git-owner
value: $(params.gitea-org-name)
- name: description
value: $(context.pipelineRun.name)
- name: git-repo-name
value: $(params.gitea-repo-name)
- name: name
value: j7s-ci/limbo-pipeline
- name: sha
value: $(tasks.fetch-repo.results.hash)
- name: status
value: $(tasks.status)
taskRef:
name: j7s-gitea-status
+51
View File
@@ -0,0 +1,51 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: limbo-web-branch-trigger-deployment
labels:
app: limbo-web-branch-trigger
spec:
replicas: 1
selector:
matchLabels:
app: limbo-web-branch-trigger
template:
metadata:
labels:
app: limbo-web-branch-trigger
spec:
volumes:
- name: git-credentials
secret:
secretName: git-credentials
containers:
- name: branch-trigger
image: harbor.internal.jpace121.net/k8s/j7s_branch_trigger:latest
command: ["/bin/sh","-c"]
args:
- mkdir ~/.ssh;
chmod 700 ~/.ssh;
cp -r /secrets/. ~/.ssh;
chmod -R 400 ~/.ssh/*;
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts;
j7s_branch_trigger
env:
- name: J7S_REPO
value: "ssh://git@git.jpace121.net:2222/limbo/limbo_web.git"
- name: J7S_URL
value: "http://el-limbo-pipeline-listener.j7s-ci.svc.cluster.local:8080"
- name: J7S_PATTERN
value: "^refs/heads/.*?$"
- name: J7S_ORG_NAME
value: "limbo"
- name: J7S_REPO_NAME
value: "limbo_web"
- name: J7S_JOB_NAME
value: "limbo-web"
- name: J7S_LOOPTIME
value: "5.0"
volumeMounts:
- name: git-credentials
readOnly: true
mountPath: "/secrets"
+29
View File
@@ -0,0 +1,29 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: limbo-serviceaccount
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: limbo-eventlistener-binding
subjects:
- kind: ServiceAccount
name: limbo-serviceaccount
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tekton-triggers-eventlistener-roles
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: limbo-eventlistener-clusterbinding
subjects:
- kind: ServiceAccount
name: limbo-serviceaccount
namespace: j7s-ci
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tekton-triggers-eventlistener-clusterroles
+28
View File
@@ -0,0 +1,28 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: dev-contain-debian-
namespace: j7s-ci
spec:
pipelineRef:
name: dev-contain-pipeline
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: git-credentials
secret:
secretName: git-credentials
- name: deploy-credentials
secret:
secretName: deploy-credentials
params:
- name: branch
value: "packaging/debian"
- name: deploy
value: "true"
+28
View File
@@ -0,0 +1,28 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: dev-contain-rpm-
namespace: j7s-ci
spec:
pipelineRef:
name: dev-contain-pipeline
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: git-credentials
secret:
secretName: git-credentials
- name: deploy-credentials
secret:
secretName: deploy-credentials
params:
- name: branch
value: "packaging/fedora"
- name: deploy
value: "true"
+25
View File
@@ -0,0 +1,25 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: j7s-os-test-
namespace: j7s-ci
spec:
pipelineRef:
name: j7s-os-pipeline
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
- name: git-credentials
secret:
secretName: git-credentials
params:
- name: make-image-name
value: cs9-qemu-minimal-ostree.x86_64.repo
- name: branch
value: main
+23
View File
@@ -0,0 +1,23 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: simple-ros-pipeline-
namespace: j7s-ci
spec:
pipelineRef:
name: simple-ros-pipeline
params:
- name: registry-login-secret-name
value: harbor-login
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: git-credentials
secret:
secretName: git-credentials
+20
View File
@@ -0,0 +1,20 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: test-run-
namespace: j7s-ci
spec:
pipelineRef:
name: test-pipeline
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: git-credentials
secret:
secretName: git-credentials