Yii2 framework backup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.4 KiB

updated debug settings (+56 squashed commits) Squashed commits: [c42f30c] updated base image, added docs & local test script [88f0c40] debug [6220c94] fixed network isolation [c63c7c3] test mssql only on test/mssql branch [74efc78] fixed isolation in after_script [02b895b] updated test setup [3335f39] updated retry [bd123b2] updated service checks [45e4c90] updated build [d54da7a] updated after_script [5a4c726] :factory: wait for mysql [08db878] fixed typo [ea53c1e] updated build stages [9807ce3] fixed typos [cf9f64e] fixed mssql testing [08001d6] added db create for mssql [62f6b65] run travis (gitlab simulation) only in travis branch [cf63da4] streamlined build [76808ac] updated test jobs [18d79b5] fixed test error [7b2bce6] updated build & composer.lock [244623a] updated build [86bd71b] fixed cleanup [86ab2e8] fixed cleanup [091d4b8] fixed tests [2d315b5] fixed build config [2913644] fixed project names [f53b823] refactored build config [5a791fb] refactored docker db-tests [b4479b0] revert [a975fa5] updated gitlab build [4e4e5e4] updated mssql setup [d6ff03b] added sleep workaround [578b102] removed host volumes in test [928f50b] fixed path [967ab10] updated tests [520f317] bootstrap cubrid [5f245e1] :factory: fixed cubrid tests [940dbbc] :factory: pinned cubrid version 9.3.6.0002 [8d5ea69] :memo: dockerized test commands [9954b54] updated cubrid [fb3afac] updated docs [3f63ced] updated isolation [bdc3c83] :factory: build cubrid [b777911] :factory: disabled mssql, updated cubrid [36534e7] added travis-a-like stage [6546f02] updated GitLab build [c046096] updated test setup - added mssql and cubrid stack [5a0e635] disabled host-volume [75cf342] fixed test [8de0794] fixed testing [465d27a] added stages [63aa950] added script [68eecef] fixed typo [00e4b88] updated Docker build [f9072cc] added dockerized test setup
8 years ago
#!/usr/bin/env bash
# Generate a "hash" from 0-99 for subnet tuple (10, 11, ..., 199) - it's a hack
updated debug settings (+56 squashed commits) Squashed commits: [c42f30c] updated base image, added docs & local test script [88f0c40] debug [6220c94] fixed network isolation [c63c7c3] test mssql only on test/mssql branch [74efc78] fixed isolation in after_script [02b895b] updated test setup [3335f39] updated retry [bd123b2] updated service checks [45e4c90] updated build [d54da7a] updated after_script [5a4c726] :factory: wait for mysql [08db878] fixed typo [ea53c1e] updated build stages [9807ce3] fixed typos [cf9f64e] fixed mssql testing [08001d6] added db create for mssql [62f6b65] run travis (gitlab simulation) only in travis branch [cf63da4] streamlined build [76808ac] updated test jobs [18d79b5] fixed test error [7b2bce6] updated build & composer.lock [244623a] updated build [86bd71b] fixed cleanup [86ab2e8] fixed cleanup [091d4b8] fixed tests [2d315b5] fixed build config [2913644] fixed project names [f53b823] refactored build config [5a791fb] refactored docker db-tests [b4479b0] revert [a975fa5] updated gitlab build [4e4e5e4] updated mssql setup [d6ff03b] added sleep workaround [578b102] removed host volumes in test [928f50b] fixed path [967ab10] updated tests [520f317] bootstrap cubrid [5f245e1] :factory: fixed cubrid tests [940dbbc] :factory: pinned cubrid version 9.3.6.0002 [8d5ea69] :memo: dockerized test commands [9954b54] updated cubrid [fb3afac] updated docs [3f63ced] updated isolation [bdc3c83] :factory: build cubrid [b777911] :factory: disabled mssql, updated cubrid [36534e7] added travis-a-like stage [6546f02] updated GitLab build [c046096] updated test setup - added mssql and cubrid stack [5a0e635] disabled host-volume [75cf342] fixed test [8de0794] fixed testing [465d27a] added stages [63aa950] added script [68eecef] fixed typo [00e4b88] updated Docker build [f9072cc] added dockerized test setup
8 years ago
echo "Creating CI_BUILD_ID and CI_PIPELINE_ID from first argument..."
export CI_BUILD_ID=$(expr $((32#${1})) % 99)
updated debug settings (+56 squashed commits) Squashed commits: [c42f30c] updated base image, added docs & local test script [88f0c40] debug [6220c94] fixed network isolation [c63c7c3] test mssql only on test/mssql branch [74efc78] fixed isolation in after_script [02b895b] updated test setup [3335f39] updated retry [bd123b2] updated service checks [45e4c90] updated build [d54da7a] updated after_script [5a4c726] :factory: wait for mysql [08db878] fixed typo [ea53c1e] updated build stages [9807ce3] fixed typos [cf9f64e] fixed mssql testing [08001d6] added db create for mssql [62f6b65] run travis (gitlab simulation) only in travis branch [cf63da4] streamlined build [76808ac] updated test jobs [18d79b5] fixed test error [7b2bce6] updated build & composer.lock [244623a] updated build [86bd71b] fixed cleanup [86ab2e8] fixed cleanup [091d4b8] fixed tests [2d315b5] fixed build config [2913644] fixed project names [f53b823] refactored build config [5a791fb] refactored docker db-tests [b4479b0] revert [a975fa5] updated gitlab build [4e4e5e4] updated mssql setup [d6ff03b] added sleep workaround [578b102] removed host volumes in test [928f50b] fixed path [967ab10] updated tests [520f317] bootstrap cubrid [5f245e1] :factory: fixed cubrid tests [940dbbc] :factory: pinned cubrid version 9.3.6.0002 [8d5ea69] :memo: dockerized test commands [9954b54] updated cubrid [fb3afac] updated docs [3f63ced] updated isolation [bdc3c83] :factory: build cubrid [b777911] :factory: disabled mssql, updated cubrid [36534e7] added travis-a-like stage [6546f02] updated GitLab build [c046096] updated test setup - added mssql and cubrid stack [5a0e635] disabled host-volume [75cf342] fixed test [8de0794] fixed testing [465d27a] added stages [63aa950] added script [68eecef] fixed typo [00e4b88] updated Docker build [f9072cc] added dockerized test setup
8 years ago
export CI_PIPELINE_ID=${1}
# Copy snippets from https://git.hrzg.de/ci/lint
case $1 in
'default')
export ISOLATION=buildpipeline${CI_PIPELINE_ID}
export COMPOSE_PROJECT_NAME=${ISOLATION}
export TUPLE_C=$(expr ${CI_BUILD_ID} % 255)
echo ${TUPLE_C}
docker-compose up -d
docker-compose run --rm php vendor/bin/phpunit -v --exclude caching,db
docker-compose down -v
;;
'caching')
export ISOLATION=buildpipeline${CI_PIPELINE_ID}
export COMPOSE_PROJECT_NAME=${ISOLATION}
export TUPLE_C=$(expr ${CI_BUILD_ID} % 255)
echo ${TUPLE_C}
export COMPOSE_PROJECT_NAME=${ISOLATION}caching
docker-compose up -d
docker-compose run --rm php bash -c "while ! curl mysql:3306; do ((c++)) && ((c==30)) && break; sleep 2; done"
docker-compose run --rm php vendor/bin/phpunit -v --group caching
docker-compose down -v
;;
'mssql')
export ISOLATION=buildpipeline${CI_PIPELINE_ID}
export COMPOSE_PROJECT_NAME=${ISOLATION}
export TUPLE_C=$(expr ${CI_BUILD_ID} % 255)
echo ${TUPLE_C}
cd mssql
docker-compose up --build -d
docker-compose run --rm php bash -c 'while [ true ]; do curl mssql:1433; if [ $? == 52 ]; then break; fi; ((c++)) && ((c==15)) && break; sleep 5; done'
sleep 10
docker-compose run --rm sqlcmd sh -c 'sqlcmd -S mssql -U sa -Q "CREATE DATABASE yii2test" -P Microsoft-12345'
sleep 10
docker-compose logs mssql
docker-compose config
pwd
docker-compose ps
docker-compose run --rm php php -i
updated debug settings (+56 squashed commits) Squashed commits: [c42f30c] updated base image, added docs & local test script [88f0c40] debug [6220c94] fixed network isolation [c63c7c3] test mssql only on test/mssql branch [74efc78] fixed isolation in after_script [02b895b] updated test setup [3335f39] updated retry [bd123b2] updated service checks [45e4c90] updated build [d54da7a] updated after_script [5a4c726] :factory: wait for mysql [08db878] fixed typo [ea53c1e] updated build stages [9807ce3] fixed typos [cf9f64e] fixed mssql testing [08001d6] added db create for mssql [62f6b65] run travis (gitlab simulation) only in travis branch [cf63da4] streamlined build [76808ac] updated test jobs [18d79b5] fixed test error [7b2bce6] updated build & composer.lock [244623a] updated build [86bd71b] fixed cleanup [86ab2e8] fixed cleanup [091d4b8] fixed tests [2d315b5] fixed build config [2913644] fixed project names [f53b823] refactored build config [5a791fb] refactored docker db-tests [b4479b0] revert [a975fa5] updated gitlab build [4e4e5e4] updated mssql setup [d6ff03b] added sleep workaround [578b102] removed host volumes in test [928f50b] fixed path [967ab10] updated tests [520f317] bootstrap cubrid [5f245e1] :factory: fixed cubrid tests [940dbbc] :factory: pinned cubrid version 9.3.6.0002 [8d5ea69] :memo: dockerized test commands [9954b54] updated cubrid [fb3afac] updated docs [3f63ced] updated isolation [bdc3c83] :factory: build cubrid [b777911] :factory: disabled mssql, updated cubrid [36534e7] added travis-a-like stage [6546f02] updated GitLab build [c046096] updated test setup - added mssql and cubrid stack [5a0e635] disabled host-volume [75cf342] fixed test [8de0794] fixed testing [465d27a] added stages [63aa950] added script [68eecef] fixed typo [00e4b88] updated Docker build [f9072cc] added dockerized test setup
8 years ago
docker-compose run --rm php vendor/bin/phpunit -v --group mssql
docker-compose down -v --remove-orphans
updated debug settings (+56 squashed commits) Squashed commits: [c42f30c] updated base image, added docs & local test script [88f0c40] debug [6220c94] fixed network isolation [c63c7c3] test mssql only on test/mssql branch [74efc78] fixed isolation in after_script [02b895b] updated test setup [3335f39] updated retry [bd123b2] updated service checks [45e4c90] updated build [d54da7a] updated after_script [5a4c726] :factory: wait for mysql [08db878] fixed typo [ea53c1e] updated build stages [9807ce3] fixed typos [cf9f64e] fixed mssql testing [08001d6] added db create for mssql [62f6b65] run travis (gitlab simulation) only in travis branch [cf63da4] streamlined build [76808ac] updated test jobs [18d79b5] fixed test error [7b2bce6] updated build & composer.lock [244623a] updated build [86bd71b] fixed cleanup [86ab2e8] fixed cleanup [091d4b8] fixed tests [2d315b5] fixed build config [2913644] fixed project names [f53b823] refactored build config [5a791fb] refactored docker db-tests [b4479b0] revert [a975fa5] updated gitlab build [4e4e5e4] updated mssql setup [d6ff03b] added sleep workaround [578b102] removed host volumes in test [928f50b] fixed path [967ab10] updated tests [520f317] bootstrap cubrid [5f245e1] :factory: fixed cubrid tests [940dbbc] :factory: pinned cubrid version 9.3.6.0002 [8d5ea69] :memo: dockerized test commands [9954b54] updated cubrid [fb3afac] updated docs [3f63ced] updated isolation [bdc3c83] :factory: build cubrid [b777911] :factory: disabled mssql, updated cubrid [36534e7] added travis-a-like stage [6546f02] updated GitLab build [c046096] updated test setup - added mssql and cubrid stack [5a0e635] disabled host-volume [75cf342] fixed test [8de0794] fixed testing [465d27a] added stages [63aa950] added script [68eecef] fixed typo [00e4b88] updated Docker build [f9072cc] added dockerized test setup
8 years ago
;;
'pgsql')
export ISOLATION=buildpipeline${CI_PIPELINE_ID}
export COMPOSE_PROJECT_NAME=${ISOLATION}
export TUPLE_C=$(expr ${CI_BUILD_ID} % 255)
echo ${TUPLE_C}
export COMPOSE_PROJECT_NAME=${ISOLATION}pgsql
docker-compose up -d
docker-compose run --rm php bash -c 'while [ true ]; do curl postgres:5432; if [ $? == 52 ]; then break; fi; ((c++)) && ((c==25)) && break; sleep 2; done'
docker-compose run --rm php vendor/bin/phpunit -v --group pgsql
docker-compose down -v
;;
*)
echo "Warning: No job argument specified"
;;
esac
echo "Done."