-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:xtuml/erebus into 22-test-workflowy…
…ml-needs-repo-references-updating-to-open-source
- Loading branch information
Showing
2 changed files
with
25 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,41 @@ | ||
#!/bin/sh | ||
|
||
# test event generator | ||
# Set janus (test-event-generator) version tag | ||
export janus_tag=v1.0.0 | ||
|
||
# clone janus repo | ||
cd /tmp/ | ||
if git clone git@github.com:SmartDCSITlimited/test-event-generator.git; then | ||
if git clone https://github.com/xtuml/janus.git; then | ||
ERROR="" | ||
else | ||
ERROR="$(git clone git@github.com:SmartDCSITlimited/test-event-generator.git 2>&1 1>/dev/null)" | ||
ERROR="$(git clone https://github.com/xtuml/janus.git 2>&1 1>/dev/null)" | ||
fi | ||
|
||
# check if clone was successful | ||
if [ -z "$ERROR" ]; then | ||
echo "test-event-generator cloned successfully" | ||
echo "janus (test-event-generator) cloned successfully" | ||
else | ||
if [ "$ERROR" == *"fatal: Could not read from remote repository"* ]; then | ||
echo "test-event-generator clone failed functionality will not be present in Test Harness.\nIf this is not expected get ssh access to rhe repository:\ngit@github.com:SmartDCSITlimited/test-event-generator.git\n" | ||
echo "janus (test-event-generator) clone failed functionality will not be present in Test Harness." | ||
exit 0 | ||
else | ||
>&2 echo "test-event-generator clone failed with error message:\n$ERROR" | ||
>&2 echo "janus (test-event-generator) clone failed with error message:\n$ERROR" | ||
exit 1 | ||
fi | ||
fi | ||
# fail if anything errors | ||
|
||
# fail if errors are encountered | ||
set -e | ||
cd test-event-generator | ||
|
||
# navigate to cloned repo and checkout specified version | ||
cd janus | ||
git fetch --all --tags | ||
git checkout tags/v1.0.0 -b latest | ||
git checkout tags/$janus_tag -b latest | ||
|
||
# install dependencies and the package | ||
pip install -r requirements.txt | ||
pip install . | ||
|
||
# clean up | ||
cd .. | ||
rm -f -r test-event-generator/ | ||
rm -f -r janus/ |