-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from magento-commerce/develop
MCLOUD-7202: Release magento-cloud-docker 1.2.0 and ece-tools 2002.1.3
- Loading branch information
Showing
93 changed files
with
2,279 additions
and
441 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
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 |
---|---|---|
|
@@ -43,7 +43,13 @@ jobs: | |
- php: '7.4' | ||
env: TEST_SUITE=functional-ee | ||
|
||
before_install: | ||
# https://github.com/kylekatarnls/update-helper/issues/9 | ||
- if [ -n "${COMPOSER_VERSION}" ]; then travis_retry composer self-update ${COMPOSER_VERSION}; fi; | ||
|
||
|
||
install: | ||
- phpenv config-add travis.php.ini | ||
- composer config http-basic.repo.magento.com ${REPO_USERNAME_CE} ${REPO_PASSWORD_CE} | ||
- composer config github-oauth.github.com ${GITHUB_TOKEN} | ||
- if [ -n "${MCC_VERSION}" ]; then composer config repositories.mcc git [email protected]:magento/magento-cloud-components.git && composer require "magento/magento-cloud-components:${MCC_VERSION}" --no-update; fi; | ||
|
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MagentoCloud\Command; | ||
|
||
use Magento\MagentoCloud\Filesystem\ConfigFileList; | ||
use Magento\MagentoCloud\Filesystem\Driver\File; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Yaml\Yaml; | ||
|
||
/** | ||
* Creates .magento.env.yaml | ||
*/ | ||
class ConfigCreate extends Command | ||
{ | ||
const NAME = 'cloud:config:create'; | ||
|
||
const ARG_CONFIGURATION = 'configuration'; | ||
|
||
/** | ||
* @var ConfigFileList | ||
*/ | ||
private $configFileList; | ||
|
||
/** | ||
* @var File | ||
*/ | ||
private $file; | ||
|
||
/** | ||
* @param ConfigFileList $configFileList | ||
* @param File $file | ||
*/ | ||
public function __construct(ConfigFileList $configFileList, File $file) | ||
{ | ||
$this->configFileList = $configFileList; | ||
$this->file = $file; | ||
|
||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function configure() | ||
{ | ||
$this->setName(static::NAME) | ||
->setDescription( | ||
'Creates a `.magento.env.yaml` file with the specified build, deploy, and post-deploy variable ' . | ||
'configuration. Overwrites any existing `.magento,.env.yaml` file.' | ||
) | ||
->addArgument( | ||
self::ARG_CONFIGURATION, | ||
InputArgument::REQUIRED, | ||
'Configuration in JSON format' | ||
); | ||
|
||
parent::configure(); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$configuration = $input->getArgument(self::ARG_CONFIGURATION); | ||
|
||
$decodedConfig = json_decode($configuration, true); | ||
|
||
if (json_last_error() !== JSON_ERROR_NONE) { | ||
throw new \Exception('Wrong JSON format: ' . json_last_error_msg()); | ||
} | ||
|
||
$yaml = Yaml::dump($decodedConfig, 10, 2); | ||
$filePath = $this->configFileList->getEnvConfig(); | ||
|
||
$this->file->filePutContents($filePath, $yaml); | ||
|
||
$output->writeln(sprintf("Config file %s was created", $filePath)); | ||
} | ||
} |
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
Oops, something went wrong.