new implementation for git pull#218
Merged
pvizeli merged 9 commits intoJan 11, 2018
Merged
Conversation
Contributor
lazytesting
commented
Dec 31, 2017
- Backup of files before clearing the /config folder
- Copy back all non YAML files and the secrets.yaml after the git clone
- More verbose error handling. Also logging the GIT exceptions.
- Splitted code out into functions
- Check SSH connection before setting the key
|
Hi @lazytesting, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
Contributor
Author
|
build is failing on apt-get, I did a quick investigation and it seems to be related to this issue: travis-ci/travis-ci#4838 |
pvizeli
reviewed
Jan 2, 2018
| echo "[Info] cleanup config folder and clone from repositorie" | ||
| rm -rf /config/.[!.]* /config/* 2&> /dev/null | ||
| # create backup | ||
| BACKUP_LOCATION="./tmp/config-$(date +%Y-%m-%d_%H-%M-%S)" |
| echo "Backup configuration to $BACKUP_LOCATION" | ||
|
|
||
| mkdir "${BACKUP_LOCATION}" || { echo "[Error] Creation of backup directory failed"; exit 1; } | ||
| cp -rf config/* "${BACKUP_LOCATION}" || { echo "[Error] Copy files to backup directory failed"; exit 1; } |
| cp -rf config/* "${BACKUP_LOCATION}" || { echo "[Error] Copy files to backup directory failed"; exit 1; } | ||
|
|
||
| # remove config folder content | ||
| rm -rf config/{,.[!.],..?}* || { echo "[Error] Clearing /config failed"; exit 1; } |
| echo "[Info] disable StrictHostKeyChecking for ssh" | ||
|
|
||
| echo "Host *" > ~/.ssh/config | ||
| echo " StrictHostKeyChecking no" >> ~/.ssh/config |
Member
There was a problem hiding this comment.
(
echo "xy"
echo "z"
) > ~/.ssh/config
Member
|
Good work 👍 Please use absolut path over all. |
Contributor
Author
|
thanks @pvizeli ! Will implement your PR comments and test it ASAP. Do you have an idea how to fix the CI tests? |
Member
|
I need rebase you branch with last master |
Member
|
Please address the lint issue |
pvizeli
approved these changes
Jan 11, 2018
Member
|
Good work 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.