Skip to content

Commit

Permalink
Support Magento v1 and v2, fixes #1011 (#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulvandermeijs authored and rfay committed Jan 17, 2020
1 parent 9f43569 commit ad90531
Show file tree
Hide file tree
Showing 21 changed files with 898 additions and 54 deletions.
77 changes: 49 additions & 28 deletions .circleci/config.yml
Expand Up @@ -11,14 +11,16 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: NORMAL Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache


# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- run:
Expand All @@ -42,15 +44,16 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- run:
Expand All @@ -73,18 +76,19 @@ jobs:
at: ~/
- restore_cache:
keys:
- homebrew-macos-v14
- homebrew-macos-v15
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- save_cache:
key: homebrew-macos-v14
key: homebrew-macos-v15
paths:
- /usr/local/Homebrew
- /usr/local/Cellar
- ~/Library/Caches/Homebrew
- ~/.ddev/testcache
- run:
command: make -s test
name: ddev tests
Expand All @@ -105,7 +109,7 @@ jobs:
at: ~/
- restore_cache:
keys:
- homebrew-macos-v14
- homebrew-macos-v15
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/macos_circle_vm_setup.sh
Expand All @@ -118,11 +122,12 @@ jobs:
- store_test_results:
path: /tmp/testresults
- save_cache:
key: homebrew-macos-v14
key: homebrew-macos-v15
paths:
- /usr/local/Homebrew
- /usr/local/Cellar
- ~/Library/Caches/Homebrew
- ~/.ddev/testcache

mac_nfsmount_test:
macos:
Expand All @@ -137,17 +142,18 @@ jobs:
at: ~/
- restore_cache:
keys:
- homebrew-macos-v14
- homebrew-macos-v15
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-macos-v14
key: homebrew-macos-v15
paths:
- /usr/local/Homebrew
- /usr/local/Cellar
- ~/Library/Caches/Homebrew
- ~/.ddev/testcache
- run:
command: make -s test
name: ddev tests
Expand All @@ -168,16 +174,17 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- attach_workspace:
at: ~/
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
# Run the built-in ddev tests with the executables just built.
Expand All @@ -201,16 +208,18 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- attach_workspace:
at: ~/
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

- run:
command: make -s test EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: ddev tests
Expand All @@ -231,16 +240,18 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- attach_workspace:
at: ~/
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
# Run the built-in ddev tests with the executables just built.
- run:
Expand All @@ -260,14 +271,16 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

- run:
command: source ~/.bashrc && nvm use 10 && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: staticrequired
Expand All @@ -281,14 +294,16 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

- run:
command: |
. ~/.bashrc
Expand All @@ -310,16 +325,18 @@ jobs:
- checkout
- restore_cache:
keys:
- homebrew-macos-v14
- homebrew-macos-v15
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-macos-v14
key: homebrew-macos-v15
paths:
- /usr/local/Homebrew
- /usr/local/Cellar
- ~/Library/Caches/Homebrew
- ~/.ddev/testcache

