Open
Conversation
added 2 commits
October 17, 2016 13:50
thejsj
requested changes
Nov 28, 2016
| var repoName = repoAndBranchName[0]; | ||
| var branchName = repoAndBranchName[1]; | ||
| var dockerfilePath = keypather.get(BLC, 'instance.mirroredDockerfile.attrs.path') + keypather.get(BLC, 'instance.mirroredDockerfile.attrs.name'); | ||
| if (!!dockerfilePath) { |
Member
There was a problem hiding this comment.
No need for the !!. We don't use this convention anywhere for if statements, since the result is exactly the same.
| var repoAndBranchName = BLC.instance.getRepoAndBranchName().split('/'); | ||
| var repoName = repoAndBranchName[0]; | ||
| var branchName = repoAndBranchName[1]; | ||
| var dockerfilePath = keypather.get(BLC, 'instance.mirroredDockerfile.attrs.path') + keypather.get(BLC, 'instance.mirroredDockerfile.attrs.name'); |
Member
There was a problem hiding this comment.
We're 100% the path has a / a the end, right?
Contributor
Author
There was a problem hiding this comment.
Would it make a difference? I'm assuming there is nothing at the end, usually it is just repo/branch
| var repoAndBranchName = BLC.instance.getRepoAndBranchName().split('/'); | ||
| var repoName = repoAndBranchName[0]; | ||
| var branchName = repoAndBranchName[1]; | ||
| var dockerfilePath = keypather.get(BLC, 'instance.mirroredDockerfile.attrs.path') + keypather.get(BLC, 'instance.mirroredDockerfile.attrs.name'); |
Member
There was a problem hiding this comment.
Hmm... this code only works as expected because of this kirk: !!(null + null), right? Seems like we should be checking for these properties individually?
var dockerfilePath = keypather.get(BLC, 'instance.mirroredDockerfile.attrs.path');
var dockerfileName = keypather.get(BLC, 'instance.mirroredDockerfile.attrs.name');
if (dockerfilePath && dockerfileName) {
fetchRepoDockerfile(repoName, branchName, dockerfilePath + dockerfileName) // ???
}
added 2 commits
January 16, 2017 10:39
thejsj
approved these changes
Jan 16, 2017
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.
This PR will display a dockerfile error message in the case that a user has a dockerfile in their master branch, but no dockerfile in a feature branch. If the user tries to deploy that branch, the build will error out but will give no indication as to why.
Test included to verify that an instance w/ a dockerfile configured, but no dockerfile capable of being fetched by repo/branchname, will show the showNoDockerfileError in the UI.