зеркало из https://github.com/mozilla/MozDef.git
Merge pull request #1141 from mozilla/fix_rabbit_pw
simplify deploy script and reduce code dup!
This commit is contained in:
Коммит
90436ad45a
|
@ -17,46 +17,20 @@ echo "Begin build / test of the MozDef codebase."
|
|||
|
||||
echo "Tests complete. Now reasoning about the webhook event."
|
||||
|
||||
if [[ "branch/master" == "$CODEBUILD_WEBHOOK_TRIGGER" ]]
|
||||
then
|
||||
echo "Building a release from the edge of master branch."
|
||||
if [[ "branch/master" == "$CODEBUILD_WEBHOOK_TRIGGER" \
|
||||
|| "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^tag\/[0-9]\.[0-9]\.[0-9](\-(pre|testing))?$ \
|
||||
|| "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^tag\/[0-9]\.[0-9]\.[0-9](\-(prod))?$ \
|
||||
|| "branch/march_swarm" == "$CODEBUILD_WEBHOOK_TRIGGER" ]]; then
|
||||
echo "Building a release"
|
||||
echo "C|_| This may take a bit. Might as well grab a coffee."
|
||||
make build-from-cwd
|
||||
make hub-login
|
||||
cd cloudy_mozdef
|
||||
make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` packer-build-github
|
||||
cd ../ && make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` hub-tagged
|
||||
elif [[ "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^tag\/[0-9]\.[0-9]\.[0-9](\-(pre|testing))?$ ]]
|
||||
then
|
||||
echo "Building a release from a pre-release tag."
|
||||
echo "C|_| This may take a bit. Might as well grab a coffee."
|
||||
make build-from-cwd
|
||||
make hub-login
|
||||
cd cloudy_mozdef
|
||||
make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` packer-build-github
|
||||
cd ../ && make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` hub-tagged
|
||||
elif [[ "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^tag\/[0-9]\.[0-9]\.[0-9](\-(prod))?$ ]]
|
||||
then
|
||||
echo "echo Building a production release from a tag."
|
||||
echo "C|_| This may take a bit. Might as well grab a coffee."
|
||||
echo "Congrats on the release! --~~~=:>[XXXXXXXXX]>"
|
||||
make build-from-cwd
|
||||
make hub-login
|
||||
cd cloudy_mozdef
|
||||
make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` packer-build-github
|
||||
cd ../ && make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` hub-tagged
|
||||
# Temporary inclusion for march swarm. Remove after march 23 2019
|
||||
elif [[ "branch/march_swarm" == "$CODEBUILD_WEBHOOK_TRIGGER" ]]
|
||||
then
|
||||
echo "Building a release from the march_swarm branch."
|
||||
echo "C|_| This may take a bit. Might as well grab a coffee."
|
||||
make build-from-cwd
|
||||
make hub-login
|
||||
cd cloudy_mozdef
|
||||
make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` packer-build-github
|
||||
cd ../ && make BRANCH=`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2` hub-tagged
|
||||
BRANCH="`echo $CODEBUILD_WEBHOOK_TRIGGER | cut -d '/' -f2`"
|
||||
make BRANCH=${BRANCH} packer-build-github
|
||||
make publish-versioned-templates
|
||||
cd ../ && make BRANCH={{ user `github_branch`}} set-version-and-fetch-docker-container
|
||||
cd ../ && make BRANCH=${BRANCH} hub-tagged
|
||||
fi
|
||||
|
||||
echo "End build / test of the MozDef codebase."
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче