-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstep.yaml
120 lines (120 loc) · 4.17 KB
/
step.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
kind: step-type
version: '1.0'
metadata:
name: ydemetriades/github-buildstatus
version: 1.0.0
isPublic: true
description: Update GitHub Commit State Build Status
sources:
- 'https://github.com/ydemetriades/cfstep-github-buildstatus'
stage: incubating
maintainers:
- name: Yiannis Demetriades
email: [email protected]
categories:
- git
official: false
tags: []
icon:
type: svg
url: https://cdn.jsdelivr.net/gh/ydemetriades/cfstep-github-buildstatus/icon.svg
background: "#f4f4f4"
examples:
- description: github-buildstatus-basic-example
workflow:
version: '1.0'
steps:
GH_Update_BuildStatus:
type: ydemetriades/github-buildstatus
arguments:
GH_BSN_REPO_AUTH_USER: ${{GH_BSN_REPO_AUTH_USER}}
GH_BSN_REPO_AUTH_TOKEN: ${{GH_BSN_REPO_AUTH_TOKEN}}
CF_BUILD_STATUS: ${{CF_BUILD_STATUS}}
- description: github-buildstatus-advanced-example
workflow:
version: '1.0'
mode: parallel
steps:
GH_Update_BuildStatus_Finished:
type: parallel
fail_fast: false
when:
condition:
all:
myCondition: workflow.result == 'finished'
steps:
GH_Update_BuildStatus_Successful:
type: ydemetriades/github-buildstatus
when:
condition:
all:
myCondition: workflow.result == 'success'
arguments:
GH_BSN_REPO_AUTH_USER: ${{GH_BSN_REPO_AUTH_USER}}
GH_BSN_REPO_AUTH_TOKEN: ${{GH_BSN_REPO_AUTH_TOKEN}}
CF_BUILD_STATUS: 'SUCCESSFULL'
GH_Update_BuildStatus_Failed:
type: ydemetriades/github-buildstatus
when:
condition:
all:
myCondition: workflow.result == 'failure'
arguments:
GH_BSN_REPO_AUTH_USER: ${{GH_BSN_REPO_AUTH_USER}}
GH_BSN_REPO_AUTH_TOKEN: ${{GH_BSN_REPO_AUTH_TOKEN}}
CF_BUILD_STATUS: 'FAILED'
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"patterns": [],
"required": [
"CF_BUILD_STATUS",
"GH_BSN_REPO_AUTH_USER",
"GH_BSN_REPO_AUTH_TOKEN"
],
"properties": {
"GH_BSN_URL": {
"type": "string",
"description": "GitHub API Url. Can be used to point to GitHub Enterprise instead."
},
"GH_BSN_REPO_AUTH_USER": {
"type": "string",
"description": "GitHub API Authorization Username"
},
"GH_BSN_REPO_AUTH_TOKEN": {
"type": "string",
"description": "GitHub API Authorization Password"
},
"CF_BUILD_STATUS": {
"type": "string",
"description": "Build Status. Must be one of ['error', 'failure', 'pending', 'success']"
},
"GH_BSN_BUILD_CONTEXT": {
"type": "string",
"description": "Build context. eg. 'codefresh/ci' Default value is 'default'"
},
"CF_BUILD_URL": {
"type": "string",
"description": "Build URL. can be used to link to another URL. Default is a link to the codefresh build"
},
"GH_BSN_BUILD_DESCRIPTION": {
"type": "string",
"description": "Build Status description"
}
}
}
steps:
main:
name: ydemetriades/github-buildstatus
image: ydemetriades/cfstep-github-buildstatus
environment:
- GH_BSN_REPO_AUTH_USER=${{GH_BSN_REPO_AUTH_USER}}
- GH_BSN_REPO_AUTH_TOKEN=${{GH_BSN_REPO_AUTH_TOKEN}}
- CF_BUILD_STATUS=${{CF_BUILD_STATUS}}
- GH_BSN_BUILD_CONTEXT=${{GH_BSN_BUILD_CONTEXT}}
- GH_BSN_BUILD_DESCRIPTION=${{GH_BSN_BUILD_DESCRIPTION}}
- CF_BUILD_URL=${{CF_BUILD_URL}}