mirror of
https://gitee.com/devstar/devstar-devcontainer-operator
synced 2025-09-09 03:25:50 +00:00
[feature] git clone repo upon initialization
Some checks failed
DevStar DevContainer Operator CI Pipeline - main branch / build-and-push-devstar-devcontainer-operator (push) Failing after 1m8s
Some checks failed
DevStar DevContainer Operator CI Pipeline - main branch / build-and-push-devstar-devcontainer-operator (push) Failing after 1m8s
This commit is contained in:
@@ -26,7 +26,7 @@ spec:
|
||||
emptyDir: {}
|
||||
initContainers:
|
||||
- name: init-root-ssh-dir
|
||||
image: {{.Spec.StatefulSet.Image}}
|
||||
image: devstar.cn/public/busybox:27a71e19c956
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
@@ -36,6 +36,16 @@ spec:
|
||||
volumeMounts:
|
||||
- name: root-ssh-dir
|
||||
mountPath: /root/.ssh
|
||||
- name: init-git-repo-dir
|
||||
image: {{.Spec.StatefulSet.Image}}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- if [ ! -d '/data/workspace' ]; then git clone {{.Spec.StatefulSet.GitRepositoryURL}} /data/workspace && echo "Git Repository cloned."; else echo "Folder already exists."; fi
|
||||
volumeMounts:
|
||||
- name: pvc-devcontainer
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: {{.ObjectMeta.Name}}
|
||||
image: {{.Spec.StatefulSet.Image}}
|
||||
@@ -61,7 +71,7 @@ spec:
|
||||
- -c
|
||||
- exec ls ~
|
||||
failureThreshold: 6
|
||||
initialDelaySeconds: 10
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
@@ -72,7 +82,7 @@ spec:
|
||||
- -c
|
||||
- exec cat /etc/ssh/ssh_host*.pub
|
||||
failureThreshold: 6
|
||||
initialDelaySeconds: 10
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
|
Reference in New Issue
Block a user