Skip to content

Commit

Permalink
debug background bash job on appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
telamonian committed Apr 14, 2020
1 parent 67af6fb commit 6e71d84
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
7 changes: 4 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ install:
- ps: ci/create_os_share_windows.ps1

# set up a local s3_proxy server
- ps: Start-Job { bash -c "ci/s3_local.sh -d" }
- ps: bash -c "sleep 15"
- bash -c "ci/s3_local.sh"
- ps: Start-Process -FilePath "java" -ArgumentList "-jar","s3proxy","--properties","s3proxy.conf"
- bash -c "sleep 5"
- curl http://127.0.0.1:9000/

# install python deps
Expand All @@ -45,7 +46,7 @@ install:

test_script:
# uncomment to allow remote login to windows ci vm via rdp
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

# lint the python code
# - python -m flake8 jupyterfs setup.py
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ parameters:
type: stepList
default:
- bash: |
nohup ci/s3_local.sh -d
nohup ci/s3_local.sh -d -r
sleep 5
displayName: "Start up local S3 server"
Expand Down
13 changes: 9 additions & 4 deletions ci/s3_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ EOF

# parse opts
detach=
run=
OPTIND=1
while getopts hdtr opt; do
case $opt in
Expand All @@ -22,6 +23,8 @@ while getopts hdtr opt; do
;;
d) detach=-d
;;
r) run=-r
;;
*) show_help >&2
exit 1
;;
Expand Down Expand Up @@ -56,10 +59,12 @@ EOT
curl -L https://github.com/gaul/s3proxy/releases/download/s3proxy-${S3PROXY_VERSION}/s3proxy -o s3proxy

# run s3proxy as a background job
if [ "$detach" = "-d" ]; then
java -jar s3proxy --properties s3proxy.conf &
else
java -jar s3proxy --properties s3proxy.conf
if [ "$run" = "-r" ]; then
if [ "$detach" = "-d" ]; then
java -jar s3proxy --properties s3proxy.conf &
else
java -jar s3proxy --properties s3proxy.conf
fi
fi

# no explicit wait needed, azure already stalls
Expand Down

0 comments on commit 6e71d84

Please sign in to comment.