Skip to content

Commit

Permalink
Push PR-based images to GitHub instead of Docker Hub (#3)
Browse files Browse the repository at this point in the history
Also includes documentation on how to test these images.

Fixes #2.
  • Loading branch information
pento authored Aug 7, 2019
1 parent b375419 commit a43620a
Show file tree
Hide file tree
Showing 28 changed files with 208 additions and 95 deletions.
147 changes: 83 additions & 64 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,173 +4,192 @@
#
#

if: tag IS blank

services:
- docker

branches:
only:
- master

env:
global:
- DOCKER_USERNAME: garypendergast
- GITHUB_USERNAME: pento
# DOCKER_PASSWORD
- secure: usv1haWO4zKTM0Ewc/boDRTJTeje6pHYXxBMpf6ny58nvqYlcGfso/UDk6ZlAu/B3/uNrEzf7NqRibJduqmq4RNLqgI7DCFSJuyxXntuSK1/CRJso1+lGYBQKAKoRDb01i1+6qy511LpyZa/nta4FxD0LmrTVNkmurQMQsQIUq5GsSDpbbSmrCZ/oKFQu+mwLnLc1hpbsHdDAjwEiqMW7GGAD5xPmwUa2jV1ZhiKikifggZIpPCnHtKj5a3oGtYVzA9t0TfMkI42Xw089ViZ+7EEmLEG1oGGpZlixZFNE/tgrRF/JmekFYusIOVPEfPEJDMzmGCJwqSanhXxnSHc2OVTJ99CyGXqASKcppRrpxZmBq4j/3tT7aZdXehxoa3+7Ba0wgHqT6n0rJDXq+soZXZZo01hBJxsNKFx9jxkS1EUdKRDCE+sOytfgPFU4nraSjqGOsFQfNYVwW60nMI0Y637k/797SjgZeM6zjXarNpllsaaog3CL+sP+YPKDF9V9CiMUIPi5d5gBBvOts2CKEWgIxuSoukIfjejU4obKC79DOdTGdDYydXRBk4289BY4vtQtr+P7ORMJW1cZ/MFd2Nbxte1OmuE6MoAv2xzutJLJDTNxISC25zI6VdukAtC+F8/HHRzi3ysJO2fr3rH2da6Z8Jep7dSRL4iE0D5S0U=
# GITHUB_TOKEN
- secure: Y8TKVQ9hWYdffxRliIDDDoXCF1FyOeOJ+oq9cRVeMG5/wgofor/3vhN2anOdwrrsoQvmoDwJII97iT9mcKnmQe6UV/LnZXXw/P1peWJOaDsKbwEX+07agNVQKdefqaxi5Jr1wDMgkadn39VU7/haXrsjqJ3Wbnu5AfcGnIzxfVnLjehkuSSOOmQy3w+RwW+HymLVpFqevfhED4uJjrjvwUEvtirxG0E3nyKXGsjusPSDGVzZhmLJBXEHf0g717loN1b+JeUa6TeIYGQ5vM/oRsyzxeJJ0iltiTKk31JHtBP+TTcoyHKWqOzefVfoXCNbk1G2Ez8czUqWIfQK8YnIHOmneUeSi6lQbCdcMSWbv/bJ5+wEJgsQKGBxy7qfF8v0T/GoMSi1OM6JfkcgW3bhuBgMGdnwxJUJ/lmYYAYlmXcO/+cui7lmyXsMT44lArdCZFo9SGt5IlPL4BW5SODYrDFKzP+2uHsj56flK03/lt+/KNJjLZKvH6NbzfhESRzMChnFFaz5eWxHgMZJefO5S51zI/88gu8YZgQDahpgIQUKvZKqi1dSASfVQ7jGqKj3roNKu2s4IdQoMXELeIehrsn9bw6BiN1kaL8yyAXjWLry21VXH0VYv0FdF4W7j23Wv7GWbcg0THDSydLvLYICPBi7NyU3yCPsGGlGpT8Oe9A=
- PR_TAG: $(if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "-$TRAVIS_PULL_REQUEST"; else echo ""; fi)
- PACKAGE_REGISTRY_HOST: $(if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "docker.pkg.github.com"; else echo ""; fi)
- PACKAGE_REGISTRY: $(if [ "$PACKAGE_REGISTRY_HOST" != "" ]; then echo "${PACKAGE_REGISTRY_HOST}/wordpress/wpdev-docker-images"; else echo "wordpressdevelop"; fi)

before_script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
before_script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
else
echo "$GITHUB_TOKEN" | docker login docker.pkg.github.com -u "$GITHUB_USERNAME" --password-stdin
fi
jobs:
include:
- stage: "Build base PHP images"
name: "php 5.2"
script:
- docker build -t wordpressdevelop/php:5.2-fpm 5.2/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:5.2-fpm$PR_TAG 5.2/php
- docker images
- docker push wordpressdevelop/php:5.2-fpm
- docker push $PACKAGE_REGISTRY/php:5.2-fpm$PR_TAG
- name: "php 5.3"
script:
- docker build -t wordpressdevelop/php:5.3-fpm 5.3/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:5.3-fpm$PR_TAG 5.3/php
- docker images
- docker push wordpressdevelop/php:5.3-fpm
- docker push $PACKAGE_REGISTRY/php:5.3-fpm$PR_TAG
- name: "php 5.4"
script:
- docker build -t wordpressdevelop/php:5.4-fpm 5.4/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:5.4-fpm$PR_TAG 5.4/php
- docker images
- docker push wordpressdevelop/php:5.4-fpm
- docker push $PACKAGE_REGISTRY/php:5.4-fpm$PR_TAG
- name: "php 5.5"
script:
- docker build -t wordpressdevelop/php:5.5-fpm 5.5/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:5.5-fpm$PR_TAG 5.5/php
- docker images
- docker push wordpressdevelop/php:5.5-fpm
- docker push $PACKAGE_REGISTRY/php:5.5-fpm$PR_TAG
- name: "php 5.6"
script:
- docker build -t wordpressdevelop/php:5.6-fpm 5.6/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:5.6-fpm$PR_TAG 5.6/php
- docker images
- docker push wordpressdevelop/php:5.6-fpm
- docker push $PACKAGE_REGISTRY/php:5.6-fpm$PR_TAG
- name: "php 7.0"
script:
- docker build -t wordpressdevelop/php:7.0-fpm 7.0/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:7.0-fpm$PR_TAG 7.0/php
- docker images
- docker push wordpressdevelop/php:7.0-fpm
- docker push $PACKAGE_REGISTRY/php:7.0-fpm$PR_TAG
- name: "php 7.1"
script:
- docker build -t wordpressdevelop/php:7.1-fpm 7.1/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:7.1-fpm$PR_TAG 7.1/php
- docker images
- docker push wordpressdevelop/php:7.1-fpm
- docker push $PACKAGE_REGISTRY/php:7.1-fpm$PR_TAG
- name: "php 7.2"
script:
- docker build -t wordpressdevelop/php:7.2-fpm 7.2/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:7.2-fpm$PR_TAG 7.2/php
- docker images
- docker push wordpressdevelop/php:7.2-fpm
- docker push $PACKAGE_REGISTRY/php:7.2-fpm$PR_TAG
- name: "php 7.3"
script:
- docker build -t wordpressdevelop/php:7.3-fpm -t wordpressdevelop/php:latest 7.3/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:7.3-fpm$PR_TAG -t $PACKAGE_REGISTRY/php:latest$PR_TAG 7.3/php
- docker images
- docker push wordpressdevelop/php:7.3-fpm
- docker push wordpressdevelop/php:latest
- docker push $PACKAGE_REGISTRY/php:7.3-fpm$PR_TAG
- docker push $PACKAGE_REGISTRY/php:latest$PR_TAG
- name: "php 7.4"
script:
- docker build -t wordpressdevelop/php:7.4-fpm 7.4/php
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/php:7.4-fpm$PR_TAG 7.4/php
- docker images
- docker push wordpressdevelop/php:7.4-fpm
- docker push $PACKAGE_REGISTRY/php:7.4-fpm$PR_TAG

- stage: "Build child images"
name: "phpunit 5.2"
script:
- docker build -t wordpressdevelop/phpunit:5.2-fpm 5.2/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:5.2-fpm$PR_TAG 5.2/phpunit
- docker images
- docker push wordpressdevelop/phpunit:5.2-fpm
- docker push $PACKAGE_REGISTRY/phpunit:5.2-fpm$PR_TAG
- name: "phpunit 5.3"
script:
- docker build -t wordpressdevelop/phpunit:5.3-fpm 5.3/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:5.3-fpm$PR_TAG 5.3/phpunit
- docker images
- docker push wordpressdevelop/phpunit:5.3-fpm
- docker push $PACKAGE_REGISTRY/phpunit:5.3-fpm$PR_TAG
- name: "phpunit 5.4"
script:
- docker build -t wordpressdevelop/phpunit:5.4-fpm 5.4/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:5.4-fpm$PR_TAG 5.4/phpunit
- docker images
- docker push wordpressdevelop/phpunit:5.4-fpm
- docker push $PACKAGE_REGISTRY/phpunit:5.4-fpm$PR_TAG
- name: "phpunit 5.5"
script:
- docker build -t wordpressdevelop/phpunit:5.5-fpm 5.5/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:5.5-fpm$PR_TAG 5.5/phpunit
- docker images
- docker push wordpressdevelop/phpunit:5.5-fpm
- docker push $PACKAGE_REGISTRY/phpunit:5.5-fpm$PR_TAG
- name: "phpunit 5.6"
script:
- docker build -t wordpressdevelop/phpunit:5.6-fpm 5.6/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:5.6-fpm$PR_TAG 5.6/phpunit
- docker images
- docker push wordpressdevelop/phpunit:5.6-fpm
- docker push $PACKAGE_REGISTRY/phpunit:5.6-fpm$PR_TAG
- name: "phpunit 7.0"
script:
- docker build -t wordpressdevelop/phpunit:7.0-fpm 7.0/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:7.0-fpm$PR_TAG 7.0/phpunit
- docker images
- docker push wordpressdevelop/phpunit:7.0-fpm
- docker push $PACKAGE_REGISTRY/phpunit:7.0-fpm$PR_TAG
- name: "phpunit 7.1"
script:
- docker build -t wordpressdevelop/phpunit:7.1-fpm 7.1/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:7.1-fpm$PR_TAG 7.1/phpunit
- docker images
- docker push wordpressdevelop/phpunit:7.1-fpm
- docker push $PACKAGE_REGISTRY/phpunit:7.1-fpm$PR_TAG
- name: "phpunit 7.2"
script:
- docker build -t wordpressdevelop/phpunit:7.2-fpm 7.2/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:7.2-fpm$PR_TAG 7.2/phpunit
- docker images
- docker push wordpressdevelop/phpunit:7.2-fpm
- docker push $PACKAGE_REGISTRY/phpunit:7.2-fpm$PR_TAG
- name: "phpunit 7.3"
script:
- docker build -t wordpressdevelop/phpunit:7.3-fpm -t wordpressdevelop/phpunit:latest 7.3/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:7.3-fpm$PR_TAG -t $PACKAGE_REGISTRY/phpunit:latest$PR_TAG 7.3/phpunit
- docker images
- docker push wordpressdevelop/phpunit:7.3-fpm
- docker push wordpressdevelop/phpunit:latest
- docker push $PACKAGE_REGISTRY/phpunit:7.3-fpm$PR_TAG
- docker push $PACKAGE_REGISTRY/phpunit:latest$PR_TAG
- name: "phpunit 7.4"
script:
- docker build -t wordpressdevelop/phpunit:7.4-fpm 7.4/phpunit
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/phpunit:7.4-fpm$PR_TAG 7.4/phpunit
- docker images
- docker push wordpressdevelop/phpunit:7.4-fpm
- docker push $PACKAGE_REGISTRY/phpunit:7.4-fpm$PR_TAG

- name: "cli 5.2"
script:
- docker build -t wordpressdevelop/cli:5.2-fpm 5.2/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:5.2-fpm$PR_TAG 5.2/cli
- docker images
- docker push wordpressdevelop/cli:5.2-fpm
- docker push $PACKAGE_REGISTRY/cli:5.2-fpm$PR_TAG
- name: "cli 5.3"
script:
- docker build -t wordpressdevelop/cli:5.3-fpm 5.3/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:5.3-fpm$PR_TAG 5.3/cli
- docker images
- docker push wordpressdevelop/cli:5.3-fpm
- docker push $PACKAGE_REGISTRY/cli:5.3-fpm$PR_TAG
- name: "cli 5.4"
script:
- docker build -t wordpressdevelop/cli:5.4-fpm 5.4/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:5.4-fpm$PR_TAG 5.4/cli
- docker images
- docker push wordpressdevelop/cli:5.4-fpm
- docker push $PACKAGE_REGISTRY/cli:5.4-fpm$PR_TAG
- name: "cli 5.5"
script:
- docker build -t wordpressdevelop/cli:5.5-fpm 5.5/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:5.5-fpm$PR_TAG 5.5/cli
- docker images
- docker push wordpressdevelop/cli:5.5-fpm
- docker push $PACKAGE_REGISTRY/cli:5.5-fpm$PR_TAG
- name: "cli 5.6"
script:
- docker build -t wordpressdevelop/cli:5.6-fpm 5.6/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:5.6-fpm$PR_TAG 5.6/cli
- docker images
- docker push wordpressdevelop/cli:5.6-fpm
- docker push $PACKAGE_REGISTRY/cli:5.6-fpm$PR_TAG
- name: "cli 7.0"
script:
- docker build -t wordpressdevelop/cli:7.0-fpm 7.0/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:7.0-fpm$PR_TAG 7.0/cli
- docker images
- docker push wordpressdevelop/cli:7.0-fpm
- docker push $PACKAGE_REGISTRY/cli:7.0-fpm$PR_TAG
- name: "cli 7.1"
script:
- docker build -t wordpressdevelop/cli:7.1-fpm 7.1/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:7.1-fpm$PR_TAG 7.1/cli
- docker images
- docker push wordpressdevelop/cli:7.1-fpm
- docker push $PACKAGE_REGISTRY/cli:7.1-fpm$PR_TAG
- name: "cli 7.2"
script:
- docker build -t wordpressdevelop/cli:7.2-fpm 7.2/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:7.2-fpm$PR_TAG 7.2/cli
- docker images
- docker push wordpressdevelop/cli:7.2-fpm
- docker push $PACKAGE_REGISTRY/cli:7.2-fpm$PR_TAG
- name: "cli 7.3"
script:
- docker build -t wordpressdevelop/cli:7.3-fpm -t wordpressdevelop/cli:latest 7.3/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:7.3-fpm$PR_TAG -t $PACKAGE_REGISTRY/cli:latest$PR_TAG 7.3/cli
- docker images
- docker push wordpressdevelop/cli:7.3-fpm
- docker push wordpressdevelop/cli:latest
- docker push $PACKAGE_REGISTRY/cli:7.3-fpm$PR_TAG
- docker push $PACKAGE_REGISTRY/cli:latest$PR_TAG
- name: "cli 7.4"
script:
- docker build -t wordpressdevelop/cli:7.4-fpm 7.4/cli
- docker build --build-arg PACKAGE_REGISTRY=$PACKAGE_REGISTRY --build-arg PR_TAG=$PR_TAG -t $PACKAGE_REGISTRY/cli:7.4-fpm$PR_TAG 7.4/cli
- docker images
- docker push wordpressdevelop/cli:7.4-fpm
- docker push $PACKAGE_REGISTRY/cli:7.4-fpm$PR_TAG

21 changes: 20 additions & 1 deletion .travis.yml-template
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
%%GENERATED_WARNING%%

if: tag IS blank

services:
- docker

branches:
only:
- master

env:
global:
- DOCKER_USERNAME: garypendergast
- GITHUB_USERNAME: pento
# DOCKER_PASSWORD
- secure: usv1haWO4zKTM0Ewc/boDRTJTeje6pHYXxBMpf6ny58nvqYlcGfso/UDk6ZlAu/B3/uNrEzf7NqRibJduqmq4RNLqgI7DCFSJuyxXntuSK1/CRJso1+lGYBQKAKoRDb01i1+6qy511LpyZa/nta4FxD0LmrTVNkmurQMQsQIUq5GsSDpbbSmrCZ/oKFQu+mwLnLc1hpbsHdDAjwEiqMW7GGAD5xPmwUa2jV1ZhiKikifggZIpPCnHtKj5a3oGtYVzA9t0TfMkI42Xw089ViZ+7EEmLEG1oGGpZlixZFNE/tgrRF/JmekFYusIOVPEfPEJDMzmGCJwqSanhXxnSHc2OVTJ99CyGXqASKcppRrpxZmBq4j/3tT7aZdXehxoa3+7Ba0wgHqT6n0rJDXq+soZXZZo01hBJxsNKFx9jxkS1EUdKRDCE+sOytfgPFU4nraSjqGOsFQfNYVwW60nMI0Y637k/797SjgZeM6zjXarNpllsaaog3CL+sP+YPKDF9V9CiMUIPi5d5gBBvOts2CKEWgIxuSoukIfjejU4obKC79DOdTGdDYydXRBk4289BY4vtQtr+P7ORMJW1cZ/MFd2Nbxte1OmuE6MoAv2xzutJLJDTNxISC25zI6VdukAtC+F8/HHRzi3ysJO2fr3rH2da6Z8Jep7dSRL4iE0D5S0U=
# GITHUB_TOKEN
- secure: Y8TKVQ9hWYdffxRliIDDDoXCF1FyOeOJ+oq9cRVeMG5/wgofor/3vhN2anOdwrrsoQvmoDwJII97iT9mcKnmQe6UV/LnZXXw/P1peWJOaDsKbwEX+07agNVQKdefqaxi5Jr1wDMgkadn39VU7/haXrsjqJ3Wbnu5AfcGnIzxfVnLjehkuSSOOmQy3w+RwW+HymLVpFqevfhED4uJjrjvwUEvtirxG0E3nyKXGsjusPSDGVzZhmLJBXEHf0g717loN1b+JeUa6TeIYGQ5vM/oRsyzxeJJ0iltiTKk31JHtBP+TTcoyHKWqOzefVfoXCNbk1G2Ez8czUqWIfQK8YnIHOmneUeSi6lQbCdcMSWbv/bJ5+wEJgsQKGBxy7qfF8v0T/GoMSi1OM6JfkcgW3bhuBgMGdnwxJUJ/lmYYAYlmXcO/+cui7lmyXsMT44lArdCZFo9SGt5IlPL4BW5SODYrDFKzP+2uHsj56flK03/lt+/KNJjLZKvH6NbzfhESRzMChnFFaz5eWxHgMZJefO5S51zI/88gu8YZgQDahpgIQUKvZKqi1dSASfVQ7jGqKj3roNKu2s4IdQoMXELeIehrsn9bw6BiN1kaL8yyAXjWLry21VXH0VYv0FdF4W7j23Wv7GWbcg0THDSydLvLYICPBi7NyU3yCPsGGlGpT8Oe9A=
- PR_TAG: $(if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "-$TRAVIS_PULL_REQUEST"; else echo ""; fi)
- PACKAGE_REGISTRY_HOST: $(if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "docker.pkg.github.com"; else echo ""; fi)
- PACKAGE_REGISTRY: $(if [ "$PACKAGE_REGISTRY_HOST" != "" ]; then echo "${PACKAGE_REGISTRY_HOST}/wordpress/wpdev-docker-images"; else echo "wordpressdevelop"; fi)

before_script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
before_script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
else
echo "$GITHUB_TOKEN" | docker login docker.pkg.github.com -u "$GITHUB_USERNAME" --password-stdin
fi

jobs:
include:
Expand Down
4 changes: 3 additions & 1 deletion 5.2/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.2-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.2-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.2/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.2-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.2-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.3/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.3-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.3-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.3/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.3-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.3-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.4/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.4-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.4-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.4/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.4-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.4-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.5/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.5-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.5-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.5/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.5-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.5-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.6/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.6-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.6-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 5.6/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:5.6-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:5.6-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 7.0/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:7.0-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:7.0-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 7.0/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:7.0-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:7.0-fpm$PR_TAG

##########################################################################
#
Expand Down
4 changes: 3 additions & 1 deletion 7.1/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM wordpressdevelop/php:7.1-fpm
ARG PACKAGE_REGISTRY
ARG PR_TAG
FROM $PACKAGE_REGISTRY/php:7.1-fpm$PR_TAG

##########################################################################
#
Expand Down
Loading

0 comments on commit a43620a

Please sign in to comment.