From e298e4a9999e25e92a39e750f12dea725868a41b Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 17:16:27 -0400 Subject: [PATCH 01/21] Test appveyor file --- appveyor.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..0dc830ecc --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,21 @@ +# Test against this version of Node.js +environment: + nodejs_version: "0.10" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off \ No newline at end of file From b637be86994a3b0a8a6d279be720a5d7022e0a16 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 17:20:29 -0400 Subject: [PATCH 02/21] Update appveyor.yml --- appveyor.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0dc830ecc..b47cd1894 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,3 @@ -# Test against this version of Node.js -environment: - nodejs_version: "0.10" - # Install scripts. (runs after repo cloning) install: # Get the latest stable version of Node.js or io.js @@ -14,8 +10,7 @@ test_script: # Output useful info for debugging. - node --version - npm --version - # run tests - - npm test + - npm run winbuild # Don't actually build. build: off \ No newline at end of file From ad34db4429d0b9c3bb9b6d9ca36b3e4f0ad9cc35 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 17:23:07 -0400 Subject: [PATCH 03/21] Add electron-packager --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index b47cd1894..aa0ed7611 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,7 @@ install: - ps: Install-Product node $env:nodejs_version # install modules - npm install + - npm install -g electron-packager # Post-install test scripts. test_script: From 3b046e013d13c8260a3134a797b2edb146063860 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 17:33:12 -0400 Subject: [PATCH 04/21] Update appveyor again --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index aa0ed7611..7a0ac9e6b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,8 @@ test_script: - node --version - npm --version - npm run winbuild + - 7z a -tzip -mx9 BloodHound-win32-ia32.zip BloodHound-win32-ia32 + - 7z a -tzip -mx9 BloodHound-win32-x64.zip BloodHound-win32-x64 # Don't actually build. build: off \ No newline at end of file From af00edb083c05417bd0c68f696d62ee50c17aad4 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 17:39:02 -0400 Subject: [PATCH 05/21] Add Artifacts --- appveyor.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 7a0ac9e6b..ba19363ef 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,5 +15,11 @@ test_script: - 7z a -tzip -mx9 BloodHound-win32-ia32.zip BloodHound-win32-ia32 - 7z a -tzip -mx9 BloodHound-win32-x64.zip BloodHound-win32-x64 +artifacts: + - path: BloodHound-win32-ia32.zip + name: BloodHound-win32-ia32 + - path: BloodHound-win32-x64.zip + name: BloodHound-win32-x64 + # Don't actually build. build: off \ No newline at end of file From 1de46b80e22035ac0879a1620187e6c0feea2179 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 18:07:03 -0400 Subject: [PATCH 06/21] Deployment files --- appveyor.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index ba19363ef..1a3cae9ba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,5 +21,16 @@ artifacts: - path: BloodHound-win32-x64.zip name: BloodHound-win32-x64 +deploy: + - provider: Github + release: BloodHound Rolling + description: 'Rolling release of BloodHound compiled from Source' + artifact: BloodHound-win32-ia32.zip,BloodHound-win32-x64.zip + draft: true + force_update: true + auth_token: + secure: 9E4/AX+ecgXB482XLGCgpdLL5hlWJOUywGKREcRL0iD+YBU/ABXJOGXYHLeKQIgv + + # Don't actually build. build: off \ No newline at end of file From f49f7d8878365f8df1134cd637c3b2452c07ccaa Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 18:16:21 -0400 Subject: [PATCH 07/21] Typo --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1a3cae9ba..6cd610795 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,7 +22,7 @@ artifacts: name: BloodHound-win32-x64 deploy: - - provider: Github + - provider: GitHub release: BloodHound Rolling description: 'Rolling release of BloodHound compiled from Source' artifact: BloodHound-win32-ia32.zip,BloodHound-win32-x64.zip From ec7b3e5fa035eaad6f69b130e3ef300193de117c Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 18:33:41 -0400 Subject: [PATCH 08/21] Add TravisCI --- travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 travis.yml diff --git a/travis.yml b/travis.yml new file mode 100644 index 000000000..5449177da --- /dev/null +++ b/travis.yml @@ -0,0 +1,9 @@ +language: node_js + +install: + - npm install + - npm install -g electron-packager + +script: + - npm run linuxbuild + - npm run macbuild \ No newline at end of file From 29fcb8efebaff03b7aa8a2e7c564bb5a7ed41c4a Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 18:34:46 -0400 Subject: [PATCH 09/21] Rename File --- travis.yml => .travis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename travis.yml => .travis.yml (100%) diff --git a/travis.yml b/.travis.yml similarity index 100% rename from travis.yml rename to .travis.yml From abbab5f9be6d77c854d5912fba6476c3085e4c54 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 18:40:47 -0400 Subject: [PATCH 10/21] Update travis.yml --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5449177da..962ea7594 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: node_js +node_js: + - "6" + +os: + - linux + - osx install: - npm install - npm install -g electron-packager script: - - npm run linuxbuild - - npm run macbuild \ No newline at end of file + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; else npm run linuxbuild; fi From 3db3930453ebc9b01367fe608ab6b7ae906993fc Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 19:13:50 -0400 Subject: [PATCH 11/21] Update Version, add post-build --- .travis.yml | 15 ++++++++++++++- package.json | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 962ea7594..ffe0e82e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,22 @@ os: - linux - osx +before_install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update;else sudo apt-get update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install p7zip-full; fi + install: - npm install - npm install -g electron-packager + - script: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; else npm run linuxbuild; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi + +after_script: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64; fi \ No newline at end of file diff --git a/package.json b/package.json index e7128bf1b..10bd93b9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bloodhound", - "version": "1.0.0", + "version": "1.0.1", "description": "Graph Theory for Active Directory", "keywords": [ "Graph", From 2f6827f1e6ca0e6ce75e8d900f33704035ba6f96 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 20:22:33 -0400 Subject: [PATCH 12/21] Travis.yml test curl Update build strings --- .travis.yml | 19 +++++++++++-------- package.json | 6 +++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffe0e82e7..a3cb36d61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,26 +2,29 @@ language: node_js node_js: - "6" +env: + matrix: + secure: hDK5HxOqtKBOTL8PbBOVN8Rl3JeySb0L7bn7X/ZhkpRsakwoj8Y2YfWZz8tb31W3yViGVAa1FpaJzphze4E+d48pNoV6220yTv5gjJHhtybWzTGNS/FOEUPKYQrDFBk3Ve3l5rIcBZhX6KEJg5r8O27JpJkhrCEqkDj+9SQHWEzLJHaW6HYwMlR0+CNQYSd8+siLsjITYiUn49TnD0f6Ou6PkpMym1q95TGmA+DNmg4iXud4FCdlWPiNVuML3Sl+zBakQd8sosgiGCp5k0qQSFu3l8G20oUoWs0iKmdgJZSdWkZupsrXDoWCmmvC+rHVsxKwQ7YrLgGejLUD7N1uDKO28sfOgPzOGNzSwFO+dZf6RKoyMn/WiudpwFW0/KV/bhv7Uklb5qd4O2nl8yKeoz5o5qCG4Pw7qXsJn8rSY1ytyCU6hCX8dVnN8aQ+MgfSyXPr7rEeeVQkOiNHrI5XLc1Dmiu4khoDf2yn1d/A61fgEwCMClLihOXyc+Qcw4bBgKTcJA5JeMuD39jTmFOLbipIHrFrLpTHOAi1G48uS1o2VWKFOgsA+QphVwdT0zo84oeLminykXxBtGB6YUuiWxLVXbLNET5t6BxskQcMKfCYy5+6Y1TCf3yzYlkqmFvoq/Tu8Z9IAxrT3Bx6IgGOV+njgGszm7PWIy9Doi84sic= + os: - linux - - osx before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update;else sudo apt-get update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install p7zip-full; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y p7zip-full; fi install: - npm install - npm install -g electron-packager - - script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi after_script: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64; fi \ No newline at end of file + #- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi + #- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi + #- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi + - curl --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases \ No newline at end of file diff --git a/package.json b/package.json index 10bd93b9a..2edf9a53c 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,9 @@ "scripts": { "start": "cross-env NODE_ENV=development electron .", "dev": "concurrently -k \"babel-node server.js\" \"npm start\"", - "winbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=win32 --arch=all --overwrite --prune --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --icon=src/img/icon.ico", - "macbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=darwin --arch=all --overwrite --prune --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --icon=src/img/icon.icns", - "linuxbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --arch=all --overwrite --prune --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb" + "winbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=win32 --arch=all --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --icon=src/img/icon.ico", + "macbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=darwin --arch=all --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --icon=src/img/icon.icns", + "linuxbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --arch=all --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb" }, "babel": { "presets": [ From 1096ba1c0cbaf4aa1492df731dead1dae3acd2c5 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:16:27 -0400 Subject: [PATCH 13/21] Test deploy.sh --- .travis.yml | 12 ++++++++---- deploy.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 deploy.sh diff --git a/.travis.yml b/.travis.yml index a3cb36d61..82904016b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: os: - linux + - osx before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi @@ -24,7 +25,10 @@ script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi after_script: - #- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi - #- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi - #- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi - - curl --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases \ No newline at end of file + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi + +deploy: + provider: script + script: deploy.sh \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 000000000..da71e97cf --- /dev/null +++ b/deploy.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +response="$(curl -s --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/4033842/assets)" + +win32id="$(echo "$response" | grep -B 1 \"BloodHound-linux-ia32 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" +x64id="$(echo "$response" | grep -B 1 \"BloodHound-linux-x64 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" +macid="$(echo "$response" | grep -B 1 \"BloodHound-darwin-x64 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" + +if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + if [[ ! $win32id == "" ]]; then + curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id + fi + + if [[ ! $x64id == "" ]]; then + curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id + fi + + curl -X POST -# --header 'Content-Type:application/zip' --data-binary @BloodHound-linux-ia32.zip --user "${GH_USER}" https://uploads.github.com/repos/adaptivethreat/BloodHound/releases/4033842/assets?name=BloodHound-linux-ia32.zip + curl -X POST -# --header 'Content-Type:application/zip' --data-binary @BloodHound-linux-x64.zip --user "${GH_USER}" https://uploads.github.com/repos/adaptivethreat/BloodHound/releases/4033842/assets?name=BloodHound-linux-x64.zip +fi + +if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + if [[ ! $macid == "" ]]; then + curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id + fi + + curl -X POST -# --header 'Content-Type:application/zip' --data-binary @BloodHound-darwin-x64.zip --user "${GH_USER}" https://uploads.github.com/repos/adaptivethreat/BloodHound/releases/4033842/assets?name=BloodHound-darwin-x64.zip +fi From 3d61271349ee7598bda6b9abdda95d6771f21f37 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:17:39 -0400 Subject: [PATCH 14/21] Update deploy --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82904016b..5dc1b0881 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,4 +31,6 @@ after_script: deploy: provider: script - script: deploy.sh \ No newline at end of file + script: deploy.sh + on: + branch: CI-Test \ No newline at end of file From 97e23614b568128259844f380c0c53c5beb18675 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:24:31 -0400 Subject: [PATCH 15/21] Fix deploy script again --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5dc1b0881..08d755a83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi -after_script: +before_deploy: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi @@ -32,5 +32,6 @@ after_script: deploy: provider: script script: deploy.sh + skip_cleanup: true on: branch: CI-Test \ No newline at end of file From 2a695d9a8177a15def3bd532bd9b31cea71a5710 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:34:48 -0400 Subject: [PATCH 16/21] Trying script again --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 08d755a83..d7136d5b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ before_deploy: deploy: provider: script - script: deploy.sh + script: "./deploy.sh" skip_cleanup: true on: branch: CI-Test \ No newline at end of file From 330963926ffe7a75c901d3216ed0668d970eeab3 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:51:27 -0400 Subject: [PATCH 17/21] New method of script? --- .travis.yml | 25 ++++++++++++------------- deploy.sh | 2 ++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index d7136d5b4..f24891c95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,30 +8,29 @@ env: os: - linux - - osx before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y p7zip-full; fi + # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi + # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi + # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y p7zip-full; fi install: - - npm install - - npm install -g electron-packager + # - npm install + # - npm install -g electron-packager script: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi + # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi + # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi before_deploy: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi + # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi + # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi + # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi deploy: provider: script - script: "./deploy.sh" + script: /bin/bash deploy.sh skip_cleanup: true on: branch: CI-Test \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index da71e97cf..779363dff 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,6 +5,8 @@ win32id="$(echo "$response" | grep -B 1 \"BloodHound-linux-ia32 | head -n1 | cut x64id="$(echo "$response" | grep -B 1 \"BloodHound-linux-x64 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" macid="$(echo "$response" | grep -B 1 \"BloodHound-darwin-x64 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" +echo $response + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ ! $win32id == "" ]]; then curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id From ef947d96bb0a1a0ed6d8350c3a1b9ea25e9d42cf Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:53:57 -0400 Subject: [PATCH 18/21] Finally works???? --- .travis.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index f24891c95..28c02af45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,25 +8,26 @@ env: os: - linux + - osx before_install: - # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y p7zip-full; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y p7zip-full; fi install: - # - npm install - # - npm install -g electron-packager + - npm install + npm install -g electron-packager script: - # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run linuxbuild; fi before_deploy: - # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 7z a -tzip -mx9 BloodHound-darwin-x64.zip BloodHound-darwin-x64 > /dev/null; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-ia32.zip BloodHound-linux-ia32 > /dev/null; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 7z a -tzip -mx9 BloodHound-linux-x64.zip BloodHound-linux-x64 > /dev/null; fi deploy: provider: script From 70ca58b04fe1f35e981c20fb38fdf8ea6d90a919 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 21:57:07 -0400 Subject: [PATCH 19/21] Fail --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 28c02af45..cec61a38a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: install: - npm install - npm install -g electron-packager + - npm install -g electron-packager script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run macbuild; fi From 5651704ded506083d8afce1ba2fed93bcb8c2186 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 22:13:17 -0400 Subject: [PATCH 20/21] Clean up deploy Fix foreign prebuilt queries --- deploy.sh | 2 -- src/components/SearchContainer/Tabs/PrebuiltQueries.json | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index 779363dff..da71e97cf 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,8 +5,6 @@ win32id="$(echo "$response" | grep -B 1 \"BloodHound-linux-ia32 | head -n1 | cut x64id="$(echo "$response" | grep -B 1 \"BloodHound-linux-x64 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" macid="$(echo "$response" | grep -B 1 \"BloodHound-darwin-x64 | head -n1 | cut -d ":" -f 2 | cut -c 2- | sed 's/.$//')" -echo $response - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ ! $win32id == "" ]]; then curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id diff --git a/src/components/SearchContainer/Tabs/PrebuiltQueries.json b/src/components/SearchContainer/Tabs/PrebuiltQueries.json index 18441973b..ce69c8262 100644 --- a/src/components/SearchContainer/Tabs/PrebuiltQueries.json +++ b/src/components/SearchContainer/Tabs/PrebuiltQueries.json @@ -47,7 +47,7 @@ "requireNodeSelect": true, "nodeSelectQuery": { "query": "MATCH (n:Domain) RETURN n", - "onFinish": "MATCH (n:User) WHERE n.name ENDS WITH '{}' WITH n MATCH (n)-[r:MemberOf*1..]->(m:Group) WHERE NOT m.name ENDS WITH '{}' RETURN n,r,m", + "onFinish": "MATCH (n:User) WHERE n.name ENDS WITH ('@' + '{}') WITH n MATCH (n)-[r:MemberOf]->(m:Group) WHERE NOT m.name ENDS WITH ('@' + '{}') RETURN n,r,m", "start": "{}", "end": "", "allowCollapse": false, @@ -59,7 +59,7 @@ "requireNodeSelect": true, "nodeSelectQuery": { "query": "MATCH (n:Domain) RETURN n", - "onFinish": "MATCH (n:Group) WHERE n.name ENDS WITH '{}' WITH n MATCH (n)-[r:MemberOf*1..]->(m:Group) WHERE NOT m.name ENDS WITH '{}' RETURN n,r,m", + "onFinish": "MATCH (n:Group) WHERE n.name ENDS WITH ('@' + '{}') WITH n MATCH (n)-[r:MemberOf*1..]->(m:Group) WHERE NOT m.name ENDS WITH ('@' + '{}') RETURN n,r,m", "start": "{}", "end": "", "allowCollapse": false, From d630152bcac0d416f35177770b51ca3fe7968958 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 1 Sep 2016 22:27:58 -0400 Subject: [PATCH 21/21] Last changes! --- .travis.yml | 5 ++++- deploy.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cec61a38a..68eb81468 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,4 +34,7 @@ deploy: script: /bin/bash deploy.sh skip_cleanup: true on: - branch: CI-Test \ No newline at end of file + branch: CI-Test + +notifications: + email: false \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index da71e97cf..c9c76e178 100644 --- a/deploy.sh +++ b/deploy.sh @@ -11,7 +11,7 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then fi if [[ ! $x64id == "" ]]; then - curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id + curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$x64id fi curl -X POST -# --header 'Content-Type:application/zip' --data-binary @BloodHound-linux-ia32.zip --user "${GH_USER}" https://uploads.github.com/repos/adaptivethreat/BloodHound/releases/4033842/assets?name=BloodHound-linux-ia32.zip @@ -20,7 +20,7 @@ fi if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ ! $macid == "" ]]; then - curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$win32id + curl -s -X DELETE --user "${GH_USER}" https://api.github.com/repos/adaptivethreat/BloodHound/releases/assets/$macid fi curl -X POST -# --header 'Content-Type:application/zip' --data-binary @BloodHound-darwin-x64.zip --user "${GH_USER}" https://uploads.github.com/repos/adaptivethreat/BloodHound/releases/4033842/assets?name=BloodHound-darwin-x64.zip