Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #12 from heidelpay/develop
Browse files Browse the repository at this point in the history
Beta Release of Plugin in V 0.0.1
  • Loading branch information
Sascha authored Jun 29, 2020
2 parents 2b712b5 + 04c105a commit a477c2a
Show file tree
Hide file tree
Showing 270 changed files with 9,363 additions and 10,725 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/Resources/public
src/Resources/app/**/dist
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const isDevMode = process.env.NODE_ENV !== 'production';

module.exports = {
root: true,
'extends': 'eslint:recommended',
'parser': 'babel-eslint',
'env': {
'browser': true,
'jquery': true,
'node': true,
'es6': true,
},
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
},
'globals': {
'Shopware': true,
'Klarna': true
},
'rules': {
'comma-dangle': ['error', 'always-multiline'],
'no-console': 0,
'no-debugger': (isDevMode ? 0 : 2),
'prefer-const': 'warn',
'quotes': ['warn', 'single'],
'indent': ['warn', 4, {
'SwitchCase': 1,
}],
},
};
6 changes: 0 additions & 6 deletions .githooks/install_hooks.sh

This file was deleted.

238 changes: 0 additions & 238 deletions .githooks/pre-commit

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
vendor
.phpunit.result.cache
.idea
package-lock.json
cypress.json
node_modules
67 changes: 41 additions & 26 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
stages:
- setup
- test

cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
- package

variables:
MYSQL_ROOT_PASSWORD: shopware
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: shopware
MYSQL_USER: shopware
MYSQL_PASSWORD: shopware
SHOPWARE_BRANCH: 'v6.0.0+ea1.1'
PLUGIN_NAME: HeidelPayment6
SHOPWARE_VERSION: "v6.2.0" # Tag

cache:
key: "$PLUGIN_NAME-$CI_COMMIT_REF_SLUG"

composer:
stage: setup
image: "edbizarro/gitlab-ci-pipeline-php:7.3"
image: "edbizarro/gitlab-ci-pipeline-php:7.2"
script:
- composer install --no-ansi --no-interaction --no-progress --optimize-autoloader
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader
artifacts:
paths:
- vendor/
Expand All @@ -29,16 +31,23 @@ composer:

phpstan:
stage: test
image: "edbizarro/gitlab-ci-pipeline-php:7.3"
image: "edbizarro/gitlab-ci-pipeline-php:7.2"
dependencies:
- composer
script:
- composer install
- vendor/bin/phpstan analyse -l 5 -c phpstan.neon src
- git clone -b ${SHOPWARE_VERSION} https://github.com/shopware/development "${CI_PROJECT_DIR}/opt/shopware"
- rm -rf "${CI_PROJECT_DIR}/opt/shopware/platform"
- git clone -b ${SHOPWARE_VERSION} https://github.com/shopware/platform "${CI_PROJECT_DIR}/opt/shopware/platform"
- mv ${CI_PROJECT_DIR}/opt /tmp/opt
- cp -r ${CI_PROJECT_DIR} /tmp/opt/shopware/custom/plugins/${PLUGIN_NAME}
- mv /tmp/opt ${CI_PROJECT_DIR}/opt
- cd ${CI_PROJECT_DIR}/opt/shopware && composer install --no-interaction --optimize-autoloader --no-suggest --no-scripts
- cd ${CI_PROJECT_DIR}/opt/shopware && composer dump-autoload -d custom/plugins/${PLUGIN_NAME}
- cd ${CI_PROJECT_DIR}/opt/shopware/custom/plugins/${PLUGIN_NAME} && vendor/bin/phpstan analyse -c phpstan.neon --autoload-file=${CI_PROJECT_DIR}/opt/shopware/vendor/autoload.php src

codestyle:
stage: test
image: "edbizarro/gitlab-ci-pipeline-php:7.3"
image: "edbizarro/gitlab-ci-pipeline-php:7.2"
dependencies:
- composer
script:
Expand All @@ -48,22 +57,28 @@ codestyle:
paths:
- .php_cs.cache

phpunit:
image: "edbizarro/gitlab-ci-pipeline-php:7.3"
stage: test
package:
image: kellerkinder/shopware-package-plugin:latest
stage: package
only:
- tags
- master
services:
- mysql:5.7
dependencies:
- composer
script:
- sudo apt-get update && sudo apt-get install default-mysql-client -y
- git clone https://github.com/shopware/development -b "${SHOPWARE_BRANCH}" "${CI_PROJECT_DIR}/opt/shopware"
- mv ${CI_PROJECT_DIR}/opt /tmp/opt
- cp -r ${CI_PROJECT_DIR} /tmp/opt/shopware/custom/plugins/HeidelPayment
- cd /tmp/opt/shopware/custom/plugins/HeidelPayment && composer install
- mv /tmp/opt ${CI_PROJECT_DIR}/opt
- 'printf "const:\n APP_ENV: \"dev\"\n APP_URL: \"http://localhost\"\n DB_HOST: \"mysql\"\n DB_PORT: \"3306\"\n DB_NAME: \"${MYSQL_DATABASE}\"\n DB_USER: \"root\"\n DB_PASSWORD: \"${MYSQL_ROOT_PASSWORD}\"" > "${CI_PROJECT_DIR}/opt/shopware/.psh.yaml.override"'
- cd ${CI_PROJECT_DIR}/opt/shopware && php ${CI_PROJECT_DIR}/opt/shopware/psh.phar init
- php ${CI_PROJECT_DIR}/opt/shopware/bin/console plugin:refresh
- php ${CI_PROJECT_DIR}/opt/shopware/bin/console plugin:install --activate HeidelPayment
- cd ${CI_PROJECT_DIR}/opt/shopware/custom/plugins/HeidelPayment && ${CI_PROJECT_DIR}/opt/shopware/vendor/bin/phpunit
- mkdir /tmp/opt
- git clone -b ${SHOPWARE_VERSION} --depth 1 https://github.com/shopware/production /tmp/opt/shopware
- cp -r ${CI_PROJECT_DIR} /tmp/opt/shopware/custom/plugins/${CI_PROJECT_NAME}
- cd /tmp/opt/shopware && composer install --no-interaction -o
- cd /tmp/opt/shopware && php bin/console system:setup --database-url=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:3306/${MYSQL_DATABASE} --generate-jwt-keys -nq
- cd /tmp/opt/shopware && php bin/console system:install -fnq --create-database
- cd /tmp/opt/shopware && php bin/console plugin:refresh -nq && php bin/console plugin:install --activate -c ${CI_PROJECT_NAME} -nq
- cd /tmp/opt/shopware && bin/build-js.sh
- cd /tmp/opt/shopware && php bin/console theme:compile -nq
- rsync -r /tmp/opt/shopware/custom/plugins/${CI_PROJECT_NAME}/ ${CI_PROJECT_DIR}/
- cd ${CI_PROJECT_DIR} && git add -f .
- package-plugin
artifacts:
paths:
- ${CI_PROJECT_NAME}.zip

Loading

0 comments on commit a477c2a

Please sign in to comment.