buildkite / main.py
tonne's picture
Update buildkite
3285abc
raw
history blame contribute delete
No virus
728 Bytes
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)