pipelines
Pipeline
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
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 |
|
build_number
property
The pipeline build number
build_seconds_used
property
The pipeline duration in seconds
completed_on
property
The pipeline completion time
created_on
property
The pipeline creation time
pullrequest
property
Returns a PullRequest object if the pipeline was triggered by a pull request, else None
uuid
property
The pipeline uuid
step(uuid)
Get a specific pipeline step with the uuid.
:return: The requested pipeline step objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid%7D/steps/%7Bstep_uuid%7D#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
175 176 177 178 179 180 181 182 183 |
|
steps()
Get the pipeline steps.
:return: A generator for the pipeline steps objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid%7D/steps/#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
162 163 164 165 166 167 168 169 170 171 172 173 |
|
stop()
Stop the pipeline
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid%7D/stopPipeline#post
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
154 155 156 157 158 159 160 |
|
Pipelines
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
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 |
|
each(q=None, sort=None)
Returns the list of pipelines in this repository.
:param q: string: Query string to narrow down the response. See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details. :param sort: string: Name of a response property to sort results. See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
:return: A generator for the Pipeline objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
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 |
|
get(uuid)
Returns the pipeline with the uuid in this repository.
:param uuid: string: The requested pipeline uuid
:return: The requested Pipeline objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid%7D#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
92 93 94 95 96 97 98 99 100 101 102 |
|
trigger(branch='master', type='custom', commit=None, pattern=None, variables=None)
Trigger a new pipeline. The following options are possible (1 and 2 trigger the pipeline that the branch is associated with in the Pipelines configuration):
- Latest revision of a branch (specify
branch
) - Specific commit on a branch (additionally specify
commit
) - Specific pipeline (additionally specify
pattern
.commit
is optional here)
Variables have to be a list of dictionaries:
{ "key": "var1key", "value": "var1value", "secured": true },
:return: The initiated Pipeline object
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/#post
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
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 |
|
Step
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
|
completed_on
property
The step end time
duration_in_seconds
property
The step duration in seconds
run_number
property
The run number
script_commands
property
The step script commands
setup_commands
property
The step setup commands
started_on
property
The step start time
state
property
The step state
uuid
property
The step uuid
log(start=None, end=None)
Returns the log content in the given range.
:param start: int: The start of the range. First element is 0. :param end: int: The end of the range, must be greater than start.
:return: The byte representation of the log or if range is given a tuple with the overall size and the byte representation of the requested range.
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid%7D/steps/%7Bstep_uuid%7D/log#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/pipelines.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
|