Skip to content
Snippets Groups Projects
Commit 5c11e0c8 authored by Krzysiek's avatar Krzysiek
Browse files

CI 1.10.12

parent 9cf7d8ec
No related branches found
No related tags found
No related merge requests found
#1.10.11
before_script:
- cd ${CI_PROJECT_DIR}
variables: variables:
WPDESK_CI_VERSION: 1.10.12
MYSQL_ROOT_PASSWORD: mysql MYSQL_ROOT_PASSWORD: mysql
MYSQL_DATABASE: wptest MYSQL_DATABASE: wptest
MYSQL_USER: mysql MYSQL_USER: mysql
...@@ -20,76 +17,123 @@ stages: ...@@ -20,76 +17,123 @@ stages:
.template: &job-test-template .template: &job-test-template
stage: tests stage: tests
coverage: '/^\s*Lines:\s*\d+.\d+\%/' coverage: '/^\s*Lines:\s*\d+.\d+\%/'
only:
- devel
- master
.template: &job-test-integration-template .template: &job-test-integration-template
<<: *job-test-template <<: *job-test-template
services: services:
- mysql - mysql
script: script:
- echo ${WPDESK_CI_VERSION}
- ls -l - ls -l
- php --version - php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- composer update --no-progress - composer update --no-progress
- if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi - if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi
- composer phpunit-integration - composer phpunit-integration
only:
- tags
.template: &job-test-integration-template-fast
<<: *job-test-integration-template
script:
- echo ${WPDESK_CI_VERSION}
- ls -l
- php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- composer update --no-progress
- if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi
- composer phpunit-integration-fast
except:
- tags
only:
.template: &job-test-unit-template .template: &job-test-unit-template
<<: *job-test-template <<: *job-test-template
script: script:
- echo ${WPDESK_CI_VERSION}
- ls -l - ls -l
- php --version - php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- composer update --no-progress - composer update --no-progress
- composer phpunit-unit - composer phpunit-unit
only:
- tags
.template: &job-test-unit-template-fast
<<: *job-test-unit-template
script:
- echo ${WPDESK_CI_VERSION}
- ls -l
- php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- composer update --no-progress
- composer phpunit-unit-fast
except:
- tags
only:
.template: &job-deploy-template .template: &job-deploy-template
image: wpdesknet/amazon-svn-deploy image: wpdesknet/amazon-svn-deploy
stage: deploy stage: deploy
dependencies: dependencies:
- build to deploy - build to deploy
- unit test lastest coverage
- integration test lastest coverage
retry: 2 retry: 2
when: manual when: manual
only: only:
- tags - tags
before_script:
- cd ${CI_PROJECT_DIR}
code style test: code style test:
<<: *job-test-template stage: tests
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
allow_failure: true allow_failure: true
script: script:
- ls -l - echo ${WPDESK_CI_VERSION}
- php --version - composer update --no-progress
- composer phpcs - composer phpcs
unit test lastest: unit test lastest:
<<: *job-test-unit-template <<: *job-test-unit-template-fast
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
only:
integration test lastest: integration test lastest:
<<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:0-0
unit test lastest coverage:
<<: *job-test-unit-template
image: wpdesknet/phpunit-woocommerce:0-0
integration test lastest coverage:
<<: *job-test-integration-template <<: *job-test-integration-template
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
only:
integration test php7-1 wc-1: integration test php7-1 wc-1:
<<: *job-test-integration-template <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:1-1 image: wpdesknet/phpunit-woocommerce:1-1
integration test php7 wc-2: integration test php7 wc-2:
<<: *job-test-integration-template <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:2-2 image: wpdesknet/phpunit-woocommerce:2-2
integration test php-7 wc-3: integration test php-7 wc-3:
<<: *job-test-integration-template <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:2-3 image: wpdesknet/phpunit-woocommerce:2-3
integration test php5-6: integration test php5-6:
<<: *job-test-integration-template <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:3-0 image: wpdesknet/phpunit-woocommerce:3-0
integration test php5-5: integration test php5-5:
<<: *job-test-integration-template <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:4-0 image: wpdesknet/phpunit-woocommerce:4-0
apigen docs: apigen docs:
...@@ -102,6 +146,7 @@ apigen docs: ...@@ -102,6 +146,7 @@ apigen docs:
paths: paths:
- docs/ - docs/
script: script:
- echo ${WPDESK_CI_VERSION}
- ls -l - ls -l
- /app/vendor/bin/apigen generate - /app/vendor/bin/apigen generate
- php /app/hooks-docs.php ${CI_PROJECT_DIR} - php /app/hooks-docs.php ${CI_PROJECT_DIR}
...@@ -115,6 +160,7 @@ pages: ...@@ -115,6 +160,7 @@ pages:
script: script:
- rm -rf public - rm -rf public
- mv docs/ public/ - mv docs/ public/
- 'curl -X POST --data-urlencode "payload={\"text\": \"Dokumentacja projektu ${CI_PROJECT_NAME} w wersji ${CI_COMMIT_REF_NAME} umieszczona w <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}/pages|pages> \", }" https://hooks.slack.com/services/${SLACK_AUTH}'
artifacts: artifacts:
expire_in: 1 day expire_in: 1 day
paths: paths:
...@@ -132,6 +178,7 @@ build to deploy: ...@@ -132,6 +178,7 @@ build to deploy:
- release - release
- release.zip - release.zip
script: script:
- echo ${WPDESK_CI_VERSION}
- php --version - php --version
- ls -l - ls -l
- /tmp/set_version.sh ${CI_COMMIT_REF_NAME} - /tmp/set_version.sh ${CI_COMMIT_REF_NAME}
...@@ -152,8 +199,9 @@ build to deploy: ...@@ -152,8 +199,9 @@ build to deploy:
deploy to shop: deploy to shop:
<<: *job-deploy-template <<: *job-deploy-template
script: script:
- echo ${WPDESK_CI_VERSION}
- /tmp/deploy_shop.sh ${CI_PROJECT_NAME} release.zip ${CI_PROJECT_NAME}.zip - /tmp/deploy_shop.sh ${CI_PROJECT_NAME} release.zip ${CI_PROJECT_NAME}.zip
- 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do sklepu w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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' - 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do sklepu w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/${SLACK_AUTH}'
environment: environment:
name: wpdesk shop name: wpdesk shop
url: https://wpdeskplugin.s3.amazonaws.com/${CI_PROJECT_NAME}.zip url: https://wpdeskplugin.s3.amazonaws.com/${CI_PROJECT_NAME}.zip
...@@ -161,8 +209,9 @@ deploy to shop: ...@@ -161,8 +209,9 @@ deploy to shop:
deploy to demo: deploy to demo:
<<: *job-deploy-template <<: *job-deploy-template
script: script:
- echo ${WPDESK_CI_VERSION}
- /tmp/deploy_demo.sh release/${CI_PROJECT_NAME} ${CI_PROJECT_NAME} - /tmp/deploy_demo.sh release/${CI_PROJECT_NAME} ${CI_PROJECT_NAME}
- 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do demo w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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' - 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do demo w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/${SLACK_AUTH}'
environment: environment:
name: wpdesk demo name: wpdesk demo
url: https://demo.wpdesk.org url: https://demo.wpdesk.org
...@@ -170,10 +219,11 @@ deploy to demo: ...@@ -170,10 +219,11 @@ deploy to demo:
deploy to repository: deploy to repository:
<<: *job-deploy-template <<: *job-deploy-template
script: script:
- echo ${WPDESK_CI_VERSION}
- rm -rf /tmp/svn-repository - rm -rf /tmp/svn-repository
- mkdir /tmp/svn-repository - mkdir /tmp/svn-repository
- /tmp/deploy_repository.sh ${CI_PROJECT_NAME} release/${CI_PROJECT_NAME} /tmp/svn-repository - /tmp/deploy_repository.sh ${CI_PROJECT_NAME} release/${CI_PROJECT_NAME} /tmp/svn-repository
- 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do repozytorium WP w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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' - 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do repozytorium WP w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/${SLACK_AUTH}'
environment: environment:
name: wordpress repository name: wordpress repository
url: https://downloads.wordpress.org/plugin/${CI_PROJECT_NAME}.${CI_COMMIT_REF_NAME}.zip url: https://downloads.wordpress.org/plugin/${CI_PROJECT_NAME}.${CI_COMMIT_REF_NAME}.zip
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
"test": "echo composer is alive", "test": "echo composer is alive",
"phpcs": "phpcs", "phpcs": "phpcs",
"phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never", "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
"phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
"phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never", "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
"phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage",
"docs": "apigen generate" "docs": "apigen generate"
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment