Skip to content

Commit

Permalink
feat(requests): add build status count GET request script
Browse files Browse the repository at this point in the history
Added a new script to fetch the build status count from the API. This
script sends an HTTP GET request to the specified endpoint and includes
sample response headers and JSON data for reference.

The script will help in monitoring the build status and integrating
with other tools for continuous integration and deployment processes.
  • Loading branch information
WilsonNet committed Sep 12, 2024
1 parent f6e3e44 commit 8610500
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
2 changes: 0 additions & 2 deletions backend/kernelCI_app/views/treeDetailsView.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,4 @@ def get(self, request, commit_hash):

summary = self.create_summary(records)

print("Summary: ", summary)

return JsonResponse({"builds": records, "summary": summary}, safe=False)
33 changes: 33 additions & 0 deletions backend/requests/build-status-count-get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
http GET 'http://localhost:8000/api/build/kernelci:kernelci.org:666ce37cab1bab49d17e7074/status-count'
# HTTP/1.1 200 OK
# Content-Length: 625
# Content-Type: application/json
# Cross-Origin-Opener-Policy: same-origin
# Date: Thu, 25 Jul 2024 17:27:16 GMT
# Referrer-Policy: same-origin
# Server: WSGIServer/0.2 CPython/3.12.0
# Vary: origin
# X-Content-Type-Options: nosniff
# X-Frame-Options: DENY

# {
# "_timestamp": "2024-06-30T22:46:03.064Z",
# "architecture": "openrisc",
# "checkout_id": "0dayci:6681dfff2e96c85bf5ad3a7f",
# "command": null,
# "comment": null,
# "compiler": "gcc-13.2.0",
# "config_name": "allnoconfig",
# "config_url": null,
# "duration": null,
# "git_commit_hash": "22a40d14b572deb80c0648557f4bd502d7e83826",
# "git_commit_name": "v6.10-rc6",
# "git_repository_branch": "master",
# "git_repository_url": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git",
# "id": "0dayci:build:6681e0032e96c85bf5ad3a80",
# "log_url": null,
# "misc": null,
# "origin": "0dayci",
# "start_time": "2024-06-30T22:45:23.477Z",
# "valid": true
# }
2 changes: 0 additions & 2 deletions dashboard/src/components/Accordion/BuildAccordionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ const AccordionBuildContent = ({
}: IAccordionItems): JSX.Element => {
const { treeId } = useParams({ from: '/tree/$treeId/' });

console.log('oii', accordionData);

//TODO: Fix the typing for not using as
const contentData = accordionData as AccordionItemBuilds;

Expand Down

0 comments on commit 8610500

Please sign in to comment.