rosdump: git commit logic + image expectations
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user