chnage authentication
This commit is contained in:
parent
afb9fe2235
commit
2bba510ad1
|
@ -1,10 +1,9 @@
|
||||||
from os import listdir, walk
|
from os import listdir
|
||||||
from os.path import exists, isfile, join, islink, isdir
|
from os.path import exists, isfile, join, islink, isdir
|
||||||
import requests
|
import requests
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
token = "abc"
|
|
||||||
request_data = {
|
request_data = {
|
||||||
"project": "testproject",
|
"project": "testproject",
|
||||||
"comments": "testcomment",
|
"comments": "testcomment",
|
||||||
|
@ -94,13 +93,13 @@ def _get_dockerfile_contents(jobname):
|
||||||
return res + dockerfile_extra_contents[os_codename]
|
return res + dockerfile_extra_contents[os_codename]
|
||||||
|
|
||||||
|
|
||||||
def trigger_child_hooks(buildbotUrl: str, repository, branch, directory=".buildbot", secret):
|
def trigger_child_hooks(buildbotUrl: str, repository, branch, directory=".buildbot"):
|
||||||
request_url = buildbotUrl + ty
|
request_url = buildbotUrl + ty
|
||||||
# List all jobs in the directory
|
# List all jobs in the directory
|
||||||
jobs = list_jobs(directory)
|
jobs = list_jobs(directory)
|
||||||
request_headers = {
|
request_headers = {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
'Authorization': f'token {secret}',
|
'X-Multibuild-Trigger': secret,
|
||||||
"Accept": "text/plain",
|
"Accept": "text/plain",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue