diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2016-03-14 13:42:10 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2016-04-19 13:54:19 +0200 |
commit | db01724fd969a7d01711e1b8e6f8d763873c9245 (patch) | |
tree | 340b9cbfef488a1cee417d83c2a872a093e31a6c | |
parent | bf6f7ad2974fc3088b2d9f3b0afe41febefbb209 (diff) | |
download | libgit2-db01724fd969a7d01711e1b8e6f8d763873c9245.tar.gz |
CI: start the proxy before the build so it's ready
It takes a bit for the propxy to get ready to accept connections, so
start it before the build so we can be reasonably sure that it's going
to be ready in time.
-rw-r--r-- | appveyor.yml | 4 | ||||
-rwxr-xr-x | script/cibuild.sh | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/appveyor.yml b/appveyor.yml index 4c58df6b3..b3bd3994d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,12 +34,12 @@ build_script: test_script: - ps: | $ErrorActionPreference="Stop" + # Run this early so we know it's ready by the time we need it + Start-Job { java -jar $Env:APPVEYOR_BUILD_FOLDER\build\poxyproxy.jar -d --port 8080 --credentials foo:bar } ctest -V -R libgit2_clar $env:GITTEST_REMOTE_URL="https://github.com/libgit2/non-existent" $env:GITTEST_REMOTE_USER="libgit2test" ctest -V -R libgit2_clar-cred_callback - Start-Job { java -jar $Env:APPVEYOR_BUILD_FOLDER\build\poxyproxy.jar -d --port 8080 --credentials foo:bar } - ctest -V . $env:GITTEST_REMOTE_PROXY_URL = "http://foo:bar@localhost:8080" .\Debug\libgit2_clar.exe -sonline::clone::proxy_credentials_in_url $env:GITTEST_REMOTE_PROXY_URL = "http://localhost:8080" diff --git a/script/cibuild.sh b/script/cibuild.sh index b2a928a65..92e926490 100755 --- a/script/cibuild.sh +++ b/script/cibuild.sh @@ -6,6 +6,11 @@ then exit $?; fi +# Should we ask Travis to cache this file? +curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar >poxyproxy.jar || exit $? +# Run this early so we know it's ready by the time we need it +java -jar poxyproxy.jar -d --port 8080 --credentials foo:bar & + mkdir _build cd _build # shellcheck disable=SC2086 @@ -50,9 +55,6 @@ export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub" export GITTEST_REMOTE_SSH_PASSPHRASE="" -# Can we ask Travis to cache this file? -curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar >poxyproxy.jar || exit $? - if [ -e ./libgit2_clar ]; then ./libgit2_clar -sonline::push -sonline::clone::ssh_cert && ./libgit2_clar -sonline::clone::ssh_with_paths || exit $? @@ -60,14 +62,13 @@ if [ -e ./libgit2_clar ]; then ./libgit2_clar -sonline::clone::cred_callback || exit $? fi - java -jar poxyproxy.jar -d --port 8080 --credentials foo:bar & - + # Use the proxy we started at the beginning export GITTEST_REMOTE_PROXY_URL="http://foo:bar@localhost:8080/" - ./libgit2_clar -sonline::clone::proxy_credentials_in_url + ./libgit2_clar -sonline::clone::proxy_credentials_in_url || exit $? export GITTEST_REMOTE_PROXY_URL="http://localhost:8080/" export GITTEST_REMOTE_PROXY_USER="foo" export GITTEST_REMOTE_PROXY_PASS="bar" - ./libgit2_clar -sonline::clone::proxy_credentials_request + ./libgit2_clar -sonline::clone::proxy_credentials_request || exit $? fi |