forked from mozilla/MozDef
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/mozilla/mozdef
- Loading branch information
Showing
36 changed files
with
501 additions
and
112 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
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,15 @@ | ||
# Community Participation Guidelines | ||
|
||
This repository is governed by Mozilla's code of conduct and etiquette guidelines. | ||
For more details, please read the | ||
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/). | ||
|
||
## How to Report | ||
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page. | ||
|
||
<!-- | ||
## Project Specific Etiquette | ||
In some cases, there will be additional project etiquette i.e.: (https://bugzilla.mozilla.org/page.cgi?id=etiquette.html). | ||
Please update for your project. | ||
--> |
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
Empty file.
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
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,14 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
commands: | ||
- echo 'Codebuild is ubuntu 14.04 installing packer to compensate Someone should build a ci docker container \;).' | ||
- wget -nv https://releases.hashicorp.com/packer/1.3.5/packer_1.3.5_linux_amd64.zip | ||
- unzip packer_1.3.5_linux_amd64.zip | ||
- chmod +x packer | ||
- mv packer /usr/bin/ | ||
build: | ||
commands: | ||
- mkdir -p serverless-functions/build/python/lib/python3.6/site-packages | ||
- bash cloudy_mozdef/ci/deploy |
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,34 @@ | ||
#!/bin/bash | ||
|
||
set -e # Exit immediately if a command exits with a non-zero status. | ||
|
||
echo 'Welcome GitHub webhook to the CodeBuild Job of MozDef.' | ||
echo "It's dangerous to go alone. Take one of these: <%%%%|==========>" | ||
|
||
# echo "Begin test of the MozDef codebase." | ||
# export COMPOSE_INTERACTIVE_NO_CLI=1 make tests | ||
# The above does not currently work in a non-interactive TTY. | ||
# Fails with error | ||
# docker run -it --rm mozdef/mozdef_tester bash -c "source /opt/mozdef/envs/python/bin/activate && flake8 --config .flake8 ./" | ||
# the input device is not a TTY | ||
# make: *** [run-tests] Error 1 | ||
# Then again we probably do not need to run the test suite here because it has been run three times to get the code here. | ||
# echo "Tests complete. | ||
|
||
echo "Processing webhook event for ${CODEBUILD_WEBHOOK_TRIGGER}." | ||
|
||
if [[ "branch/master" == "$CODEBUILD_WEBHOOK_TRIGGER" \ | ||
|| "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^tag\/v[0-9]+\.[0-9]+\.[0-9]+(\-(prod|pre|testing))?$ ]]; then | ||
echo "Building a release" | ||
echo "C|_| This may take a bit. Might as well grab a coffee." | ||
make build-from-cwd | ||
cd cloudy_mozdef | ||
BRANCH="`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2`" | ||
make BRANCH=${BRANCH} packer-build-github | ||
make BRANCH=${BRANCH} publish-versioned-templates | ||
cd .. | ||
make hub-login | ||
make BRANCH=${BRANCH} docker-push-tagged | ||
fi | ||
|
||
echo "End build of the MozDef codebase." |
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,22 @@ | ||
#!/bin/bash | ||
|
||
action="${1}" | ||
branch="${2}" | ||
|
||
for name in mozdef_meteor mozdef_base mozdef_tester mozdef_mq_worker mozdef_kibana \ | ||
mozdef_syslog mozdef_cron mozdef_elasticsearch mozdef_loginput mozdef_mongodb \ | ||
mozdef_bootstrap mozdef_alerts mozdef_nginx mozdef_alertactions mozdef_rabbitmq \ | ||
mozdef_rest mozdef_base ; do | ||
if [ "${action}" == "tag" ]; then | ||
if [ "${branch}" == "master" ]; then | ||
docker tag mozdef/${name}:latest mozdef/${name}:${branch} | ||
else | ||
docker tag mozdef/${name}:${branch} | ||
fi | ||
elif [ "${action}" == "push" ]; then | ||
docker push mozdef/${name}:${branch} | ||
if [ "${branch}" == "master" ]; then | ||
docker push mozdef/${name}:latest | ||
fi | ||
fi | ||
done |
Oops, something went wrong.