-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add canary test in workflow * Use latedst version of docker-hadoop submodule * Schedule Canary Test to Run Weekly --------- Co-authored-by: Mohamadamin Karami <[email protected]>
- Loading branch information
1 parent
98c3366
commit 2a3f487
Showing
3 changed files
with
89 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Canary Test | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # Run every Sunday at midnight | ||
|
||
jobs: | ||
run-containers-and-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Run Containers | ||
run: | | ||
cd docker-hadoop | ||
chmod +x ./setup-compose.sh | ||
./setup-compose.sh | ||
echo "Waiting for namenode to be ready..." | ||
max_attempts=10 | ||
attempt_num=1 | ||
until docker exec namenode curl -sf http://localhost:9870 || [ "$attempt_num" -gt "$max_attempts" ]; do | ||
echo "namenode is not ready yet. Retrying in 5 seconds..." | ||
sleep 5 | ||
attempt_num=$((attempt_num + 1)) | ||
done | ||
if [ "$attempt_num" -le "$max_attempts" ]; then | ||
echo "namenode is ready." | ||
else | ||
echo "namenode did not become ready in time." | ||
exit 1 | ||
fi | ||
- name: Run tests | ||
run: | | ||
# Run the commands now that namenode is ready | ||
docker exec nodemanager1 /bin/sh -c "cd \$DISH_TOP && hdfs dfs -put README.md /README.md" | ||
docker exec nodemanager1 /bin/sh -c "cd \$DISH_TOP && ./di.sh ./scripts/sample.sh" |
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
Submodule docker-hadoop
updated
3 files
+7 −7 | docker-compose.yml | |
+23 −7 | setup-compose.sh | |
+2 −1 | stop-compose.sh |