forked from k-space/kube
		
	rosdump: git commit logic + image expectations
This commit is contained in:
		| @@ -4,7 +4,7 @@ metadata: | |||||||
|   name: rosdump-config |   name: rosdump-config | ||||||
| data: | data: | ||||||
|   script.sh: | |   script.sh: | | ||||||
|     #!/bin/bash |     #!/bin/sh | ||||||
|     set -e |     set -e | ||||||
|     mkdir -p /root/.ssh |     mkdir -p /root/.ssh | ||||||
|     cp /config/ssh_identity /root/.ssh/id_ecdsa |     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 |         ssh rosdump@$target '/export' | grep -v '^# serial number =' | grep -v '^#.* by RouterOS' > $target | ||||||
|         git add $target |         git add $target | ||||||
|     done |     done | ||||||
|     if git status --porcelain; then |     if git status --porcelain | read; then | ||||||
|       echo "Attempting Git check in" |       echo "Attempting Git check in" | ||||||
|       git commit -m "$(git diff --cached --shortstat)" |       git commit -m "$(git diff --cached --shortstat)" | ||||||
|       git push |       git push | ||||||
| @@ -63,9 +63,9 @@ spec: | |||||||
|           restartPolicy: OnFailure |           restartPolicy: OnFailure | ||||||
|           containers: |           containers: | ||||||
|           - name: rosdump |           - name: rosdump | ||||||
|             image: mirror.gcr.io/codemowers/git |             image: mirror.gcr.io/alpine/git | ||||||
|             imagePullPolicy: IfNotPresent |             imagePullPolicy: IfNotPresent | ||||||
|             args: |             command: | ||||||
|               - sh |               - sh | ||||||
|               - /config/script.sh |               - /config/script.sh | ||||||
|             volumeMounts: |             volumeMounts: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user