Skip to content

Commit 37e74ae

Browse files
committed
feat(bind9): Add trace to git-ops script
ref: #21
1 parent 73d100d commit 37e74ae

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

manifests/bind9/components/git-ops/Deployment.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ spec:
1717
- sh
1818
- -c
1919
- |
20+
echo "Installing pre-reqs.....";
21+
2022
apk update;
2123
apk add git openssh-client-default;
2224
2325
KEY_FILE_NAME="~/.ssh/${SSH_REPOSITORY_OWNER}/${SSH_REPOSITORY_NAME}/deploy";
2426
27+
echo "Env var KEY_FILE_NAME=[${KEY_FILE_NAME}] setup";
28+
2529
echo ${SSH_PRIVATE_KEY} > ${SSH_REPOSITORY_NAME};
2630
2731
chmod 600 ${SSH_REPOSITORY_NAME};
@@ -30,16 +34,33 @@ spec:
3034
3135
while :; do
3236
37+
echo "Loop Start......";
38+
3339
if [ -d /git/.git ]; then
3440
35-
git clone -b master ${SSH_REPOSITORY_HOST}/${SSH_REPOSITORY_OWNER}/${SSH_REPOSITORY_NAME}.git /git;
41+
REPO_NAME_FULL="${SSH_REPOSITORY_HOST}/${SSH_REPOSITORY_OWNER}/${SSH_REPOSITORY_NAME}.git"
42+
43+
echo "Env var REPO_NAME_FULL=[${REPO_NAME_FULL}] setup";
44+
45+
echo "Clonning repo";
46+
47+
git clone -b master ${REPO_NAME_FULL} /git;
3648
3749
else
3850
51+
echo "********************************************";
52+
53+
git status;
54+
55+
echo "********************************************";
3956
cd /git;
4057
58+
echo "Checking for repo updates";
59+
4160
git fetch -fpvt;
4261
62+
echo "Pulling any changes....";
63+
4364
git pull --rebase
4465
4566
fi

0 commit comments

Comments
 (0)