GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-gitlab/docs/gl_objects/builds.py at master · matejzero/python-gitlab

Expand file tree

/

builds.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
103 lines (82 loc) · 1.88 KB
/

builds.py

Copy path

File metadata and controls

103 lines (82 loc) · 1.88 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# var list
p_variables = project.variables.list()
g_variables = group.variables.list()
# end var list
# var get
p_var = project.variables.get(var_key)
g_var = group.variables.get(var_key)
# end var get
# var create
var = project.variables.create({'key': 'key1', 'value': 'value1'})
var = group.variables.create({'key': 'key1', 'value': 'value1'})
# end var create
# var update
var.value = 'new_value'
var.save()
# end var update
# var delete
project.variables.delete(var_key)
group.variables.delete(var_key)
# or
var.delete()
# end var delete
# trigger list
triggers = project.triggers.list()
# end trigger list
# trigger get
trigger = project.triggers.get(trigger_token)
# end trigger get
# trigger create
trigger = project.triggers.create({})
# end trigger create
# trigger delete
project.triggers.delete(trigger_token)
# or
trigger.delete()
# end trigger delete
# list
builds = project.builds.list() # v3
jobs = project.jobs.list() # v4
# end list
# commit list
# v3 only
commit = gl.project_commits.get(commit_sha, project_id=1)
builds = commit.builds()
# end commit list
# get
project.builds.get(build_id) # v3
project.jobs.get(job_id) # v4
# end get
# artifacts
build_or_job.artifacts()
# end artifacts
# stream artifacts
class Foo(object):
def __init__(self):
self._fd = open('artifacts.zip', 'wb')
def __call__(self, chunk):
self._fd.write(chunk)
target = Foo()
build_or_job.artifacts(streamed=True, action=target)
del(target) # flushes data on disk
# end stream artifacts
# keep artifacts
build_or_job.keep_artifacts()
# end keep artifacts
# trace
build_or_job.trace()
# end trace
# retry
build_or_job.cancel()
build_or_job.retry()
# end retry
# erase
build_or_job.erase()
# end erase
# play
build_or_job.play()
# end play
# trigger run
project.trigger_build('master', trigger_token,
{'extra_var1': 'foo', 'extra_var2': 'bar'})
# end trigger run
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.