- run:
command: |
for dir in containers/*
Expand All @@ -340,17 +357,19 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- attach_workspace:
at: ~/
- run:
command: ./.circleci/generate_artifacts.sh ~/artifacts ${BUILD_IMAGE_TARBALLS:false}
name: tar/zip up artifacts and make hashes
no_output_timeout: "40m"
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

- store_artifacts:
path: ~/artifacts
name: Artifact storage
Expand All @@ -367,14 +386,15 @@ jobs:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- homebrew-linux-v9
- homebrew-linux-v10
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: TAG BUILD Circle VM setup - tools, docker, golang
- save_cache:
key: homebrew-linux-v9
key: homebrew-linux-v10
paths:
- /home/linuxbrew
- ~/.ddev/testcache

# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- run:
Expand Down Expand Up @@ -403,16 +423,17 @@ jobs:
- checkout
- restore_cache:
keys:
- homebrew-macos-v14
- homebrew-macos-v15
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: RELEASE BUILD (macOS) Circle VM setup
- save_cache:
key: homebrew-macos-v14
key: homebrew-macos-v15
paths:
- /usr/local/Homebrew
- /usr/local/Cellar
- ~/Library/Caches/Homebrew
- ~/.ddev/testcache

- run:
command: make -s clean linux windows_install chocolatey
Expand Down
7 changes: 3 additions & 4 deletions .circleci/macos_circle_vm_setup.sh
Expand Up @@ -9,6 +9,7 @@ curl -O -sSL $DOCKER_URL
open -W Docker.dmg && cp -r /Volumes/Docker/Docker.app /Applications

export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1

# Get docker in first so we can install it and work on other things
brew cask install ngrok
Expand All @@ -19,12 +20,10 @@ nohup /Applications/Docker.app/Contents/MacOS/Docker --unattended &
brew tap drud/ddev
brew unlink python@2 || true

brew install mysql-client zip makensis jq expect coreutils golang ddev mkcert osslsigncode ghr gnu-getopt
brew link mysql-client zip makensis jq expect coreutils golang ddev mkcert osslsigncode ghr gnu-getopt
brew install mysql-client zip makensis jq expect coreutils golang ddev mkcert osslsigncode ghr gnu-getopt libgsf glib pcre || true
brew link mysql-client zip makensis jq expect coreutils golang ddev mkcert osslsigncode ghr gnu-getopt libgsf glib pcre

brew link --force mysql-client
# These links are required for osslsigncode to work
brew link libgsf glib pcre

# Get the Plugins for NSIS
curl -fsSL -o /tmp/EnVar-Plugin.zip https://github.com/GsNSIS/EnVar/releases/latest/download/EnVar-Plugin.zip && sudo unzip -o -d /usr/local/share/nsis /tmp/EnVar-Plugin.zip
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Expand Up @@ -109,7 +109,7 @@ setup:
@mkdir -p $(TESTTMP)
@mkdir -p $(DOWNLOADTMP)

# packr2 target currently builds packr2 caches in the cmd/ddev/cmd directory only
# packr2 target currently builds packr2 caches in cmd/ddev/cmd and pkg/ddevapp
# using the golang-build-container's packr2 command
packr2:
docker run -t --rm -u $(shell id -u):$(shell id -g) \
Expand All @@ -118,6 +118,12 @@ packr2:
-e GOCACHE="//workdir/$(GOTMP)/.cache" \
-w //workdir/cmd/ddev/cmd \
$(BUILD_IMAGE) packr2
docker run -t --rm -u $(shell id -u):$(shell id -g) \
-v "$(S)$(PWD):/workdir$(DOCKERMOUNTFLAG)" \
-v "$(S)$(PWD)/$(GOTMP)/bin:$(S)/go/bin" \
-e GOCACHE="//workdir/$(GOTMP)/.cache" \
-w //workdir/pkg/ddevapp \
$(BUILD_IMAGE) packr2

# Required static analysis targets used in circleci - these cause fail if they don't work
staticrequired: setup golangci-lint markdownlint mkdocs
Expand Down
4 changes: 3 additions & 1 deletion README.md
@@ -1,6 +1,6 @@
# ddev

[![CircleCI](https://circleci.com/gh/drud/ddev.svg?style=shield)](https://circleci.com/gh/drud/ddev) [![Go Report Card](https://goreportcard.com/badge/github.com/drud/ddev)](https://goreportcard.com/report/github.com/drud/ddev) ![project is maintained](https://img.shields.io/maintenance/yes/2019.svg)
[![CircleCI](https://circleci.com/gh/drud/ddev.svg?style=shield)](https://circleci.com/gh/drud/ddev) [![Go Report Card](https://goreportcard.com/badge/github.com/drud/ddev)](https://goreportcard.com/report/github.com/drud/ddev) ![project is maintained](https://img.shields.io/maintenance/yes/2020.svg)

![ddev logo](images/ddev_logo.png)

Expand All @@ -18,6 +18,8 @@ ddev is an open source tool that makes it simple to get local PHP development en
* [Drupal 8 Quickstart](https://ddev.readthedocs.io/en/stable/users/cli-usage#drupal-8-quickstart)
* [Backdrop Quickstart](https://ddev.readthedocs.io/en/stable/users/cli-usage/#backdrop-quickstart)
* [TYPO3 Quickstart](https://ddev.readthedocs.io/en/stable/users/cli-usage#typo3-quickstart)
* [Magento 1 Quickstart](https://ddev.readthedocs.io/en/stable/users/cli-usage#magento-1-quickstart)
* [Magento 2 Quickstart](https://ddev.readthedocs.io/en/stable/users/cli-usage#magento-2-quickstart)

Having trouble? See our [support options below](#support). You might have trouble if [another local development tool is already using port 80 or 443](https://ddev.readthedocs.io/en/stable/users/troubleshooting/#unable-listen).

Expand Down
7 changes: 7 additions & 0 deletions containers/ddev-webserver/Dockerfile
Expand Up @@ -112,8 +112,15 @@ RUN curl -sSL "https://github.com/drush-ops/drush/releases/download/${DRUSH_VERS
RUN curl -sSL "https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VERSION}/drush.phar" -o /usr/local/bin/drush && chmod +x /usr/local/bin/drush
RUN curl -sSL "https://github.com/mailhog/MailHog/releases/download/v${MAILHOG_VERSION}/MailHog_linux_amd64" -o /usr/local/bin/mailhog
RUN curl -sSL -o /usr/local/bin/wp-cli -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x /usr/local/bin/wp-cli && ln -s /usr/local/bin/wp-cli /usr/local/bin/wp

RUN curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install

# magerun and magerun2 for magento
RUN curl -sSL https://files.magerun.net/n98-magerun-latest.phar -o /usr/local/bin/magerun
RUN curl -sSL https://raw.githubusercontent.com/netz98/n98-magerun/${MAGERUN_VERSION}/res/autocompletion/bash/n98-magerun.phar.bash -o /etc/bash_completion.d/magerun
RUN curl -sSL https://files.magerun.net/n98-magerun2-latest.phar -o /usr/local/bin/magerun2
RUN curl -sSL https://raw.githubusercontent.com/netz98/n98-magerun2/${MAGERUN2_VERSION}/res/autocompletion/bash/n98-magerun2.phar.bash -o /etc/bash_completion.d/magerun2

RUN curl -sSL "https://drupalconsole.com/installer" -L -o /usr/local/bin/drupal && chmod +x /usr/local/bin/drupal


Expand Down

0 comments on commit ad90531

Please sign in to comment.