-
Notifications
You must be signed in to change notification settings - Fork 1
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
San 5253 no dockerfile error #1849
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,13 @@ function BuildLogsController( | |
$rootScope, | ||
$timeout, | ||
errs, | ||
keypather, | ||
launchDebugContainer, | ||
loading, | ||
updateInstanceWithNewBuild, | ||
primus, | ||
promisify, | ||
fetchRepoDockerfile, | ||
streamingLog | ||
) { | ||
var BLC = this; | ||
|
@@ -27,10 +29,19 @@ function BuildLogsController( | |
BLC.failReason = buildError.message || 'failed'; | ||
BLC.showDebug = true; | ||
BLC.buildLogsRunning = false; | ||
BLC.showNoDockerfileError = (BLC.instance.hasDockerfileMirroring() && BLC.instance.mirroredDockerfile === null); | ||
if (status === 'neverStarted') { | ||
BLC.showErrorPanel = true; | ||
} | ||
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'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm... this code only works as expected because of this kirk:
|
||
if (!!dockerfilePath) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for the |
||
fetchRepoDockerfile(repoName, branchName, dockerfilePath) | ||
.then(function (dockerfile) { | ||
BLC.showNoDockerfileError = (BLC.instance.hasDockerfileMirroring() && dockerfile.message === 'Not Found'); | ||
}); | ||
} | ||
} else if (status === 'building') { | ||
BLC.buildStatus = 'running'; | ||
BLC.buildLogsRunning = true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're 100% the
path
has a/
a the end, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make a difference? I'm assuming there is nothing at the end, usually it is just repo/branch