forked from SpecterOps/BloodHound-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request SpecterOps#43 from adaptivethreat/CI-Test
Ci test
- Loading branch information
Showing
5 changed files
with
109 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters