Skip to content
Snippets Groups Projects
Commit a02b711c authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

remove gitlab ci config for now

parent 6b24c984
No related branches found
No related tags found
No related merge requests found
image: registry.gitlab.tugraz.at/dbp/middleware/api/main:v9
variables:
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/_composer_cache"
cache:
key: ${CI_PROJECT_PATH}
paths:
- _composer_cache
stages:
- test
- deploy
.test_defaults: &test_defaults
script:
- sudo update-alternatives --set php "/usr/bin/${PHP}"
- composer install
- composer symfony:dump-env test
- ./bin/phpunit -v
- mkdocs build -f docs/mkdocs.yml
- ./composer-foreach install
- ./composer-foreach test
test-php7.3:
stage: test
variables:
PHP: "php7.3"
<<: *test_defaults
test-php7.4:
stage: test
variables:
PHP: "php7.4"
<<: *test_defaults
psalm:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.3
- ./composer-foreach install
- ./composer-foreach run psalm
phpstan:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.3
- ./composer-foreach install
- ./composer-foreach run phpstan
cs-fixer:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.3
- ./composer-foreach install
- ./composer-foreach run cs
.deploy_defaults: &deploy_defaults
except:
- schedules
stage: deploy
script:
- sudo update-alternatives --set php /usr/bin/php7.3
# Add ssh key
- mkdir -p ~/.ssh
- echo "${DEPLOY_KEY}" | tr -d '\r' > ~/.ssh/id_rsa
- chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -t rsa "${DEPLOY_HOST}" >> ~/.ssh/known_hosts
# Deploy
- dep deploy "${CI_ENVIRONMENT_NAME}"
- echo "Deployed to ${CI_ENVIRONMENT_URL}"
# Simple health check
- curl --max-time 10 --retry 3 --output /dev/null --silent --show-error --fail --location "${CI_ENVIRONMENT_URL}"
deploy_development:
only:
refs:
- master
environment:
name: development
url: https://mw-dev.tugraz.at
variables:
DEPLOY_HOST: mw01-dev.tugraz.at
DEPLOY_KEY: "$DEPLOY_SSH_KEY"
<<: *deploy_defaults
deploy_demo:
only:
refs:
- demo
environment:
name: demo
url: https://api-demo.tugraz.at
variables:
DEPLOY_HOST: mw01-dev.tugraz.at
DEPLOY_KEY: "$DEPLOY_SSH_KEY"
<<: *deploy_defaults
deploy_production:
only:
refs:
- production
environment:
name: production
url: https://api.tugraz.at
variables:
DEPLOY_HOST: mw01-prod.tugraz.at
DEPLOY_KEY: "$DEPLOY_SSH_KEY"
<<: *deploy_defaults
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment