Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure BUILD_ROOT empty before actual check out during pre-receive #106

Open
duyleekun opened this issue Nov 20, 2018 · 2 comments
Open

Comments

@duyleekun
Copy link

For some reason, while executing pre-receive, my BUILD_ROOT dir isn't empty. My guess is that the hook doesn't always execute at the end rm -rf $BUILD_ROOT and the git archive $DEPLOY_NEWREV | tar -x -C $BUILD_ROOT doesn't perform any clean up.

@tirumaraiselvan
Copy link
Collaborator

tirumaraiselvan commented Nov 21, 2018

Does this happen for each push? Does this happen even if you delete the gitkubed pod from the kube-system namespace (hence creating a new pod) ?

@duyleekun
Copy link
Author

Once it's not clean, subsequent failed push won't clear the file (it's failed because of that not deleted file)

I resolve it by exec into the gitkube pod directly and rm the directory. Next time, I will delete the pod instead

Although It's not directly related to this issue, but my guess about failure reason to rm -rf $BUILD_ROOT is following error I got from time to time. Retry the push resolve the error.

remote: Updating Kubernetes deployment: appworker
remote: deployment "appworker" image updated
remote: Waiting for rollout to finish: 1 old replicas are pending termination...
remote: 
remote: 
remote: Updating deployment failed: mofferworker 
remote:   $ Check deployment logs 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants