-
Notifications
You must be signed in to change notification settings - Fork 48
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
Swarm #394
Merged
Swarm #394
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
645b3fb
Basic Pubber Redirect (#376)
grafnu 6144588
Refactor pubber endpoint config (#377)
grafnu a2f1ac6
Blob config - add "applied" phase (#379)
johnrandolph a0216fa
gencode
grafnu 75b7ac3
Add simple redirect test
grafnu 8ef6e6a
Syntax fix
grafnu dbcc6b6
Fix timeout
grafnu 8657920
Fix testing
grafnu 2b48564
Tweaking pubber
grafnu cf74c61
Fix check
grafnu 2cd9314
Different device
grafnu 48eabc0
Fix logging
grafnu 05114c0
Fixing test condition
grafnu 5072ba1
Fix test
grafnu 96c36ba
Adding comments
grafnu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash -e | ||
|
||
ROOT_DIR=$(dirname $0)/.. | ||
cd $ROOT_DIR | ||
|
||
if [[ $# != 1 ]]; then | ||
echo Usage: $0 PROJECT_ID | ||
false | ||
fi | ||
|
||
project_id=$1 | ||
shift | ||
|
||
if [[ -n `which rot13` ]]; then | ||
# Project is provided as a secret, so obfuscate to prevent redactions in server-side logs. | ||
echo 'Using target project (rot13):' $(echo $project_id | rot13) | ||
else | ||
echo 'Using target project:' $project_id | ||
fi | ||
|
||
site_path=sites/udmi_site_model | ||
device_id=AHU-22 # Static device for testing. Needs to be different than other tests scripts so as not to conflict during CI. | ||
|
||
serial_no=sequencer-$RANDOM | ||
echo Using pubber with serial $serial_no | ||
|
||
PUBBER_OUT=pubber.out | ||
|
||
# Ideally use lock files, not grep-and-kill... | ||
pids=`ps ax | fgrep pubber | fgrep java | awk '{print $1}'` | ||
if [[ -n $pids ]]; then | ||
echo Killing pubber pids $pids | ||
kill $pids | ||
fi | ||
|
||
echo Writing pubber output to $PUBBER_OUT | ||
echo bin/pubber $site_path $project_id $device_id $serial_no | ||
|
||
result=0 | ||
timeout 5m bin/pubber $site_path $project_id $device_id $serial_no redirectRegistry=missing > $PUBBER_OUT 2>&1 || result=$? | ||
|
||
echo Pubber exit code $result |
Oops, something went wrong.
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.
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.
This should really be lock files etc instead of ps grepping.. at some point
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.
added TODO