зеркало из https://github.com/mozilla/bedrock.git
Revert deployment changes (#5387)
* Revert "Fix container names in integration tests (#5386)" This reverts commitaec7d9ca7b
. * Revert "Use branch name in test container names; avoid conflicts (#5385)" This reverts commit24abfb303d
.
This commit is contained in:
Родитель
aec7d9ca7b
Коммит
ad4237afc7
|
@ -3,14 +3,14 @@
|
|||
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $BIN_DIR/set_git_env_vars.sh
|
||||
|
||||
docker stop bedrock-code-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}
|
||||
docker stop bedrock-code-${GIT_COMMIT_SHORT}
|
||||
|
||||
for NODE_NUMBER in `seq ${NUMBER_OF_NODES:-5}`;
|
||||
do
|
||||
docker stop bedrock-selenium-node-${NODE_NUMBER}-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}
|
||||
docker stop bedrock-selenium-node-${NODE_NUMBER}-${GIT_COMMIT_SHORT}
|
||||
done;
|
||||
|
||||
docker stop bedrock-selenium-hub-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}
|
||||
docker stop bedrock-selenium-hub-${GIT_COMMIT_SHORT}
|
||||
|
||||
# always report success
|
||||
exit 0
|
||||
|
|
|
@ -52,7 +52,7 @@ source $BIN_DIR/set_git_env_vars.sh
|
|||
if [ -z "${BASE_URL}" ]; then
|
||||
# start bedrock
|
||||
docker run -d --rm \
|
||||
--name bedrock-code-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT} \
|
||||
--name bedrock-code-${GIT_COMMIT_SHORT} \
|
||||
-e ALLOWED_HOSTS="*" \
|
||||
-e SECRET_KEY=foo \
|
||||
-e DEBUG=False \
|
||||
|
@ -60,7 +60,7 @@ if [ -z "${BASE_URL}" ]; then
|
|||
-e GUNICORN_WORKER_CLASS=sync \
|
||||
mozorg/bedrock_code:${GIT_COMMIT} bin/run-for-integration-tests.sh
|
||||
|
||||
DOCKER_LINKS=(--link bedrock-code-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}:bedrock)
|
||||
DOCKER_LINKS=(--link bedrock-code-${GIT_COMMIT_SHORT}:bedrock)
|
||||
BASE_URL="http://bedrock:8000"
|
||||
fi
|
||||
|
||||
|
@ -76,20 +76,20 @@ if [ "${DRIVER}" = "Remote" ]; then
|
|||
|
||||
# start selenium grid hub
|
||||
docker run -d --rm \
|
||||
--name bedrock-selenium-hub-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT} \
|
||||
--name bedrock-selenium-hub-${GIT_COMMIT_SHORT} \
|
||||
selenium/hub:${SELENIUM_VERSION}
|
||||
DOCKER_LINKS=(${DOCKER_LINKS[@]} --link bedrock-selenium-hub-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}:hub)
|
||||
DOCKER_LINKS=(${DOCKER_LINKS[@]} --link bedrock-selenium-hub-${GIT_COMMIT_SHORT}:hub)
|
||||
SELENIUM_HOST="hub"
|
||||
|
||||
# start selenium grid nodes
|
||||
for NODE_NUMBER in `seq ${NUMBER_OF_NODES:-5}`; do
|
||||
docker run -d --rm \
|
||||
--name bedrock-selenium-node-${NODE_NUMBER}-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT} \
|
||||
--name bedrock-selenium-node-${NODE_NUMBER}-${GIT_COMMIT_SHORT} \
|
||||
${DOCKER_LINKS[@]} \
|
||||
selenium/node-firefox:${SELENIUM_VERSION}
|
||||
while ! ${SELENIUM_READY}; do
|
||||
IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' bedrock-selenium-node-${NODE_NUMBER}-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}`
|
||||
CMD="docker run --rm --link bedrock-selenium-hub-${BRANCH_NAME_SAFE}-${GIT_COMMIT_SHORT}:hub tutum/curl curl http://hub:4444/grid/api/proxy/?id=http://${IP}:5555 | grep 'proxy found'"
|
||||
IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' bedrock-selenium-node-${NODE_NUMBER}-${GIT_COMMIT_SHORT}`
|
||||
CMD="docker run --rm --link bedrock-selenium-hub-${GIT_COMMIT_SHORT}:hub tutum/curl curl http://hub:4444/grid/api/proxy/?id=http://${IP}:5555 | grep 'proxy found'"
|
||||
if eval ${CMD}; then SELENIUM_READY=true; fi
|
||||
done
|
||||
done
|
||||
|
|
|
@ -11,7 +11,7 @@ fi
|
|||
if [[ "$GIT_TAG" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9])?$ ]]; then
|
||||
export GIT_TAG_DATE_BASED=true
|
||||
fi
|
||||
export GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
export BRANCH_NAME="$GIT_BRANCH"
|
||||
# BRANCH_NAME with "/" replaced with "-"
|
||||
export BRANCH_NAME_SAFE="${BRANCH_NAME/\//-}"
|
||||
if [[ -z "$GIT_BRANCH" ]]; then
|
||||
export GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
export BRANCH_NAME="$GIT_BRANCH"
|
||||
fi
|
||||
|
|
Загрузка…
Ссылка в новой задаче