Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Spryker 202009 release #398

Merged
merged 23 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/github-changelog-http-cache/
/tests/
/tmp-test/
.idea
8 changes: 2 additions & 6 deletions src/spryker/application/skeleton/behat.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default:
suites:
sample:
contexts_services:
- yves.plp.context
contexts:
- Acceptance\Context\Yves\ProductListPageContext
extensions:
Behat\MinkExtension:
default_session: goutte
Expand All @@ -23,10 +23,6 @@ default:
namespaces:
page: [Acceptance\Page]
element: [Acceptance\Element]
FriendsOfBehat\ContextServiceExtension:
imports:
- 'features/bootstrap/_config/contexts.yml'
FriendsOfBehat\CrossContainerExtension: ~
Cjm\Behat\StepThroughExtension: ~
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
local: # (google-chrome-stable --remote-debugging-port=9221 &) && socat tcp-l:9222,fork TCP4:127.0.0.1:9221
Expand Down
10 changes: 6 additions & 4 deletions src/spryker/application/skeleton/composer-harness.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@
"require": {
},
"require-dev": {
"codeception/codeception": "~2.5.6",
"behat/behat": "^3.5",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"ciaranmcnulty/behat-stepthroughextension": "^1.0",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.6",
"friends-of-behat/context-service-extension": "^1.2",
"friends-of-behat/cross-container-extension": "^1.1",
"phpcompatibility/php-compatibility": "dev-master",
"sensiolabs/behat-page-object-extension": "^2.3"
"sensiolabs/behat-page-object-extension": "^2.3",
"guzzlehttp/guzzle": "^6.3.0",
"symfony/browser-kit": "^4.4"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -39,6 +38,9 @@
"APPLICATION_ENV=development vendor/bin/console transfer:generate",
"APPLICATION_ENV=development vendor/bin/console dev:ide:generate-auto-completion"
],
"phpstan": [
"php -d memory_limit=1024M vendor/bin/phpstan analyze -c phpstan.neon src/ -l 4"
],
"test-production-quality": [
"bash -e -o pipefail -c \"find src/ -type f -name '*.php' -print0 | xargs -0 --no-run-if-empty -n 1 -P 8 -i php -l {} | (grep -v 'No syntax errors detected' || echo OK)\""
],
Expand Down
24 changes: 15 additions & 9 deletions src/spryker/application/skeleton/config/Shared/config_local.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Pyz\Shared\Queue\QueueConstants;
use Pyz\Shared\Scheduler\SchedulerConfig;
use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Shared\Auth\AuthConstants;
use Spryker\Shared\Collector\CollectorConstants;
use Spryker\Shared\Customer\CustomerConstants;
use Spryker\Shared\GlueApplication\GlueApplicationConstants;
Expand All @@ -11,9 +12,9 @@
use Spryker\Shared\Kernel\Store;
use Spryker\Shared\Mail\MailConstants;
use Spryker\Shared\Newsletter\NewsletterConstants;
use Spryker\Shared\Oauth\OauthConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\PropelQueryBuilder\PropelQueryBuilderConstants;
use Spryker\Shared\RabbitMq\RabbitMqEnv;
use Spryker\Shared\Router\RouterConstants;
use Spryker\Shared\Scheduler\SchedulerConstants;
Expand All @@ -34,12 +35,12 @@
$config[ApplicationConstants::BASE_URL_YVES] = sprintf(
'http://%s%s',
$config[ApplicationConstants::HOST_YVES],
$config[ApplicationConstants::PORT_YVES]
''
);
$config[ApplicationConstants::BASE_URL_SSL_YVES] = sprintf(
'https://%s%s',
$config[ApplicationConstants::HOST_YVES],
$config[ApplicationConstants::PORT_SSL_YVES]
''
);
$config[ProductManagementConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[NewsletterConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
Expand All @@ -61,12 +62,12 @@
$config[ApplicationConstants::BASE_URL_ZED] = sprintf(
'http://%s%s',
$config[ApplicationConstants::HOST_ZED],
$config[ApplicationConstants::PORT_ZED]
''
);
$config[ApplicationConstants::BASE_URL_SSL_ZED] = sprintf(
'https://%s%s',
$config[ApplicationConstants::HOST_ZED],
$config[ApplicationConstants::PORT_SSL_ZED]
''
);
$config[ZedRequestConstants::HOST_ZED_API] = $config[ApplicationConstants::HOST_ZED];
$config[ZedRequestConstants::BASE_URL_ZED_API] = $config[ApplicationConstants::BASE_URL_ZED];
Expand Down Expand Up @@ -104,9 +105,6 @@
$config[PropelConstants::ZED_DB_DATABASE] = getenv('DB_NAME');
$config[PropelConstants::ZED_DB_HOST] = getenv('DB_HOST');
$config[PropelConstants::ZED_DB_PORT] = 5432;
$config[PropelConstants::ZED_DB_ENGINE]
= $config[PropelQueryBuilderConstants::ZED_DB_ENGINE]
= $config[PropelConstants::ZED_DB_ENGINE_PGSQL];
$config[PropelConstants::USE_SUDO_TO_MANAGE_DATABASE] = false;

// ---------- Elasticsearch
Expand Down Expand Up @@ -201,8 +199,16 @@
$config[KernelConstants::DOMAIN_WHITELIST] = [];

// ---------- Namespaces
$config[KernelConstants::PROJECT_NAMESPACE] = 'Inviqa';
$config[KernelConstants::PROJECT_NAMESPACES] = [
'Inviqa',
'Pyz',
];

// ---------- OAUTH
$config[OauthConstants::OAUTH_CLIENT_IDENTIFIER] = 'frontend';
// todo: convert below credentials to environment variables with encrypted secrets
$config[OauthConstants::PRIVATE_KEY_PATH] = 'file://' . APPLICATION_ROOT_DIR . '/config/Zed/dev_only_private.key';
$config[OauthConstants::PUBLIC_KEY_PATH] = 'file://' . APPLICATION_ROOT_DIR . '/config/Zed/dev_only_public.key';
$config[OauthConstants::ENCRYPTION_KEY] = '6Go9YRlbogOQyHpGDkydw8ejC0Z36FboKkFL7mybT0mxB3Oz';
$config[OauthConstants::OAUTH_CLIENT_SECRET] = 'xN7uUeDzDpYtlp6oTrtC6aHGdA9Cy0gjF6hDaatiRkNyHEoc';
$config[AuthConstants::AUTH_DEFAULT_CREDENTIALS]['yves_system']['token'] = 'VEOJWp1gsANquUEiGT7pUJdmmS0cnLLCZZKZoiRUAGRyZtUUhNVuTUSeJ8Zz1i5N7ddwv9shJXGTwVmB';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #446 to convert these values to secrets.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, we can't release this PR as a harness version without that though

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true. I'm happy to work on that ticket and create a child PR of this one, but need help to understand how to do it.

I think I can convert these values to workspace encrypted attributes for development env, but not sure how we would generate them during project setup using some twig function, also no idea how to generate sealed secrets for them at run time.

It would be nice if we can pair on it @andytson-inviqa or @kierenevans 😄

35 changes: 29 additions & 6 deletions src/spryker/application/skeleton/config/install/docker.yml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,31 @@ sections:
remove-cache:
command: "vendor/bin/console cache:empty-all"

remove-generated-files:
command: "vendor/bin/console setup:empty-generated-directory"
remove-auto-completion:
command: "if [ \"$APPLICATION_ENV\" = \"development\" ]; then vendor/bin/console dev:ide-auto-completion:remove; fi"

remove-request-validation-cache:
command: "vendor/bin/console rest-api:remove-validation-cache"
stores: true

remove-navigation-cache:
command: "vendor/bin/console navigation:cache:remove"

remove-source-map:
command: "vendor/bin/console search:source-map:remove"

remove-databuilder:
command: "if [ \"$APPLICATION_ENV\" = \"development\" ]; then vendor/bin/console transfer:databuilder:remove; fi"

remove-entity-transfer:
command: "vendor/bin/console transfer:entity:remove"

remove-transfer:
command: "vendor/bin/console transfer:remove"

generate:
prepare-propel:
command: "vendor/bin/console setup:deploy:prepare-propel"
command: "vendor/bin/console propel:deploy:prepare"

generate-transfers:
command: "vendor/bin/console transfer:generate"
Expand All @@ -68,7 +87,7 @@ sections:
command: "if [ \"$APPLICATION_ENV\" = \"development\" ]; then vendor/bin/console transfer:databuilder:generate; fi"

generate-ide-auto-completion:
command: "if [ \"$APPLICATION_ENV\" = \"development\" ]; then vendor/bin/console dev:ide:generate-auto-completion; fi"
command: "if [ \"$APPLICATION_ENV\" = \"development\" ]; then vendor/bin/console dev:ide-auto-completion:generate; fi"

scheduler-down:
scheduler-stop:
Expand All @@ -89,7 +108,11 @@ sections:
command: "vendor/bin/console navigation:build-cache"

rest-request-validation-cache-warmup:
command: "vendor/bin/console glue:rest:build-request-validation-cache"
command: "vendor/bin/console rest-api:build-request-validation-cache"
stores: true

class-resolver-build:
command: "vendor/bin/console cache:class-resolver:build"

queue-flush:
set-permissions:
Expand Down Expand Up @@ -209,7 +232,7 @@ sections:

demodata:
import:
command: "vendor/bin/console data:import"
command: "vendor/bin/console data:import --config=data/import/local/full_EU.yml"
stores:
- DE

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/spryker/harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ attributes:
spryker:
salt: 2tkqCCRKy5rT4wMVz8KTCh8r3sJGkL5v
demoshop-url: https://github.com/spryker-shop/b2c-demo-shop.git
demoshop-version: 202001.0-p1
demoshop-version: "202009.0"
mode: development
php:
fpm:
Expand Down