Skip to content

PHPC-1180: Fix STANDALONE_SSL build failures on Travis #962

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

Merged
merged 7 commits into from
Feb 28, 2019
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
7 changes: 0 additions & 7 deletions .travis.scripts/mo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,7 @@ case $2 in
start)
if [ "$HTTP_CODE" != "200" ]
then
WORKSPACE=${TRAVIS_BUILD_DIR}/orchestrations
rm -fr $WORKSPACE
mkdir $WORKSPACE
LOGPATH=$WORKSPACE
DBPATH=$WORKSPACE
POST_DATA=$(eval_params $1)
echo "DBPATH=$DBPATH"
echo "LOGPATH=$LOGPATH"
echo "POST_DATA='$POST_DATA'"
echo
POST=$(post $BASE_URL/$R "$POST_DATA")
Expand Down
2 changes: 1 addition & 1 deletion .travis.scripts/setup_mo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ case $DEPLOYMENT in
;;
STANDALONE_SSL)
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/standalone/standalone-ssl.json start > /tmp/mo-result.json
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri, "/?ssl=true&sslallowinvalidcertificates=true";' > /tmp/uri.txt
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri, "/?ssl=true";' > /tmp/uri.txt
;;
REPLICASET)
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/replica_sets/replicaset.json start > /tmp/mo-result.json
Expand Down
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,19 @@ matrix:

before_install:
- openssl aes-256-cbc -K $encrypted_b354efda2943_key -iv $encrypted_b354efda2943_iv -in .travis.scripts/atlas-uris.txt.enc -out .travis.scripts/atlas-uris.txt -d || true
- pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
- pip install --user "mongo-orchestration>=0.6.7,<1.0"
- .travis.scripts/before_install.sh
- export SERVER_FILENAME=mongodb-linux-x86_64-${SERVER_DISTRO}-${SERVER_VERSION}
- wget -qO- http://fastdl.mongodb.org/linux/${SERVER_FILENAME}.tgz | tar xz
- export PATH=${PWD}/${SERVER_FILENAME}/bin:${PATH}
- mongod --version
- mongo-orchestration --version
- export MO_PATH=`python -c 'import mongo_orchestration; from os import path;
print(path.dirname(mongo_orchestration.__file__));'`
- php -r 'if ( ! ($f = php_ini_loaded_file())) { $f = PHP_CONFIG_FILE_PATH . "/php.ini"; } file_put_contents($f, "variables_order=EGPCS\n", FILE_APPEND); $a = file($f, FILE_IGNORE_NEW_LINES); var_dump($a[count($a)-1]);'

before_script:
- export MONGO_ORCHESTRATION_HOME=${PWD}/orchestration
- mkdir -p ${MONGO_ORCHESTRATION_HOME}/lib
- cp ${PWD}/scripts/ssl/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem
- mongo-orchestration start
- .travis.scripts/setup_mo.sh
- ulimit -a
Expand Down
2 changes: 1 addition & 1 deletion scripts/presets/standalone-ssl.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"sslMode": "requireSSL",
"sslCAFile": "/phongo/scripts/ssl/ca.pem",
"sslPEMKeyFile": "/phongo/scripts/ssl/server.pem",
"sslWeakCertificateValidation": true
"sslAllowConnectionsWithoutCertificates": true
}
}
3 changes: 1 addition & 2 deletions scripts/presets/travis/standalone/standalone-ssl.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"sslMode": "requireSSL",
"sslCAFile": "$TRAVIS_BUILD_DIR/scripts/ssl/ca.pem",
"sslPEMKeyFile": "$TRAVIS_BUILD_DIR/scripts/ssl/server.pem",
"sslWeakCertificateValidation": true,
"sslAllowInvalidHostnames": true
"sslAllowConnectionsWithoutCertificates": "true"
}
}