-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
95 additions
and
75 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xe | ||
poetry install | ||
poetry run -- mkdocs build |
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,6 +1,18 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
pkill clickhouse | ||
devenv up& | ||
|
||
devenv up & | ||
DEVENV_PID=$! | ||
export DEVENV_PID | ||
|
||
devenv_stop() { | ||
pkill -P "$DEVENV_PID" | ||
} | ||
|
||
trap devenv_stop EXIT | ||
|
||
timeout 20 bash -c 'until echo > /dev/tcp/localhost/9000; do sleep 0.5; done' | ||
sleep 2 | ||
|
||
clickhouse-client --query "SELECT 1" |
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,3 +1,4 @@ | ||
allowUnfree: true | ||
inputs: | ||
nixpkgs: | ||
url: github:NixOS/nixpkgs/nixpkgs-unstable |
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,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
env | grep FOO=1 | ||
env | grep BAR=1 | ||
env | grep BAZ=5 |
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,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ "$(uname -s)" == "Linux" ]; then | ||
devenv container shell | ||
devenv container processes | ||
|
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,3 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
gleam --version |
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,2 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
env | grep "FILE=1" | ||
env | grep "FOLDER=1" |
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,3 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
node -e "require('axios')" |
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,3 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
jsonnet --version |
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,8 +1,14 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
devenv up & | ||
DEVENV_PID=$! | ||
trap "pkill -P $DEVENV_PID" EXIT | ||
export DEVENV_PID | ||
|
||
devenv_stop() { | ||
pkill -P "$DEVENV_PID" | ||
} | ||
|
||
trap devenv_stop EXIT | ||
|
||
timeout 60 bash -c 'until MYSQL_PWD="" mysql -u root test_database < /dev/null; do sleep 0.5; done' |
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
mix local.hex --force | ||
mix local.rebar --force | ||
|
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
devenv up& | ||
timeout 20 bash -c 'until psql -c "SELECT 1" mydb; do sleep 0.5; done' |
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
devenv up & | ||
|
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -exu | ||
POETRY_VENV="$PWD/.venv" | ||
[ -d "$POETRY_VENV" ] | ||
|
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
python --version | grep "3.11.3" | ||
python -c "import requests;print(requests)" |
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
rails new blog -d=postgresql | ||
devenv up& | ||
|
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
cargo --version | ||
rustc --version | ||
|
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,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -ex | ||
bash-language-server --version | ||
bats --version | ||
|
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,3 +1,4 @@ | ||
allowUnfree: true | ||
inputs: | ||
nixpkgs: | ||
url: github:NixOS/nixpkgs/nixpkgs-unstable |
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,42 +1,32 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -x | ||
|
||
# Start the services in the background and store the PID | ||
echo "Starting temporal service..." | ||
devenv up & | ||
DEVENV_PID=$! | ||
export DEVENV_PID | ||
|
||
devenv_stop() { | ||
pkill -P "$DEVENV_PID" | ||
} | ||
|
||
trap devenv_stop EXIT | ||
|
||
export TEMPORAL_ADDRESS=127.0.0.1:17233 | ||
|
||
# temporal status and store its exit status | ||
check_temporal_status() { | ||
echo "Waiting for service to become available..." | ||
TEMPORAL_OUTPUT=$(temporal operator cluster health) | ||
TEMPORAL_EXIT_STATUS=$? | ||
} | ||
timeout 20 bash -c 'until echo > /dev/tcp/localhost/17233; do sleep 0.5; done' | ||
|
||
# Continuously check temporal status until it returns successfully (up to a maximum of 20 times) | ||
for i in $(seq 1 20); do | ||
check_temporal_status | ||
if [ $TEMPORAL_EXIT_STATUS -eq 0 ]; then | ||
echo "Service is up..." | ||
break | ||
else | ||
sleep 1 | ||
fi | ||
done | ||
sleep 1 | ||
|
||
if ! temporal operator cluster health; then | ||
echo "Temporal not started" | ||
exit 1 | ||
fi | ||
|
||
echo "Checking namespace..." | ||
temporal operator namespace describe mynamespace | ||
|
||
# Print the captured output when temporal status succeeds | ||
echo "Startup complete..." | ||
temporal operator cluster system | ||
echo "$TEMPORAL_OUTPUT" | ||
|
||
# Clean up by terminating all spawned processes | ||
pkill -P $DEVENV_PID | ||
wait $DEVENV_PID&>/dev/null | ||
|
||
# Exit the script | ||
exit $TEMPORAL_EXIT_STATUS | ||
echo "$TEMPORAL_OUTPUT" |
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 |
---|---|---|
@@ -1,37 +1,20 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
set -x | ||
|
||
# Start the services in the background and store the PID | ||
echo "Starting vault service..." | ||
devenv up& | ||
devenv up & | ||
DEVENV_PID=$! | ||
export DEVENV_PID | ||
|
||
# vault status and store its exit status | ||
check_vault_status() { | ||
echo "Waiting for service to become available..." | ||
VAULT_OUTPUT=$(vault status 2>&1) | ||
VAULT_EXIT_STATUS=$? | ||
# shellcheck disable=SC2317 # ShellCheck may incorrectly believe that code is unreachable if it's invoked by variable name or in a trap | ||
devenv_stop() { | ||
pkill -P "$DEVENV_PID" | ||
} | ||
|
||
# Continuously check vault status until it returns successfully (up to a maximum of 100 times) | ||
for i in $(seq 1 20); do | ||
check_vault_status | ||
if [ $VAULT_EXIT_STATUS -eq 0 ]; then | ||
echo "Service is up..." | ||
break | ||
else | ||
sleep 1 | ||
fi | ||
done | ||
trap devenv_stop EXIT | ||
|
||
# Print the captured output when vault status succeeds | ||
echo "Startup complete..." | ||
vault version | ||
echo "$VAULT_OUTPUT" | ||
timeout 20 bash -c 'until echo > /dev/tcp/localhost/8200; do sleep 0.5; done' | ||
|
||
# Clean up by terminating all spawned processes | ||
pkill -P $DEVENV_PID | ||
wait $DEVENV_PID &> /dev/null | ||
vault status | ||
|
||
# Exit the script | ||
exit $VAULT_EXIT_STATUS | ||
exit $? |
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,3 +1,4 @@ | ||
inputs: | ||
nixpkgs: | ||
url: github:NixOS/nixpkgs/nixpkgs-unstable | ||
allowUnfree: true |