Skip to content

Commit 270bf07

Browse files
authored
Fix integration tests (#842)
* Run integration tests * Pass `WORDPRESS_VERSION` env as a docker build arg * The integration tests pass on 6.8.1 and fail on 6.6 * Set WORDPRESS_VERSION default value
1 parent 55a7029 commit 270bf07

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ common_params:
1616
# - '6.3'
1717
# - '6.4'
1818
# - '6.5'
19-
- '6.6'
19+
# - '6.6'
20+
- '6.8.1'
2021

2122
steps:
2223
#

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ services:
33
build:
44
context: .
55
dockerfile: wordpress.Dockerfile
6+
args:
7+
WORDPRESS_VERSION: ${WORDPRESS_VERSION:-latest}
68
container_name: 'wordpress'
79
ports:
810
- '80:80'

scripts/setup-test-site.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
# This script sets up a WordPress test site on the `wordpress` docker image.
5+
# This script sets up a WordPress test site on the `wordpress` docker image.
66
# You might wonder "why not do this work once, then just import the database for each run?"
77
# We do each step each time for each build because we're trying to get a "mint" condition site
88
# for each WordPress version – if there are issues with DB migrations, different default themes
@@ -19,7 +19,7 @@ tries=0
1919
while true; do
2020

2121
code=0
22-
wp db check || code=$?
22+
wp db check --skip-ssl || code=$?
2323

2424
if [ $code == 0 ]; then
2525
echo 'Database Ready'
@@ -169,5 +169,4 @@ wp option update timezone_string "America/New_York"
169169

170170
cp -rp wp-content/plugins wp-content/plugins-backup
171171

172-
wp db export --add-drop-table wp-content/dump.sql
173-
172+
wp db export --skip-ssl --add-drop-table wp-content/dump.sql

wordpress.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
FROM public.ecr.aws/docker/library/wordpress:${WORDPRESS_VERSION:-latest}
1+
ARG WORDPRESS_VERSION="latest"
2+
3+
FROM public.ecr.aws/docker/library/wordpress:${WORDPRESS_VERSION}
24

35
RUN apt-get update \
46
&& apt-get install -y wget gpg
57

68
# https://docs.aws.amazon.com/corretto/latest/corretto-21-ug/generic-linux-install.html
79
# To use the Corretto Apt repositories on Debian-based systems, such as Ubuntu, import the \
8-
# Corretto public key and then add the repository to the system list by using the following commands:
10+
# Corretto public key and then add the repository to the system list by using the following commands:
911
RUN wget -O - https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && \
1012
echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list
1113

0 commit comments

Comments
 (0)