From c991494dee1443ace02462286d66abf73f5b7bdb Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 30 Sep 2018 10:53:25 +0200 Subject: [PATCH] Add drush7, drush8 and drush9 as separate binaries --- Dockerfiles/work/Dockerfile-5.3 | 24 +++++----- Dockerfiles/work/Dockerfile-5.4 | 41 +++++++++++------ Dockerfiles/work/Dockerfile-5.5 | 41 +++++++++++------ Dockerfiles/work/Dockerfile-5.6 | 56 +++++++++++++++++------ Dockerfiles/work/Dockerfile-7.0 | 56 +++++++++++++++++------ Dockerfiles/work/Dockerfile-7.1 | 56 +++++++++++++++++------ Dockerfiles/work/Dockerfile-7.2 | 56 +++++++++++++++++------ Dockerfiles/work/Dockerfile-7.3 | 56 +++++++++++++++++------ build/ansible/group_vars/all.yml | 78 +++++++++++++++++++------------- 9 files changed, 330 insertions(+), 134 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index f7ce5120..6b5382e4 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -133,19 +133,19 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ \ # gitflow && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ @@ -296,7 +296,7 @@ RUN set -x \ && gulp --version | grep -E '[.0-9]+' \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 3819afd1..f55a8cf8 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -136,19 +136,33 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ \ # gitflow && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ @@ -313,7 +327,8 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 2ef47040..b88d89ff 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -140,19 +140,33 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -325,7 +339,8 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 972d262a..960d9233 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -140,19 +140,47 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ + \ +# drush9 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ +&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -325,7 +353,9 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index a2856ae2..f9d53511 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -140,19 +140,47 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ + \ +# drush9 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ +&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -325,7 +353,9 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 0e57642f..62a6d83f 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -140,19 +140,47 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ + \ +# drush9 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ +&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -325,7 +353,9 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 41732137..1f5b7408 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -140,19 +140,47 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ + \ +# drush9 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ +&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -325,7 +353,9 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index c49870be..14217f15 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -140,19 +140,47 @@ RUN set -x \ # deployer && curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush - && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ -&& cd /usr/local/src/drush \ -&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ +# drush7 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ +&& cd /usr/local/src/drush7 \ +&& git checkout 7.4.0 \ \ - && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ -&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ -&& rm -rf /usr/local/src/drush/.git \ -&& rm -rf /usr/local/src/drush/docs \ -&& rm -rf /usr/local/src/drush/examples \ -&& rm -rf /usr/local/src/drush/misc \ -&& rm -rf /usr/local/src/drush/tests \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ +&& rm -rf /usr/local/src/drush7/.git \ +&& rm -rf /usr/local/src/drush7/docs \ +&& rm -rf /usr/local/src/drush7/examples \ +&& rm -rf /usr/local/src/drush7/misc \ +&& rm -rf /usr/local/src/drush7/tests \ + \ +# drush8 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ +&& cd /usr/local/src/drush8 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ +&& rm -rf /usr/local/src/drush8/.git \ +&& rm -rf /usr/local/src/drush8/docs \ +&& rm -rf /usr/local/src/drush8/examples \ +&& rm -rf /usr/local/src/drush8/misc \ +&& rm -rf /usr/local/src/drush8/tests \ + \ +# drush9 + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ +&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -314,7 +342,9 @@ RUN set -x \ \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && dep --version 2>/dev/null | grep -E 'Deployer\s*[.0-9]+' \ - && drush --version | grep -E '[.0-9]+' \ + && drush7 --version | grep -E '7[.0-9]+\s*$' \ + && drush8 --version | grep -E '8[.0-9]+\s*$' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && git-flow version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index d4953c38..306b0f46 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -203,7 +203,9 @@ software_enabled: - awesomeci - codeception - deployer - - drush + - drush7 + - drush8 + - drush9 - drupalconsole - gitflow - grunt @@ -340,43 +342,57 @@ software_available: all: command: curl https://deployer.org/deployer.phar -L -o /usr/local/bin/dep post: chmod +x /usr/local/bin/dep - drush: + drush7: disabled: [5.2] - check: drush --version | grep -E '[.0-9]+' - 5.2: - pre: | - git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ - && cd /usr/local/src/drush \ - && git checkout 7.4.0 \ - 5.3: + check: drush7 --version | grep -E '7[.0-9]+\s*$' + all: pre: | - git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ - && cd /usr/local/src/drush \ + git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ + && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ - 5.4: - pre: | - git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ - && cd /usr/local/src/drush \ - && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ - 5.5: + command: | + chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ + && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ + && rm -rf /usr/local/src/drush7/.git \ + && rm -rf /usr/local/src/drush7/docs \ + && rm -rf /usr/local/src/drush7/examples \ + && rm -rf /usr/local/src/drush7/misc \ + && rm -rf /usr/local/src/drush7/tests \ + drush8: + disabled: [5.2, 5.3] + check: drush8 --version | grep -E '8[.0-9]+\s*$' + all: pre: | - git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ - && cd /usr/local/src/drush \ - && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ + git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ + && cd /usr/local/src/drush8 \ + && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + command: | + chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ + && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ + && rm -rf /usr/local/src/drush8/.git \ + && rm -rf /usr/local/src/drush8/docs \ + && rm -rf /usr/local/src/drush8/examples \ + && rm -rf /usr/local/src/drush8/misc \ + && rm -rf /usr/local/src/drush8/tests \ + drush9: + disabled: [5.2, 5.3, 5.4, 5.5] + check: drush9 --version | grep -E '9[.0-9]+\s*$' all: pre: | - git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ - && cd /usr/local/src/drush \ - && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ + git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ + && cd /usr/local/src/drush9 \ + && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ command: | - chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ - && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ - && ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ - && rm -rf /usr/local/src/drush/.git \ - && rm -rf /usr/local/src/drush/docs \ - && rm -rf /usr/local/src/drush/examples \ - && rm -rf /usr/local/src/drush/misc \ - && rm -rf /usr/local/src/drush/tests \ + chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ + && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ + && rm -rf /usr/local/src/drush9/.git \ + && rm -rf /usr/local/src/drush9/docs \ + && rm -rf /usr/local/src/drush9/examples \ + && rm -rf /usr/local/src/drush9/misc \ + && rm -rf /usr/local/src/drush9/tests \ codeception: disabled: [5.2] check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$'