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

wait for fauna to come up for integ tests #369

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions concourse/scripts/wait-for-it.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
attempt_counter=0
max_attempts=100

echo "waiting for $1"
until $(curl -m 1 --output /dev/null --silent --head --fail $1); do
if [ ${attempt_counter} -eq ${max_attempts} ];then
echo ""
echo "Max attempts reached to $1"
exit 1
fi

printf '.'
attempt_counter=$(($attempt_counter+1))
sleep 5
done
echo "$1 is up and running!"
32 changes: 28 additions & 4 deletions concourse/tasks/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ services:
volumes:
- "../../:/tmp/app"
working_dir: "/tmp/app"
command: [sh, -c, "ls -la && sbt ++2.11.12 -Dsbt.supershell=false test"]
command:
- sh
- -c
- |
ls -la
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ls -la

concourse/scripts/wait-for-it.sh http://faunadb:8443/ping
sbt ++2.11.12 -Dsbt.supershell=false test

tests-jdk-11-scala-2.12:
environment:
Expand All @@ -38,7 +44,13 @@ services:
volumes:
- "../../:/tmp/app"
working_dir: "/tmp/app"
command: [sh, -c, "ls -la && sbt ++2.12.14 -Dsbt.supershell=false test"]
command:
- sh
- -c
- |
ls -la
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ls -la

concourse/scripts/wait-for-it.sh http://faunadb:8443/ping
sbt ++2.12.14 -Dsbt.supershell=false test

tests-oracle-jdk-11-scala-2.11:
environment:
Expand All @@ -56,7 +68,13 @@ services:
volumes:
- "../../:/tmp/app"
working_dir: "/tmp/app"
command: [sh, -c, "ls -la && sbt ++2.11.12 -Dsbt.supershell=false test"]
command:
- sh
- -c
- |
ls -la
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ls -la

concourse/scripts/wait-for-it.sh http://faunadb:8443/ping
sbt ++2.11.12 -Dsbt.supershell=false test

tests-oracle-jdk-11-scala-2.12:
environment:
Expand All @@ -74,4 +92,10 @@ services:
volumes:
- "../../:/tmp/app"
working_dir: "/tmp/app"
command: [sh, -c, "ls -la && sbt ++2.12.14 -Dsbt.supershell=false test"]
command:
- sh
- -c
- |
ls -la
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ls -la

concourse/scripts/wait-for-it.sh http://faunadb:8443/ping
sbt ++2.12.14 -Dsbt.supershell=false test