Add docker image for uploading a file to gcp
All checks were successful
Build Docker Image / nomad-scale (push) Successful in 11s
Build Docker Image / ceph-rbd-backup (push) Successful in 26s
Build Docker Image / gcp-backup-upload (push) Successful in 5m2s

This commit is contained in:
Lol3rrr
2026-10-03 14:25:27 +02:00
parent 04d56ca7a5
commit 505e5c4cdb
4 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
FROM google/cloud-sdk:587.0.0
COPY script.sh /script.sh
ENTRYPOINT ["/bin/bash", "/script.sh"]

View File

@@ -0,0 +1,9 @@
# GCP-Backup-Upload
## Environment Variables
| Name | Default | Description |
|---|---|---|
| FILE_TO_TRIGGER | - | TODO |
| FILE_TO_BACKUP | - | TODO |
| BUCKET_URL | - | TODO |
| GCLOUD_KEY_FILE | - | TODO |

View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -euo pipefail
until [ -f ${FILE_TO_TRIGGER} ]
do
sleep 5
done
gcloud auth activate-service-account --key-file ${GCLOUD_KEY_FILE};
gcloud storage cp ${FILE_TO_BACKUP} ${BUCKET_URL}/;