-
Notifications
You must be signed in to change notification settings - Fork 395
Expand file tree
/
Copy pathCircleCI_Standard_Variables.rb
More file actions
192 lines (153 loc) · 6.42 KB
/
CircleCI_Standard_Variables.rb
File metadata and controls
192 lines (153 loc) · 6.42 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
cheatsheet do
title 'CircleCI Standard Variables'
docset_file_name 'CircleCI_Standard_Variables'
keyword 'circleci'
source_url 'http://cheat.kapeli.com'
introduction 'Contains standard environment variables and pipeline variables that CircleCI injects into your job'
category do
id 'Environment variables'
entry do
name '`CI`'
notes %|(**Boolean**) true (represents whether the current environment is a CI environment)|
end
entry do
name '`CIRCLECI`'
notes %|(**Boolean**) true (represents whether the current environment is a CircleCI environment)|
end
entry do
name '`CIRCLE_BRANCH`'
notes %|(**String**) The name of the Git branch currently being built.|
end
entry do
name '`CIRCLE_BUILD_NUM`'
notes %|(**Integer**) The number of the current job. Job numbers are unique for each job.|
end
entry do
name '`CIRCLE_BUILD_URL`'
notes %|(**String**) The URL for the current job on CircleCI.|
end
entry do
name '`CIRCLE_JOB`'
notes %|(**String**) The name of the current job.|
end
entry do
name '`CIRCLE_NODE_INDEX`'
notes %|(**Integer**) For jobs that run with parallelism enabled, this is the index of the current parallel run. The value ranges from 0 to (CIRCLE_NODE_TOTAL - 1).|
end
entry do
name '`CIRCLE_NODE_TOTAL`'
notes %|(**Integer**) For jobs that run with parallelism enabled, this is the number of parallel runs. This is equivalent to the value of parallelism in your config file..|
end
entry do
name '`CIRCLE_PR_NUMBER`'
notes %|(**Integer**) The number of the associated GitHub or Bitbucket pull request. Only available on forked PRs.|
end
entry do
name '`CIRCLE_PR_REPONAME`'
notes %|(**String**) The name of the GitHub or Bitbucket repository where the pull request was created. Only available on forked PRs.|
end
entry do
name '`CIRCLE_PR_USERNAME`'
notes %|(**String**) The GitHub or Bitbucket username of the user who created the pull request. Only available on forked PRs.|
end
entry do
name '`CIRCLE_PREVIOUS_BUILD_NUM`'
notes %|(**String**) The number of previous builds on the current branch.|
end
entry do
name '`CIRCLE_PROJECT_REPONAME`'
notes %|(**String**) The name of the repository of the current project.|
end
entry do
name '`CIRCLE_PROJECT_USERNAME`'
notes %|(**String**) The GitHub or Bitbucket username of the current project.|
end
entry do
name '`CIRCLE_PULL_REQUEST`'
notes %|(**String**) The URL of the associated pull request. If there are multiple associated pull requests, one URL is randomly chosen.|
end
entry do
name '`CIRCLE_PULL_REQUESTS`'
notes %|(List) Comma-separated list of URLs of the current build’s associated pull requests.|
end
entry do
name '`CIRCLE_REPOSITORY_URL`'
notes %|(**String**) The URL of your GitHub or Bitbucket repository.|
end
entry do
name '`CIRCLE_SHA1`'
notes %|(**String**) The SHA1 hash of the last commit of the current build.|
end
entry do
name '`CIRCLE_TAG`'
notes %|(**String**) The name of the git tag, if the current build is tagged. |
end
entry do
name '`CIRCLE_USERNAME`'
notes %|(**String**) The GitHub or Bitbucket username of the user who triggered the pipeline (only if the user has a CircleCI account).|
end
entry do
name '`CIRCLE_WORKFLOW_ID`'
notes %|(**String**) A unique identifier for the workflow instance of the current job. This identifier is the same for every job in a given workflow instance.|
end
entry do
name '`CIRCLE_WORKFLOW_WORKSPACE_ID`'
notes %|(**String**) An identifier for the workspace of the current job. This identifier is the same for every job in a given workflow.|
end
entry do
name '`CIRCLE_WORKING_DIRECTORY`'
notes %|(**String**) The value of the working_directory key of the current job.|
end
end
category do
id 'Pipeline Variables'
entry do
name '`pipeline.id`'
notes %|(**String**) A globally unique id representing for the pipeline.|
end
entry do
name '`pipeline.number`'
notes %|(**Integer**) A project unique integer id for the pipeline.|
end
entry do
name '`pipeline.project.git_url`'
notes %|(**String**) The URL where the current project is hosted. For example, https://github.com/circleci/circleci-docs.|
end
entry do
name '`pipeline.project.type`'
notes %|(**String**) The lower-case name of the VCS provider, E.g. “github”, “bitbucket”.|
end
entry do
name '`pipeline.git.tag`'
notes %|(**String**) The name of the git tag that was pushed to trigger the pipeline. If the pipeline was not triggered by a tag, then this is the empty string.|
end
entry do
name '`pipeline.git.branch`'
notes %|(**Integer**) The name of the git branch that was pushed to trigger the pipeline.|
end
entry do
name '`pipeline.git.revision`'
notes %|(**Integer**) The long (40-character) git SHA that is being built.|
end
entry do
name '`pipeline.git.base_revision`'
notes %|(**String**) The long (40-character) git SHA of the build prior to the one being built. Note: While in most cases pipeline.git.base_revision will be the SHA of the pipeline that ran before your currently running pipeline, there are some caveats. When the build is the first build for a branch, the variable will not be present. In addition, if the build was triggered via the API, the variable will not be present.|
end
entry do
name '`pipeline.in_setup`'
notes %|(**Boolean**) True if the pipeline is in the setup phase, i.e. running a setup workflow.|
end
entry do
name '`pipeline.trigger_source`'
notes %|(**String**) The source that triggers the pipeline, current values are webhook, api, scheduled_pipeline.|
end
entry do
name '`pipeline.schedule.name`'
notes %|(**String**) The name of the schedule if it is a scheduled pipeline. Value will be empty string if the pipeline is triggered by other sources.|
end
entry do
name '`pipeline.schedule.id`'
notes %|(**String**) The unique id of the schedule if it is a scheduled pipeline. Value will be empty string if the pipeline is triggered by other sources.|
end
end
end