This repository has been archived by the owner on Feb 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/noticket-gitlab-ci-changes' into 'master'
[NOTICKET] Add more checks to the gitlab ci See merge request heidelpay/heidelpayment5!122
- Loading branch information
Showing
10 changed files
with
105 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,95 @@ | ||
stages: | ||
- setup | ||
- test | ||
- setup | ||
- test | ||
- package | ||
|
||
cache: | ||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" | ||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" | ||
variables: | ||
MYSQL_RANDOM_ROOT_PASSWORD: "yes" | ||
MYSQL_DATABASE: shopware | ||
MYSQL_USER: shopware | ||
MYSQL_PASSWORD: shopware | ||
SHOPWARE_VERSION: "v5.6.0" # Tag | ||
COMPOSER_COMMAND: "composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader" | ||
|
||
services: | ||
- mysql:5.7 | ||
setup: | ||
stage: setup | ||
image: "edbizarro/gitlab-ci-pipeline-php:7.2" | ||
script: | ||
- mkdir -p /tmp/opt | ||
- git clone -b ${SHOPWARE_VERSION} https://github.com/shopware/shopware "/tmp/opt/shopware" | ||
- cd /tmp/opt/shopware && ${COMPOSER_COMMAND} | ||
- cp -r ${CI_PROJECT_DIR} /tmp/opt/shopware/custom/plugins/${CI_PROJECT_NAME} && cd /tmp/opt/shopware/custom/plugins/${CI_PROJECT_NAME} && ${COMPOSER_COMMAND} | ||
- cd /tmp/opt/shopware && composer dump-autoload -d custom/plugins/${CI_PROJECT_NAME} | ||
- cp -r /tmp/opt/shopware ${CI_PROJECT_DIR}/sw_dir | ||
artifacts: | ||
paths: | ||
- "sw_dir" | ||
expire_in: 1 days | ||
when: always | ||
|
||
variables: | ||
MYSQL_RANDOM_ROOT_PASSWORD: "yes" | ||
MYSQL_DATABASE: shopware | ||
MYSQL_USER: shopware | ||
MYSQL_PASSWORD: shopware | ||
codestyle: | ||
stage: test | ||
image: "edbizarro/gitlab-ci-pipeline-php:7.2" | ||
needs: | ||
- job: setup | ||
artifacts: true | ||
script: | ||
- cd ${CI_PROJECT_DIR}/sw_dir/custom/plugins/${CI_PROJECT_NAME} && vendor/bin/php-cs-fixer fix -v --dry-run | ||
cache: | ||
key: global | ||
paths: | ||
- .php_cs.cache | ||
|
||
SHOPWARE_VERSION: "5.6.0" | ||
k10r-phpstan: | ||
stage: test | ||
image: "edbizarro/gitlab-ci-pipeline-php:7.2" | ||
needs: | ||
- job: setup | ||
artifacts: true | ||
script: | ||
- cd ${CI_PROJECT_DIR}/sw_dir/custom/plugins/${CI_PROJECT_NAME} && vendor/bin/phpstan analyse . | ||
|
||
composer: | ||
stage: setup | ||
image: "edbizarro/gitlab-ci-pipeline-php:7.2" | ||
script: | ||
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader | ||
artifacts: | ||
paths: | ||
- vendor/ | ||
expire_in: 1 days | ||
when: always | ||
cache: | ||
paths: | ||
- vendor/ | ||
sw-phpstan: | ||
stage: test | ||
image: "edbizarro/gitlab-ci-pipeline-php:7.2" | ||
needs: | ||
- job: setup | ||
artifacts: true | ||
before_script: | ||
- cd /tmp && git clone https://github.com/shopwareLabs/store-plugin-codereview.git && store-plugin-codereview && ${COMPOSER_COMMAND} | ||
- cp -r /tmp/store-plugin-codereview/configs/phpstan/phpstan.neon.sw5 ${CI_PROJECT_DIR}/sw_dir/custom/plugins/${CI_PROJECT_NAME}/phpstan_sw.neon | ||
script: | ||
- cd ${CI_PROJECT_DIR}/sw_dir/custom/plugins/${CI_PROJECT_NAME} && vendor/bin/phpstan analyse -c phpstan_sw.neon -a vendor/autoload.php -a ../../../vendor/autoload.php . | ||
|
||
codestyle: | ||
stage: test | ||
image: "edbizarro/gitlab-ci-pipeline-php:7.2" | ||
dependencies: | ||
- composer | ||
script: | ||
- vendor/bin/php-cs-fixer fix -v --dry-run | ||
cache: | ||
key: global | ||
paths: | ||
- .php_cs.cache | ||
shopware-validate: | ||
image: | ||
name: friendsofshopware/plugin-uploader:0.3.5 | ||
entrypoint: [ "/bin/sh", "-c" ] | ||
stage: test | ||
only: | ||
- tags | ||
- master | ||
- /^fix.*$/ | ||
needs: | ||
- job: setup | ||
artifacts: true | ||
before_script: | ||
- rm -rf sw_dir | ||
script: | ||
- php /app/bin/pluginupload ext:zip . $CI_COMMIT_SHA | ||
- php /app/bin/pluginupload ext:validate *$CI_COMMIT_SHA.zip | ||
|
||
php-unit: | ||
image: "kellerkinder/shopware-testing:php71-1.0.0" | ||
stage: test | ||
dependencies: | ||
- composer | ||
script: | ||
- /usr/local/bin/clone-shopware "${CI_PROJECT_DIR}" ${SHOPWARE_VERSION} | ||
- mv ${CI_PROJECT_DIR}/opt /tmp/opt | ||
- cp -r ${CI_PROJECT_DIR} /tmp/opt/shopware-${SHOPWARE_VERSION}/custom/plugins/HeidelPayment | ||
- mv /tmp/opt ${CI_PROJECT_DIR}/opt | ||
- cd ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/build && ant -Ddb.name=${MYSQL_DATABASE} -Ddb.host=mysql -Ddb.user=${MYSQL_USER} -Ddb.password=${MYSQL_PASSWORD} configure && ant build-unit | ||
- cd ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/custom/plugins/HeidelPayment | ||
- php ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/composer.phar install -o | ||
- php ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/bin/console sw:plugin:refresh -v | ||
- php ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/bin/console sw:plugin:install --activate HeidelPayment -v | ||
- cd ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/custom/plugins/HeidelPayment && ${CI_PROJECT_DIR}/opt/shopware-${SHOPWARE_VERSION}/vendor/bin/phpunit | ||
package: | ||
image: kellerkinder/shopware-package-plugin:latest | ||
stage: package | ||
only: | ||
- tags | ||
- master | ||
- /^fix.*$/ | ||
script: | ||
- package-plugin | ||
artifacts: | ||
paths: | ||
- ${CI_PROJECT_NAME}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.