Skip to content

Commit 9458d03

Browse files
committed
Merge branch '7.x' into 7.7
2 parents 45e45f2 + 88b7e1c commit 9458d03

17 files changed

+219
-121
lines changed

.ci/Dockerfile

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
ARG PHP_VERSION=7.4-cli
22
FROM php:${PHP_VERSION}
33

4-
# Create app directory
54
WORKDIR /usr/src/app
65

7-
COPY . .
8-
96
# Install git
107
RUN apt-get update && \
118
apt-get install -y --no-install-recommends git
@@ -15,10 +12,24 @@ RUN apt-get install -y \
1512
libzip-dev \
1613
zip \
1714
&& docker-php-ext-install zip
18-
15+
16+
# Print PHP version
17+
RUN php -v
18+
1919
# Install composer
2020
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
2121

22-
# Install dependencies using composer
23-
RUN composer global require hirak/prestissimo && \
24-
composer install --prefer-dist --no-progress --no-interaction
22+
# Print composer version
23+
RUN composer --version
24+
25+
COPY composer.json .
26+
27+
# Install dependencies with composer
28+
RUN composer global require hirak/prestissimo && composer install
29+
30+
COPY . .
31+
32+
# Updating elasticsearch submodule
33+
RUN git submodule update --init --recursive
34+
35+
CMD ["bash", ".ci/yaml-tests.sh"]

.ci/jobs/defaults.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@
6969
publishers:
7070
- email:
7171
recipients: [email protected]
72-
# - junit:
73-
# results: "*-junit.xml"
74-
# allow-empty-results: true
72+
- junit:
73+
results: "tests/*-junit.xml"
74+
allow-empty-results: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- job:
3+
name: elastic+elasticsearch-php+7.7
4+
display-name: 'elastic / elasticsearch-php # 7.7'
5+
description: Testing the elasticsearch-php 7.7 branch.
6+
parameters:
7+
- string:
8+
name: branch_specifier
9+
default: refs/heads/7.7
10+
description: the Git branch specifier to build (<branchName>, <tagName>,
11+
<commitId>, etc.)
12+
triggers:
13+
- github
14+
- timed: '@daily'

.ci/jobs/elastic+elasticsearch-php+7.x.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
<commitId>, etc.)
1212
triggers:
1313
- github
14-
- timed: '@weekly'
14+
- timed: '@daily'

.ci/jobs/elastic+elasticsearch-php+pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
name: elastic+elasticsearch-php+pull-request
44
display-name: 'elastic / elasticsearch-php # pull-request'
55
description: Testing of elasticsearch-php pull requests.
6+
junit_results: "tests/*-junit.xml"
67
scm:
78
- git:
89
branches:
@@ -16,4 +17,3 @@
1617
github-hooks: true
1718
status-context: clients-ci
1819
cancel-builds-on-update: true
19-
publishers: []

.ci/run-repository.sh

100755100644
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ echo -e "\033[34;1mINFO:\033[0m PHP_VERSION ${PHP_VERSION}\033[0m"
2222
echo -e "\033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
2323

2424
docker build \
25+
--no-cache \
2526
--file .ci/Dockerfile \
2627
--tag elastic/elasticsearch-php \
2728
--build-arg PHP_VERSION=${PHP_VERSION} \
@@ -33,13 +34,13 @@ repo=$(realpath $(dirname $(realpath -s $0))/../)
3334

3435
docker run \
3536
--network=${network_name} \
36-
--env "STACK_VERSION=${STACK_VERSION}" \
37-
--env "TEST_SUITE=${TEST_SUITE}" \
38-
--env "PHP_VERSION=${PHP_VERSION}" \
39-
--env "ELASTICSEARCH_URL=${ELASTICSEARCH_URL}" \
40-
--volume $repo:/usr/src/app \
37+
--workdir="/usr/src/app" \
38+
--volume=${repo}/tests:/usr/src/app/tests \
39+
--env STACK_VERSION=${STACK_VERSION} \
40+
--env TEST_SUITE=${TEST_SUITE} \
41+
--env PHP_VERSION=${PHP_VERSION} \
42+
--env ELASTICSEARCH_URL=${ELASTICSEARCH_URL} \
4143
--ulimit nofile=65535:65535 \
4244
--name elasticsearch-php \
4345
--rm \
44-
elastic/elasticsearch-php \
45-
php util/RestSpecRunner.php && vendor/bin/phpunit -c phpunit-integration.xml --group sync
46+
elastic/elasticsearch-php

.ci/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ if [[ -n "$RUNSCRIPTS" ]]; then
2020
fi
2121

2222
echo -e "\033[1m>>>>> Repository specific tests >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
23-
bash .ci/run-repository.sh
23+
bash .ci/run-repository.sh

.ci/test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
STACK_VERSION:
3-
- 7.7.0-SNAPSHOT
3+
- 7.x-SNAPSHOT
44

55
PHP_VERSION:
66
- 7.4-cli

.ci/yaml-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
# Checkout the YAML test from Elasticsearch tag
4+
php util/RestSpecRunner.php
5+
6+
# Run YAML tests
7+
vendor/bin/phpunit -c phpunit-integration.xml --group sync

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ util/cache/
3232

3333
# Code coverage
3434
build
35+
36+
# Junit test output
37+
tests/*-junit.xml

0 commit comments

Comments
 (0)