####################################### # Tools Driver Config for MCI # ####################################### # run the same task in the previous revision if the current task fails stepback: true mongo_tools_variables: ## Common download URLs (merge in as hashes) mongo_download_urls: osx_108: &mongo_url_osx108 mongo_url: "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-latest.tgz" mongo26_url: "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.6.5.tgz" mongo24_url: "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.4.12.tgz" solaris: &mongo_url_solaris mongo_url: "https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-latest.tgz" mongo26_url: "https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-2.6.5.tgz" mongo24_url: "https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-2.4.12.tgz" rhel55_32: &mongo_url_rhell55_32 mongo_url: "https://fastdl.mongodb.org/linux/mongodb-linux-i686-latest.tgz" mongo26_url: "https://fastdl.mongodb.org/linux/mongodb-linux-i686-2.6.5.tgz" mongo24_url: "https://fastdl.mongodb.org/linux/mongodb-linux-i686-2.4.12.tgz" linux_64_bit: &mongo_url_ubuntu1204 mongo_url: "http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-latest.tgz" mongo26_url: "http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-2.6.5.tgz" mongo24_url: "http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-ubuntu1204-2.4.12.tgz" linux_64_bit_enterprise: &mongo_url_ubuntu1204_enterprise mongo_url: "http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-latest.tgz" mongo26_url: "http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-2.6.5.tgz" mongo24_url: "http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-ubuntu1204-2.4.12.tgz" windows_32_bit: &mongo_url_windows32 mongo_url: "https://fastdl.mongodb.org/win32/mongodb-win32-i386-latest.zip" mongo26_url: "https://fastdl.mongodb.org/win32/mongodb-win32-i386-2.6.5.zip" mongo24_url: "https://fastdl.mongodb.org/win32/mongodb-win32-i386-2.4.12.zip" windows_64_bit: &mongo_url_windows64 mongo_url: "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-latest.zip" mongo26_url: "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.5.zip" mongo24_url: "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.12.zip" windows_64_bit_enterprise: &mongo_url_windows64_enterprise mongo_url: "http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-latest.zip" mongo26_url: "http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-2.6.5.zip" ## List of tests to run on each buildvariant mongo_tools_task_lists: osx_108_task_list: &osx_108_tasks - name: db - name: dist - name: integration - name: integration-auth - name: legacy28 - name: legacy26 - name: legacy24 - name: unit osx_108_ssl_task_list: &osx_108_ssl_tasks - name: dist rhel55_32_task_list: &rhel55_32_tasks - name: db - name: dist - name: integration - name: integration-auth - name: legacy24 - name: legacy28 - name: legacy26 - name: unit solaris_task_list: &solaris_tasks - name: db - name: dist - name: integration - name: integration-auth - name: legacy28 - name: legacy26 - name: legacy24 - name: unit ubuntu1204_task_list: &ubuntu1204_tasks - name: bsonutil - name: db - name: dist - name: integration - name: integration-auth - name: json - name: legacy28 - name: legacy26 - name: legacy24 - name: lint - name: log - name: pool - name: progress - name: qa-tests - name: text - name: unit - name: util - name: vet ubuntu1204_ssl_task_list: &ubuntu1204_ssl_tasks - name: dist - name: integration - name: legacy28 - name: integration-auth ubuntu1204_enterprise_task_list: &ubuntu1204_enterprise_tasks - name: bsonutil - name: db - name: dist - name: integration - name: integration-auth - name: json - name: kerberos - name: legacy28 - name: lint - name: log - name: pool - name: progress - name: text - name: util - name: vet windows_32_task_list: &windows_32_tasks - name: db distros: - windows-64-vs2013-test - name: dist - name: integration - name: integration-auth - name: legacy28 distros: - windows-64-vs2013-test - name: legacy26 distros: - windows-64-vs2013-test - name: legacy24 distros: - windows-64-vs2013-test - name: unit windows_64_task_list: &windows_64_tasks - name: db - name: dist - name: integration - name: integration-auth - name: legacy28 distros: - windows-64-vs2013-test - name: legacy26 distros: - windows-64-vs2013-test - name: legacy24 distros: - windows-64-vs2013-test - name: unit windows_64_ssl_task_list: &windows_64_ssl_tasks - name: dist - name: integration - name: legacy28 - name: integration-auth windows_64_enterprise_task_list: &windows_64_enterprise_tasks - name: db - name: dist - name: integration - name: integration-auth - name: kerberos - name: legacy28 distros: - windows-64-vs2013-test - name: unit ## Common mongodb arguments mongodb_arguments: default: &mongodb_default_startup_args mongodb_args: &default_startup_args_string " " ssl: &mongodb_ssl_startup_args mongodb_args: "--sslMode requireSSL --sslCAFile common/db/openssl/testdata/ca.pem --sslPEMKeyFile common/db/openssl/testdata/server.pem " auth: &mongodb_auth_startup_args mongodb_args: &auth_startup_args_string "--auth " functions: "attach tool": command: attach.task_files params: "${tool} (${edition|community})": https://s3.amazonaws.com/mciuploads/mongo-tools/binaries/${build_id}/${edition|community}/${tool}${extension} "build tool": command: shell.exec params: working_dir: src script: | echo "Building ${tool}..." if [ "Windows_NT" = "$OS" ]; then set -o igncr fi; if [ '${library_path}' != '' ]; then export ${library_path} fi . ./set_gopath.sh go build ${args} ${build_tags} -o bin/${tool} ${tool}/main/${tool}.go "download mongod": command: shell.exec params: working_dir: src script: | set -o verbose rm -rf mongodb mkdir mongodb cd mongodb curl -s ${mongo_url} --output mongodb.tgz ${decompress} mongodb.tgz chmod +x ./mongodb-*/bin/* mv ./mongodb-*/bin/* . "fetch tool" : command: s3.get params: bucket: mciuploads aws_key: ${aws_key} aws_secret: ${aws_secret} local_file: src/${tool}${extension} remote_file: mongo-tools/binaries/${build_id}/${edition|community}/${tool}${extension} "generate coverage html + text": command: shell.exec params: working_dir: src script: | set -o verbose if [ "${coverage}" = "true" ]; then if [ "Windows_NT" = "$OS" ]; then set -o igncr fi; . ./set_gopath.sh go tool cover -html=coverage.out -o coverage.html go tool cover -func=coverage.out -o coverage.txt fi; "get buildnumber": command: keyval.inc params: key: "${build_variant}_tools" destination: "builder_num" "move coverage data": command: shell.exec params: working_dir: src script: | set -o verbose if [ "${coverage}" = "true" ]; then mv ${package}/coverage.out . fi "run unit test": command: shell.exec params: working_dir: src script: | set -e if [ "Windows_NT" = "$OS" ]; then set -o igncr fi; . ./set_gopath.sh if [ '${library_path}' != '' ]; then export ${library_path} fi export MONGODB_KERBEROS_PASSWORD=${kerberos_password} cd ${package} go test ${coverage_args} ${args} ${build_tags} "setup integration test": command: shell.exec params: working_dir: src # Set up Kerberos stuff: run kinit if necessary, and add KDC to registry # on Windows (see https://wiki.mongodb.com/display/DH/Testing+Kerberos) script: | if [ '${run_kinit}' = 'true' ] then echo "${kerberos_password}" | kinit -p drivers@LDAPTEST.10GEN.CC; fi; if [ "Windows_NT" = "$OS" ]; then cmd /c "REG ADD HKLM\SYSTEM\ControlSet001\Control\Lsa\Kerberos\Domains\LDAPTEST.10GEN.CC /v KdcNames /d ldaptest.10gen.cc /t REG_MULTI_SZ /f" fi; "setup permissions": command: shell.exec params: working_dir: src script: | chmod 700 go.sh chmod 700 set_gopath.sh "run tool unit tests": command: shell.exec params: working_dir: src script: | if [ "Windows_NT" = "$OS" ]; then set -o igncr fi; . ./set_gopath.sh # TODO bsondump needs tests # TODO mongotop needs tests for i in mongoimport mongoexport mongostat mongooplog mongorestore mongodump mongofiles; do cd $i COVERAGE_ARGS="" if [ "${run_coverage}" ]; then COVERAGE_ARGS="-coverprofile=coverage_$i.out" fi; ${library_path} go test $COVERAGE_ARGS ${args} ${build_tags} cd .. done "run tool integration tests": command: shell.exec params: working_dir: src script: | set -e if [ "Windows_NT" = "$OS" ]; then set -o igncr export MONGODB_KERBEROS_PASSWORD=${kerberos_password} fi; . ./set_gopath.sh if [ "${library_path}" != "" ]; then export ${library_path} fi; if [ "${create_mongod_users_command}" != "" ]; then export AUTH_USERNAME=${auth_username} export AUTH_PASSWORD=${auth_password} if [ "${smoke_use_ssl}" != "" ] then echo "${create_mongod_users_command}" | ./mongodb/mongo${extension} --ssl --sslCAFile ./common/db/openssl/testdata/ca.pem --sslPEMKeyFile ./common/db/openssl/testdata/server.pem --sslAllowInvalidCertificates admin else echo "${create_mongod_users_command}" | ./mongodb/mongo${extension} admin fi fi; for i in mongoimport mongoexport mongostat mongooplog mongorestore mongodump mongofiles; do cd $i COVERAGE_ARGS="" if [ "${run_coverage}" ]; then COVERAGE_ARGS="-coverprofile=coverage_$i.out" fi; ${library_path} go test $COVERAGE_ARGS ${args} ${build_tags} cd .. done "create coverage reports": command: shell.exec params: working_dir: src script: | if [ "Windows_NT" = "$OS" ]; then set -o igncr fi; . ./set_gopath.sh for i in mongoimport mongoexport mongostat mongooplog mongorestore mongodump mongofiles; do cd $i perl -pe 's/.*src/github.com\/mongodb\/mongo-tools/' coverage_$i.out > coverage_$i_rewrite.out ${library_path} go tool cover -html=coverage_$i_rewrite.out -o coverage_$i.html ${library_path} go tool cover -func=coverage_$i_rewrite.out -o coverage_$i.txt cd .. done "upload html coverage": command: s3.put params: aws_key: ${aws_key} aws_secret: ${aws_secret} local_file: src/${coverage_pkg}/coverage_${coverage_pkg}.html remote_file: mongo-tools/coverage/${coverage_pkg}/${task_id}.html bucket: mciuploads permissions: public-read content_type: text/html build_variants: ["ubuntu", "windows-64"] "upload text coverage": command: s3.put params: aws_key: ${aws_key} aws_secret: ${aws_secret} local_file: src/${coverage_pkg}/coverage_${coverage_pkg}.txt remote_file: mongo-tools/coverage/${coverage_pkg}/${task_id}.txt bucket: mciuploads permissions: public-read content_type: text/plain build_variants: ["ubuntu", "windows-64"] "attach coverage reports": command: attach.task_files params: "${coverage_pkg} coverage (html)": https://s3.amazonaws.com/mciuploads/mongo-tools/coverage/${coverage_pkg}/${task_id}.html "${coverage_pkg} coverage (text)": https://s3.amazonaws.com/mciuploads/mongo-tools/coverage/${coverage_pkg}/${task_id}.txt "setup credentials" : command: shell.exec params: working_dir: src silent: true script: | cat > mci.buildlogger <