-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an alternative error message to curl command
This work was triggered by KFLUXBUGS-1285. User was trying to use dockerfile from an url, but it was failing for a uknown reason and there was not any information as to why it might be failing. It only showed the last successful log: "Fetch Dockerfile from <URL>". The true reason behind that failure is that the user was trying to fetch the Dockerfile from an internal gitlab. To be able to connect to that instance, a certificate issued by Red Hat is needed. In that particular case it was not provided, so the curl command that was fetching the Dockerfile failed "violently" instead of returning any http code. When this failed (returned an error code) the task failed immediately due to our setup - we are using "set -e". This commit makes sure that at least some message is returned. The "exit 1" is also added. Without it, the code would now not try to quit immediately, but would try to check the http response code and would return nonsensical results such as: "No Dockerfile is fetched. Server responds 000" Signed-off-by: mkosiarc <mkosiarc@redhat.com>
- Loading branch information
Showing
4 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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