-
Notifications
You must be signed in to change notification settings - Fork 8
/
checkout.yaml
44 lines (44 loc) · 1.53 KB
/
checkout.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
41
42
43
44
apiVersion: devops.kubesphere.io/v1alpha3
kind: ClusterStepTemplate
metadata:
name: checkout
labels:
step.devops.kubesphere.io/category: "SCM"
annotations:
devops.kubesphere.io/displayNameZH: "Checkout"
devops.kubesphere.io/descriptionZH: "拉取源代码,常用于拉取非 Git 仓库代码,例如 SVN 等等"
devops.kubesphere.io/displayNameEN: "Checkout"
devops.kubesphere.io/descriptionEN: "check out source code, often used for non-git repository, such as svn"
spec:
runtime: dsl
parameters:
- name: url
type: string
display: 'Repository URL'
required: true
- name: credentialsId
type: secret
display: 'Credential Name'
- name: importCodeRepo
type: importCodeRepo
reactions: '[{"target": "url", "fulfill": {"state": {"value": "{{$self.value?.url}}"}}}, {"target": "credentialsId", "fulfill": {"state": {"value": "{{$self.value?.secret}}"}}}]'
template: |
{
"arguments": [
{
"key": "scm",
"value": {
"isLiteral": false,
"value": "[$class: 'SubversionSCM', locations: [[cancelProcessOnExternalsFail: true, credentialsId: '{{.param.credentialsId.name}}', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: '{{.param.url}}']], quietOperation: true, workspaceUpdater: [$class: 'UpdateUpdater']]"
}
},
{
"key": "poll",
"value": {
"isLiteral": true,
"value": false
}
}
],
"name": "checkout"
}