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

Fixes #11 - Update sonar.sh to fail if rhc port-forward fails #20

Merged
merged 4 commits into from
Feb 10, 2015

Conversation

luan-cestari
Copy link
Collaborator

More info #11


# wait a bit for port forwarding to fire up
sleep 10

# if the file exists, log the error and exit 1
if [ -f "rhc-port-forward-status" ]
Copy link
Member

Choose a reason for hiding this comment

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

This check can come before the sleep 10 above so the script fails faster.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we should do that as the '&' would make the process run asynchronously in background , which it can take some time even to connect to the openshift, so the rhc command could not make the result in time to the if statement gives the right/expected output

Copy link
Member

Choose a reason for hiding this comment

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

Good point, thank you.

@luan-cestari
Copy link
Collaborator Author

Updated the commented line

@jewzaam
Copy link
Member

jewzaam commented Feb 10, 2015

Two things to clean up:

  • please add rhc-port-forward-status to .gitignore
  • please rm rhc-port-forward-status before exiting the process

The etc/sonar.sh will try to remove the file it created before it exit. .gitignore was also updated to ignore the mark file
@luan-cestari
Copy link
Collaborator Author

Let me know if I can make the change across the other repositories

jewzaam added a commit that referenced this pull request Feb 10, 2015
Fixes #11 - Update sonar.sh to fail if rhc port-forward fails
@jewzaam jewzaam merged commit 2aa3b74 into lightblue-platform:master Feb 10, 2015
@jewzaam
Copy link
Member

jewzaam commented Feb 10, 2015

Go for it. Should be an exact copy of this script (plus .gitignore updates) right?

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.

None yet

2 participants