Add a script to allow more users to easily upload artifacts
This makes it so that anyone with access to buildkite can upload an
artifact to the build server. Existing protections entail:
1. Doesn't allow users to run this against anything other than the
master branch.
2. Does not allow overwriting existing files.
3. Does not touch files outside of the
/data/files/frc971/Build-Dependencies/ directory.
Certainly no riskier than our regular CI at this stage.
This does cause a surprising amount of disk usage on the software971
server, due to bazel it extracting the amd64 toolchains.
Steps required to get this set up were:
1. Install the buildkite-agent apt package.
2. Configure the token in /buildkite/buildkite-agent.cfg, and set
queue=deploy.
3. Start the buildkite-agent service.
4. Add the buildkite-agent user to the www-data group.
5. Add a new gerrit public key for the buildkite user corresponding to
the new agent.
6. Set up the https://buildkite.com/spartan-robotics/deploy-artifact
pipeline.
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
Change-Id: I89416d23e8d75102314c7aa1dbe8b9fd64f4f762
diff --git a/tools/python/requirements.lock.txt b/tools/python/requirements.lock.txt
index 7470cae..a8a8f4d 100644
--- a/tools/python/requirements.lock.txt
+++ b/tools/python/requirements.lock.txt
@@ -612,6 +612,10 @@
--hash=sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc \
--hash=sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8
# via requests
+validators==0.22.0 \
+ --hash=sha256:61cf7d4a62bbae559f2e54aed3b000cea9ff3e2fdbe463f51179b92c58c9585a \
+ --hash=sha256:77b2689b172eeeb600d9605ab86194641670cdb73b60afd577142a9397873370
+ # via -r tools/python/requirements.txt
watchdog==2.1.9 \
--hash=sha256:083171652584e1b8829581f965b9b7723ca5f9a2cd7e20271edf264cfd7c1412 \
--hash=sha256:117ffc6ec261639a0209a3252546b12800670d4bf5f84fbd355957a0595fe654 \
diff --git a/tools/python/requirements.txt b/tools/python/requirements.txt
index 3b3ab3a..0a5f24a 100644
--- a/tools/python/requirements.txt
+++ b/tools/python/requirements.txt
@@ -12,6 +12,7 @@
requests
scipy
shapely
+validators
yapf
# TODO(phil): Migrate to absl-py. These are abandoned as far as I can tell.
diff --git a/tools/python/whl_overrides.json b/tools/python/whl_overrides.json
index 108a544..6cb9998 100644
--- a/tools/python/whl_overrides.json
+++ b/tools/python/whl_overrides.json
@@ -143,6 +143,10 @@
"sha256": "47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc",
"url": "https://software.frc971.org/Build-Dependencies/wheelhouse/urllib3-1.26.13-py2.py3-none-any.whl"
},
+ "validators==0.22.0": {
+ "sha256": "61cf7d4a62bbae559f2e54aed3b000cea9ff3e2fdbe463f51179b92c58c9585a",
+ "url": "https://software.frc971.org/Build-Dependencies/wheelhouse/validators-0.22.0-py3-none-any.whl"
+ },
"watchdog==2.1.9": {
"sha256": "4f4e1c4aa54fb86316a62a87b3378c025e228178d55481d30d857c6c438897d6",
"url": "https://software.frc971.org/Build-Dependencies/wheelhouse/watchdog-2.1.9-py3-none-manylinux2014_x86_64.whl"