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

Fetching the test reporter and calling before-build is failing again #416

Open
sprasad09 opened this issue Jan 24, 2020 · 3 comments
Open
Assignees

Comments

@sprasad09
Copy link

Hi Folks,

We are experiencing this issue again. This issue was originally posted here:
Originally posted by @efueger in #396 (comment)

We have a dockerfile (actually over 100) with these lines

# Fetch code climate binary
RUN curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
RUN chmod +x ./cc-test-reporter
# Notify code climate a build is starting
RUN ./cc-test-reporter before-build
RUN npm run lint && npm run test-coverage

I'm all of a sudden getting this error when trying to deploy my app.

Step 18/35 : RUN ./cc-test-reporter before-build
---> Running in 7c747687630e
./cc-test-reporter: line 1: can't open html: no such file
./cc-test-reporter: line 2: syntax error: unexpected redirection
The command '/bin/sh -c ./cc-test-reporter before-build' returned a non-zero code: 2
make: *** [build] Error 2

Could you please look into this again. This is blocker for devs right now.

@TheHenrick
Copy link

@sprasad09 was this resolved for you? I just ran into the same issue.

@patmacpherson-sc
Copy link

We hit the same issue. The HTTP call in the CURL command is failing, and your ./cc-test-reporter binary file will actually just contain HTML text.

To fix - rebuild your image, and probably add some error checking.

So instead of getting the binary file, running cat ./cc-test-reporter will show-

<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
</body>
</html>

If you saved this text into a different file, and marked the file as executable, what would happen if you executed it?

~ % chmod 755 my-html-binary
~ % ./my-html-binary
./20220303test: line 1: syntax error near unexpected token `newline'
./20220303test: line 1: `<html>'

@rlarner-quizlet
Copy link

I ran into this and it appears the problem is we were downloading an older version (0.9) of the cc-test-reporter. Switching to latest fixed it.

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

5 participants