From d91ebff3b0cc0cc6262253c5d00c5049f92fe7ed Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Mon, 19 Dec 2016 15:29:11 -0500 Subject: [PATCH 01/14] Make evergreen do less. --- .evergreen.yml | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index e7c4e713fbb..a6c611e949d 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -76,18 +76,12 @@ functions: export CI=1 export EVERGREEN=1 export PATH="${node_path}:$PATH" - ls -alh ${node_path} test -n '${add_env_appdata|}' && export APPDATA='${add_env_appdata|}' - ${npm|npm} version --json - # less chatty installs: "--depth 0" reduces detail of "npm ls" tree output - export NPM_CONFIG_DEPTH=0 - export NPM_CONFIG_LOGLEVEL=error ${npm|npm} install node-gyp ${npm|npm} install - # INT-1081 Attach parseable log of installed packages. - # Don't allow it to fail build. - ${npm|npm} ls --depth=Infinity --json=true > npm_install.json || true + # TODO (imlucas) Move this to `hadron-build`. Way too much bash + # in this process no one else knows exists already. # For Windows: retrieve a fake "signtool.exe" which proxies to notary-service, # and remove the real one from our path. Must run after "npm install" "fetch signtool" : &fetch_signtool @@ -276,32 +270,12 @@ functions: content_type: text/plain display_name: LICENSE - "save version": - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: "src/dist/version" - remote_file: "${project}/${build_variant}/${revision}/version" - bucket: mciuploads - permissions: public-read - content_type: text/plain - display_name: version - "upload release": command: shell.exec params: working_dir: src script: | set -ev - export DEBUG=*; - export PATH="${node_path}:$PATH" - export CI=1 - export EVERGREEN=1 - export GITHUB_TOKEN=${leafybot_github_token} - export DOWNLOAD_CENTER_AWS_ACCESS_KEY_ID=${aws_key_evergreen_integrations} - export DOWNLOAD_CENTER_AWS_SECRET_ACCESS_KEY=${aws_secret_evergreen_integrations} - test -n '${add_env_appdata|}' && export APPDATA='${add_env_appdata|}' ${npm|npm} run upload; From 3807baf66911098223dedf9990283ff3c844ef79 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Mon, 19 Dec 2016 15:37:44 -0500 Subject: [PATCH 02/14] Save linux artifacts --- .evergreen.yml | 57 ++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index a6c611e949d..6f24bbbe530 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -13,10 +13,10 @@ exec_timeout_secs: 1800 variables: # function "save release variants" is conditional on the following -# -> all except ubuntu - &save_release_variants - osx-1010 - windows-64 + - ubuntu ####################################### @@ -153,18 +153,6 @@ functions: ssh -p 2222 localhost "echo SSH_LOCALHOST_TEST_OK" fi - "save npm_install.json": - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: "src/npm_install.json" - remote_file: "${project}/${build_variant}/${revision}/npm_install.json" - bucket: mciuploads - permissions: public-read - content_type: application/json - display_name: "npm_install.json" - "save windows artifacts": # setup - command: s3.put @@ -258,17 +246,30 @@ functions: content_type: application/zip display_name: "${name}-${version}-${platform}-${arch}.zip" - "save LICENSE": - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: "src/dist/LICENSE" - remote_file: "${project}/${build_variant}/${revision}/LICENSE" - bucket: mciuploads - permissions: public-read - content_type: text/plain - display_name: LICENSE + + "save linux artifacts": + # .deb + - command: s3.put + params: + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: "src/dist/${slug}-${version}-${arch}.deb" + remote_file: "${project}/${build_variant}/${revision}/${slug}-${version}-${platform}-${arch}.deb" + bucket: mciuploads + permissions: public-read + content_type: "application/vnd.debian.binary-package" + display_name: "${slug}-${version}-${platform}-${arch}.deb" + # .rpm + - command: s3.put + params: + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: "src/dist/${slug}.${version}.${arch}.rpm" + remote_file: "${project}/${build_variant}/${revision}/${slug}.${version}.${arch}.rpm" + bucket: mciuploads + permissions: public-read + content_type: application/x-redhat-package-manager + display_name: "${slug}.${version}.${arch}.rpm" "upload release": command: shell.exec @@ -321,19 +322,15 @@ tasks: variants: - windows-64 - func: "build" - - func: "save npm_install.json" - func: "save windows artifacts" variants: - windows-64 - func: "save osx artifacts" variants: - osx-1010 - - func: "save LICENSE" - variants: - - windows-64 - - func: "save version" + - func: "save linux artifacts" variants: - - windows-64 + - ubuntu - func: "upload release" # Define shortcut for use below From e96255ece988d34dcca1db87354ec937cb942ce7 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Mon, 19 Dec 2016 15:41:52 -0500 Subject: [PATCH 03/14] Windows and linux fixes from hadron-build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 812e7ec7da9..ea4d6d0c1b7 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^3.0.3", + "hadron-build": "^4.0.0", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9", From 69f96f3962f9398f33127e9844eed043daceb2a3 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Mon, 19 Dec 2016 15:43:58 -0500 Subject: [PATCH 04/14] hadron-build config renamed to info --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea4d6d0c1b7..34051a7efa0 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "test-unit": "npm test -- --unit", "test-release": "npm test -- --release", "upload": "hadron-build upload", - "evergreen-expansions": "hadron-build config --format=yaml --output=expansions.yml --flatten" + "evergreen-expansions": "hadron-build info --format=yaml --output=expansions.yml --flatten" }, "repository": { "type": "git", From b3c838897a0d031c0bd254745ed55ee4a1973a9d Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Mon, 19 Dec 2016 17:30:57 -0500 Subject: [PATCH 05/14] catch yaml for expansions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 34051a7efa0..bfe23a580f8 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "test-unit": "npm test -- --unit", "test-release": "npm test -- --release", "upload": "hadron-build upload", - "evergreen-expansions": "hadron-build info --format=yaml --output=expansions.yml --flatten" + "evergreen-expansions": "hadron-build info --format=yaml --flatten > expansions.yml" }, "repository": { "type": "git", From 380336c28bc0873b5e2c788c31f0a8589c22c2ea Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 13:04:20 -0500 Subject: [PATCH 06/14] Evergreen can build linux installers --- .evergreen.yml | 54 ++++++++++++++++++++++++++++++-------------------- package.json | 3 +-- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 6f24bbbe530..645c30784a3 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -122,6 +122,8 @@ functions: export SIGNTOOL_PARAMS="yes" test -n '${add_env_appdata|}' && export APPDATA='${add_env_appdata|}' + export DEBUG=hadron*,electron* + # Run static analysis on code and project configuration ${npm|npm} run check @@ -129,6 +131,13 @@ functions: ${npm|npm} run release; ls -alh dist/ + # Upload release assets to S3 and GitHub + export GITHUB_TOKEN=${leafybot_github_token} + export DOWNLOAD_CENTER_AWS_ACCESS_KEY_ID=${aws_key_evergreen_integrations} + export DOWNLOAD_CENTER_AWS_SECRET_ACCESS_KEY=${aws_secret_evergreen_integrations} + ${npm|npm} run upload; + + pkill mongod || true # end of embedded script EOF_BUILD_SH @@ -229,23 +238,22 @@ functions: aws_key: ${aws_key} aws_secret: ${aws_secret} local_file: "src/dist/${osx_dmg_filename}" - remote_file: "${project}/${build_variant}/${revision}/${name}-${version}-${platform}-${arch}.dmg" + remote_file: "${project}/${build_variant}/${revision}/${osx_dmg_filename}" bucket: mciuploads permissions: public-read content_type: "application/x-apple-diskimage" - display_name: "${name}-${version}-${platform}-${arch}.dmg" + display_name: "${osx_dmg_filename}" # .zip - command: s3.put params: aws_key: ${aws_key} aws_secret: ${aws_secret} local_file: "src/dist/${osx_zip_filename}" - remote_file: "${project}/${build_variant}/${revision}/${name}-${version}-${platform}-${arch}.zip" + remote_file: "${project}/${build_variant}/${revision}/${osx_zip_filename}" bucket: mciuploads permissions: public-read content_type: application/zip - display_name: "${name}-${version}-${platform}-${arch}.zip" - + display_name: "${osx_zip_filename}" "save linux artifacts": # .deb @@ -253,31 +261,34 @@ functions: params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: "src/dist/${slug}-${version}-${arch}.deb" - remote_file: "${project}/${build_variant}/${revision}/${slug}-${version}-${platform}-${arch}.deb" + local_file: "src/dist/${linux_deb_filename}" + remote_file: "${project}/${build_variant}/${revision}/${linux_deb_filename}" bucket: mciuploads permissions: public-read content_type: "application/vnd.debian.binary-package" - display_name: "${slug}-${version}-${platform}-${arch}.deb" - # .rpm + display_name: "${linux_deb_filename}" + # # .rpm + # - command: s3.put + # params: + # aws_key: ${aws_key} + # aws_secret: ${aws_secret} + # local_file: "src/dist/${linux_rpm_filename}" + # remote_file: "${project}/${build_variant}/${revision}/${linux_rpm_filename}" + # bucket: mciuploads + # permissions: public-read + # content_type: application/x-redhat-package-manager + # display_name: "${linux_rpm_filename}" + # .tar.gz - command: s3.put params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: "src/dist/${slug}.${version}.${arch}.rpm" - remote_file: "${project}/${build_variant}/${revision}/${slug}.${version}.${arch}.rpm" + local_file: "src/dist/${linux_tar_filename}" + remote_file: "${project}/${build_variant}/${revision}/${linux_tar_filename}" bucket: mciuploads permissions: public-read - content_type: application/x-redhat-package-manager - display_name: "${slug}.${version}.${arch}.rpm" - - "upload release": - command: shell.exec - params: - working_dir: src - script: | - set -ev - ${npm|npm} run upload; + content_type: application/x-gzip + display_name: "${linux_tar_filename}" ####################################### @@ -331,7 +342,6 @@ tasks: - func: "save linux artifacts" variants: - ubuntu - - func: "upload release" # Define shortcut for use below variables: diff --git a/package.json b/package.json index bfe23a580f8..eb4fde88360 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "build": { "win32": { "icon": "src/app/images/win32/mongodb-compass.ico", - "favicon_url": "https://compass.mongodb.com/favicon.ico", "loading_gif": "src/app/images/win32/mongodb-compass-installer-loading.gif" }, "darwin": { @@ -178,7 +177,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^4.0.0", + "hadron-build": "^4.0.8", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9", From 854c5420e2e3ebbe6f7989047815bb3a493a586b Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 13:20:19 -0500 Subject: [PATCH 07/14] Upstream Windows fix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb4fde88360..b36c0e914d6 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^4.0.8", + "hadron-build": "^4.0.9", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9", From 00581b74995adf72a1e53227f3504bc2f6dded94 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 14:18:30 -0500 Subject: [PATCH 08/14] Can't take the cheap way out of windows icon problem... --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b36c0e914d6..f83a036fd90 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "build": { "win32": { "icon": "src/app/images/win32/mongodb-compass.ico", + "favicon_url": "https://compass.mongodb.com/favicon.ico", "loading_gif": "src/app/images/win32/mongodb-compass-installer-loading.gif" }, "darwin": { From 6a1194bf0ee566ed4281ea5bd80b7a568f8e9bd5 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 14:27:11 -0500 Subject: [PATCH 09/14] Taking rhel62 for a spin --- .evergreen.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.evergreen.yml b/.evergreen.yml index 645c30784a3..3acb457e719 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -391,3 +391,15 @@ buildvariants: num_cores: $(grep -c ^processor /proc/cpuinfo) tasks: *all_tasks +- name: rhel62 + display_name: Enterprise RHEL 6.2 + modules: ~ + run_on: + - "rhel62-test" + expansions: + fetch_npm_tarball: node-v6.3.1-npm-3.10.3-linux-x64.tgz + node_path: "$(pwd)/.deps/bin" + compile_env: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ + num_cores: $(grep -c ^processor /proc/cpuinfo) + tasks: + *all_tasks From 88e9421536ff1a771386a1498b6f1d3c2cd02768 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 14:29:53 -0500 Subject: [PATCH 10/14] More rhel tuning --- .evergreen.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 3acb457e719..645c30784a3 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -391,15 +391,3 @@ buildvariants: num_cores: $(grep -c ^processor /proc/cpuinfo) tasks: *all_tasks -- name: rhel62 - display_name: Enterprise RHEL 6.2 - modules: ~ - run_on: - - "rhel62-test" - expansions: - fetch_npm_tarball: node-v6.3.1-npm-3.10.3-linux-x64.tgz - node_path: "$(pwd)/.deps/bin" - compile_env: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ - num_cores: $(grep -c ^processor /proc/cpuinfo) - tasks: - *all_tasks From a85d95c0695dd69a3e811e747b9d4b16fd8ba7f9 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 14:50:40 -0500 Subject: [PATCH 11/14] Bump for windows debugging --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f83a036fd90..64866356244 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^4.0.9", + "hadron-build": "^4.0.10", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9", From 6c65772d2a35df85260d5a121db7ba73e4bed387 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 15:11:59 -0500 Subject: [PATCH 12/14] rhel experiment failed Windows is green now so getting to stable place so we can merge this branch and pick up rpm as sep ticket. --- .evergreen.yml | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 645c30784a3..e5a64c2f90a 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -290,7 +290,6 @@ functions: content_type: application/x-gzip display_name: "${linux_tar_filename}" - ####################################### # Tasks # ####################################### diff --git a/package.json b/package.json index 64866356244..2052b82fae0 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^4.0.10", + "hadron-build": "^4.0.11", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9", From d4f6f5db446fd021802780bba801e7851403851d Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 18:59:36 -0500 Subject: [PATCH 13/14] latest hadron-build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2052b82fae0..9bc525513ac 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^4.0.11", + "hadron-build": "^4.1.0", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9", From 2a9cdb8c6c1dd35521fd40978735d5dd6f7fcd3c Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 20 Dec 2016 19:20:47 -0500 Subject: [PATCH 14/14] Testing linux symlink --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9bc525513ac..3d495250afb 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "electron-prebuilt": "1.2.8", "enzyme": "^2.5.1", "eslint-config-mongodb-js": "^2.2.0", - "hadron-build": "^4.1.0", + "hadron-build": "^4.1.1", "jsdom": "^9.8.3", "mocha": "^3.1.2", "mongodb-js-precommit": "^0.2.9",