Build an os image on k8s.
This commit is contained in:
1 parent
d8fe7e598e
commit
c777b13c3d
5 files changed
+115
No files matched your search
@@ -0,0 +1,20 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: j7s-git-clone
|
||||
spec:
|
||||
workspaces:
|
||||
- name: output
|
||||
- name: ssh-directory
|
||||
params:
|
||||
- name: url
|
||||
- name: branch
|
||||
steps:
|
||||
- image: 192.168.1.128:8443/gitssh:latest
|
||||
script: |
|
||||
set -x
|
||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
chmod -R 400 ~/.ssh/*
|
||||
|
||||
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path)
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: j7s-os-image-build
|
||||
spec:
|
||||
workspaces:
|
||||
- name: source
|
||||
params:
|
||||
- name: image-name
|
||||
steps:
|
||||
- image: 192.168.1.128:8443/j7s-image-build:latest
|
||||
securityContext:
|
||||
privileged: true
|
||||
script: |
|
||||
set -x
|
||||
sudo chown -R j7s:j7s $(workspaces.source.path)
|
||||
cd $(workspaces.source.path)
|
||||
make $(params.image-name)
|
||||
Reference in new issue
Block a user