Skip to content

Commit 7e15dec

Browse files
Merge branch 'develop' into 1.1-fwd
2 parents dc860ae + e2fe207 commit 7e15dec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+128
-412
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Fixed Issues (if relevant)
1818
<!---
19-
If relevant, please provide a list of fixed issues in the format magento/ece-tools#<issue_number>.
19+
If relevant, please provide a list of fixed issues in the format magento/magento-cloud-docker#<issue_number>.
2020
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2121
-->
2222
1. magento/magento-cloud-docker#<issue_number>: Issue title
@@ -30,6 +30,17 @@
3030
1. ...
3131
2. ...
3232

33+
### Release notes
34+
35+
For user-facing changes, add a meaningful release note. For examples, see [Magento Cloud Docker release notes](https://devdocs.magento.com/cloud/release-notes/mcd-release-notes.html).
36+
37+
### Associated documentation updates
38+
<!--
39+
If your proposed update requires user documentation, submit a PR to the Magento DevDocs repository. For extensive updates requiring assistance, submit an issue to DevDocs. See https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md.
40+
-->
41+
Add link to Magento DevDocs PR or Issue, if needed.
42+
3343
### Contribution checklist
3444
- [ ] Pull request has a meaningful description of its purpose
45+
- [ ] Pull request introduces user-facing changes and includes meaningful release notes and documentation
3546
- [ ] All commits are accompanied by meaningful commit messages

.travis.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,29 @@ stages:
2323
jobs:
2424
include:
2525
- stage: static-unit
26-
php: '7.1'
26+
php: '7.2'
2727
script: ./tests/travis/static-unit.sh;
2828
env:
2929
- TEST_SUITE=static-unit
3030
- script: ./tests/travis/static-unit.sh;
31-
php: '7.2'
31+
php: '7.3'
3232
env:
3333
- TEST_SUITE=static-unit
3434
- script: ./tests/travis/static-unit.sh;
35-
php: '7.3'
35+
php: '7.4'
3636
env:
3737
- TEST_SUITE=static-unit
3838
- stage: integration
3939
script: ./vendor/bin/phpunit --configuration ./tests/integration;
40-
php: '7.1'
40+
php: '7.2'
4141
env:
4242
- TEST_SUITE=integration
4343
- script: ./vendor/bin/phpunit --configuration ./tests/integration;
44-
php: '7.2'
44+
php: '7.3'
4545
env:
4646
- TEST_SUITE=integration
4747
- script: ./vendor/bin/phpunit --configuration ./tests/integration;
48-
php: '7.3'
48+
php: '7.4'
4949
env:
5050
- TEST_SUITE=integration
5151
- stage: build-images
@@ -56,11 +56,6 @@ jobs:
5656
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh varnish; fi;
5757
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh elasticsearch; fi;
5858
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh nginx; fi;
59-
- script:
60-
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.1-cli; fi;
61-
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.1-fpm; fi;
62-
env:
63-
- TEST_SUITE=build-images
6459
- script:
6560
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.2-cli; fi;
6661
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.2-fpm; fi;
@@ -71,12 +66,13 @@ jobs:
7166
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.3-fpm; fi;
7267
env:
7368
- TEST_SUITE=build-images
74-
- stage: test
75-
php: '7.1'
76-
dist: xenial
69+
- script:
70+
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.4-cli; fi;
71+
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.4-fpm; fi;
7772
env:
78-
- TEST_SUITE=functional
79-
- php: '7.2'
73+
- TEST_SUITE=build-images
74+
- stage: test
75+
php: '7.2'
8076
dist: xenial
8177
env:
8278
- TEST_SUITE=functional

composer.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "magento/magento-cloud-docker",
33
"description": "Magento Cloud Docker",
44
"type": "magento2-component",
5-
"version": "1.1.0",
5+
"version": "1.2.0",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"
99
],
1010
"require": {
11-
"php": "^7.1.3",
11+
"php": "^7.2",
1212
"ext-json": "*",
1313
"composer/composer": "^1.0",
1414
"composer/semver": "^1.0",
@@ -19,12 +19,15 @@
1919
"symfony/yaml": "^3.3||^4.0"
2020
},
2121
"require-dev": {
22+
"codeception/codeception": "^4.1",
23+
"codeception/module-asserts": "^1.2",
24+
"codeception/module-db": "^1.0",
25+
"codeception/module-phpbrowser": "^1.0",
26+
"consolidation/robo": "^1.2",
2227
"phpmd/phpmd": "@stable",
2328
"phpstan/phpstan": "^0.11",
24-
"phpunit/phpunit": "^7.2",
25-
"squizlabs/php_codesniffer": "^3.0",
26-
"codeception/codeception": "^2.5.3",
27-
"consolidation/robo": "^1.2"
29+
"phpunit/phpunit": "^8.5",
30+
"squizlabs/php_codesniffer": "^3.0"
2831
},
2932
"bin": [
3033
"bin/ece-docker"

dist/bin/magento-docker

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@ USAGE="Magento Cloud Docker
1919
flush-redis clears redis cache
2020
flush-varnish clears varnish cache
2121
ece-db access to Database
22+
php 7.1 run a command in a PHP 7.1 container
23+
php 7.2 run a command in a PHP 7.2 container
24+
php 7.3 run a command in a PHP 7.3 container
25+
php 7.4 run a command in a PHP 7.4 container
2226
2327
\033[33mOptions:\033[0m
2428
-h show this help text\n"
2529

26-
if [ ${#@} -ne 0 ] && [ "${@#"-h"}" = "" ]; then
27-
printf "$USAGE"
28-
exit 0;
30+
if [ ${#@} -ne 0 ]; then
31+
for arg in "$@"; do
32+
if [ "${arg#"-h"}" = "" ]; then
33+
printf "$USAGE"
34+
exit 0;
35+
fi
36+
done
2937
fi;
3038

3139
case "$1" in
@@ -74,6 +82,19 @@ case "$1" in
7482
ece-db)
7583
docker-compose exec db sh -c 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE "$@"'
7684
;;
85+
php)
86+
version="$2"
87+
shift 2
88+
# allow ssh-agent forwarding for composer.json files that need access to private repos
89+
if [[ $(uname) = Darwin ]]; then
90+
# https://docs.docker.com/docker-for-mac/osxfs/#ssh-agent-forwarding (D4M > 2.2)
91+
export SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock"
92+
fi
93+
docker run --rm -it -e "MAGENTO_ROOT=/app" -v "$(pwd)":/app -v ~/.composer/cache:/root/.composer/cache \
94+
--mount "type=bind,src=$HOME/.ssh/known_hosts,target=/root/.ssh/known_hosts" \
95+
--mount "type=bind,src=$SSH_AUTH_SOCK,target=$SSH_AUTH_SOCK" -e SSH_AUTH_SOCK="$SSH_AUTH_SOCK" \
96+
"magento/magento-cloud-docker-php:${version}-cli-1.1" "$@"
97+
;;
7798
*)
7899
printf "$USAGE"
79100
exit 0;

images/elasticsearch/7.7/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:7.7.1
2+
3+
RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
4+
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
5+
RUN bin/elasticsearch-plugin install -b analysis-icu && \
6+
bin/elasticsearch-plugin install -b analysis-phonetic
7+
8+
ADD docker-healthcheck.sh /docker-healthcheck.sh
9+
10+
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]
11+
12+
EXPOSE 9200 9300
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then
5+
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
6+
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
7+
exit 0
8+
fi
9+
echo >&2 "Unexpected health status: $health"
10+
fi
11+
12+
exit 1

images/nginx/1.9/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ XDEBUG_UPSTREAM_FILE="/etc/nginx/conf.d/xdebug/upstream.conf"
1414
[ ! -z "${MAGENTO_RUN_MODE}" ] && sed -i "s/!MAGENTO_RUN_MODE!/${MAGENTO_RUN_MODE}/" $VHOST_FILE
1515
[ ! -z "${MFTF_UTILS}" ] && sed -i "s/!MFTF_UTILS!/${MFTF_UTILS}/" $VHOST_FILE
1616
[ ! -z "${UPLOAD_MAX_FILESIZE}" ] && sed -i "s/!UPLOAD_MAX_FILESIZE!/${UPLOAD_MAX_FILESIZE}/" $VHOST_FILE
17+
[ ! -z "${WITH_XDEBUG}" ] && sed -i "s/!WITH_XDEBUG!/${WITH_XDEBUG}/" $VHOST_FILE
1718
[ "${WITH_XDEBUG}" == "1" ] && sed -i "s/#include_xdebug_upstream/include/" $NGINX_FILE
1819

1920
# Check if the nginx syntax is fine, then launch.

images/nginx/1.9/etc/vhost.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ server {
1414
set $MAGE_ROOT !MAGENTO_ROOT!; # Variable: MAGENTO_ROOT
1515
set $MAGE_MODE !MAGENTO_RUN_MODE!; # Variable: MAGENTO_RUN_MODE
1616
set $MFTF_UTILS !MFTF_UTILS!; # Variable: MFTF_UTILS
17-
set $WITH_XDEBUG !$WITH_XDEBUG!; # Variable: WITH_XDEBUG
17+
set $WITH_XDEBUG !WITH_XDEBUG!; # Variable: WITH_XDEBUG
1818

1919
set $my_fastcgi_pass "fastcgi_backend";
2020
if ($cookie_XDEBUG_SESSION) {

images/php/7.1-cli/bin/cloud-build

Lines changed: 0 additions & 41 deletions
This file was deleted.

images/php/7.1-cli/bin/cloud-deploy

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)