Skip to content
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

Ci test #43

Merged
merged 21 commits into from
Sep 2, 2016
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
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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; 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

script:
- 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

deploy:
provider: script
script: /bin/bash deploy.sh
skip_cleanup: true
on:
branch: CI-Test

notifications:
email: false
36 changes: 36 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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
- npm install -g electron-packager

# Post-install test scripts.
test_script:
# Output useful info for debugging.
- 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

artifacts:
- path: BloodHound-win32-ia32.zip
name: BloodHound-win32-ia32
- 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
27 changes: 27 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -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/$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
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/$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
fi
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bloodhound",
"version": "1.0.0",
"version": "1.0.1",
"description": "Graph Theory for Active Directory",
"keywords": [
"Graph",
Expand All @@ -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": [
Expand Down
4 changes: 2 additions & 2 deletions src/components/SearchContainer/Tabs/PrebuiltQueries.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down