-
Notifications
You must be signed in to change notification settings - Fork 2
/
use-ssh-key.yaml
40 lines (40 loc) · 1.09 KB
/
use-ssh-key.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ###
# This example demonstrates how to use an SSH key to connect to the Orka VM.
# You will first need to copy the public key to the VM and commit or save an
# image using `orka image commit` or `orka image save` and specify that base image.
# in the TaskRun or Pipeline as a param.
#
# You must specify the Task param ssh-key="true" in order to use an SSH key.
#
# ###
# You can create a Kubernetes secret with the SSH credentials as follows:
# kubectl create secret generic orka-ssh-key --from-file=id_rsa=/path/to/id_rsa --from-literal=username=<username>
# ###
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: use-ssh-key
spec:
taskRef:
name: orka-full
params:
- name: base-image
value: catalina-ssh-key-30G.img
- name: ssh-secret
value: orka-ssh-key
- name: ssh-password-key
value: id_rsa
- name: ssh-key
value: "true"
- name: verbose
value: "true"
- name: copy-build
value: "false"
- name: script
value: |
#!/usr/bin/env ruby
puts "Hello macOS"
workspaces:
- name: orka
emptyDir: {}