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

service hash changes for every deploy (when fetching from git) #close 379 #482

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

krhubert
Copy link
Contributor

Fix for #379


// XXX: remove .git folder from repo.
// It makes docker build iamge id same between repo clones.
if err := os.RemoveAll(filepath.Join(path, ".git")); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can have a slice const at the top to specify folders that needs to be deleted for different version control systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only support git right now, discussion about different system etc should be continued in another issue

@antho1404
Copy link
Member

For information, the problem really comes from git when git is creating the HEAD, it looks like it create it based on the time of the clone.

We could maybe delete the HEAD or something like that but deleting the git is totally fine.

➜  core git:(fix/service-id-change) ✗ diff -r service-webhook service-webhook2
Binary files service-webhook/.git/index and service-webhook2/.git/index differ
diff -r service-webhook/.git/logs/HEAD service-webhook2/.git/logs/HEAD
1c1
< 0000000000000000000000000000000000000000 a807ebb2a975748f759c76410e95730c97456e0b Anthony ESTEBE <[email protected]> 1537452020 +0700	clone: from https://github.com/mesg-foundation/service-webhook
---
> 0000000000000000000000000000000000000000 a807ebb2a975748f759c76410e95730c97456e0b Anthony ESTEBE <[email protected]> 1537452038 +0700	clone: from https://github.com/mesg-foundation/service-webhook
diff -r service-webhook/.git/logs/refs/heads/master service-webhook2/.git/logs/refs/heads/master
1c1
< 0000000000000000000000000000000000000000 a807ebb2a975748f759c76410e95730c97456e0b Anthony ESTEBE <[email protected]> 1537452020 +0700	clone: from https://github.com/mesg-foundation/service-webhook
---
> 0000000000000000000000000000000000000000 a807ebb2a975748f759c76410e95730c97456e0b Anthony ESTEBE <[email protected]> 1537452038 +0700	clone: from https://github.com/mesg-foundation/service-webhook
diff -r service-webhook/.git/logs/refs/remotes/origin/HEAD service-webhook2/.git/logs/refs/remotes/origin/HEAD
1c1
< 0000000000000000000000000000000000000000 a807ebb2a975748f759c76410e95730c97456e0b Anthony ESTEBE <[email protected]> 1537452020 +0700	clone: from https://github.com/mesg-foundation/service-webhook
---
> 0000000000000000000000000000000000000000 a807ebb2a975748f759c76410e95730c97456e0b Anthony ESTEBE <[email protected]> 1537452038 +0700	clone: from https://github.com/mesg-foundation/service-webhook

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

Successfully merging this pull request may close these issues.

4 participants