From 4f3a9058f922b16d61061e0256d819cfdcd8ea78 Mon Sep 17 00:00:00 2001 From: rasmus Date: Wed, 30 Jul 2025 16:16:41 +0300 Subject: [PATCH] rosdump: git commit logic + image expectations --- rosdump/application.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rosdump/application.yml b/rosdump/application.yml index ffcfdbf..5bf2f84 100644 --- a/rosdump/application.yml +++ b/rosdump/application.yml @@ -4,7 +4,7 @@ metadata: name: rosdump-config data: script.sh: | - #!/bin/bash + #!/bin/sh set -e mkdir -p /root/.ssh cp /config/ssh_identity /root/.ssh/id_ecdsa @@ -28,7 +28,7 @@ data: ssh rosdump@$target '/export' | grep -v '^# serial number =' | grep -v '^#.* by RouterOS' > $target git add $target done - if git status --porcelain; then + if git status --porcelain | read; then echo "Attempting Git check in" git commit -m "$(git diff --cached --shortstat)" git push @@ -63,9 +63,9 @@ spec: restartPolicy: OnFailure containers: - name: rosdump - image: mirror.gcr.io/codemowers/git + image: mirror.gcr.io/alpine/git imagePullPolicy: IfNotPresent - args: + command: - sh - /config/script.sh volumeMounts: