Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #16332 to 7.x: Fix versioning of dropwizard image used in tests #16380

Merged
merged 3 commits into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add collecting AuroraDB metrics in rds metricset. {issue}14142[14142] {pull}16004[16004]
- Reuse connections in SQL module. {pull}16001[16001]
- Improve the `logstash` module (when `xpack.enabled` is set to `true`) to use the override `cluster_uuid` returned by Logstash APIs. {issue}15772[15772] {pull}15795[15795]
- Add support for Dropwizard metrics 4.1. {pull}16332[16332]
- Add support for NATS 2.1. {pull}16317[16317]

*Packetbeat*
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/dropwizard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is the http://dropwizard.io[Dropwizard] module. The default metricset is `c
[float]
=== Compatibility

The Dropwizard module is tested with dropwizard metrics 3.1.0.
The Dropwizard module is tested with dropwizard metrics 3.2.6, 4.0.0 and 4.1.2.


[float]
Expand Down
17 changes: 12 additions & 5 deletions metricbeat/module/dropwizard/_meta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
ARG MAVEN_VERSION
FROM maven:${MAVEN_VERSION}
FROM maven:3.6-jdk-8

# Variables used in pom.xml
ARG DROPWIZARD_VERSION

# Build the deployable war
COPY test /test
WORKDIR /test
RUN mvn verify

# Build the final image
FROM jetty:9.4.26-jre8
COPY --from=0 /test/target/test-1.0-SNAPSHOT.war /var/lib/jetty/webapps/test.war

HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost:8080/test/helloworld
EXPOSE 8080

WORKDIR /test
CMD mvn jetty:run
2 changes: 1 addition & 1 deletion metricbeat/module/dropwizard/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ This is the http://dropwizard.io[Dropwizard] module. The default metricset is `c
[float]
=== Compatibility

The Dropwizard module is tested with dropwizard metrics 3.1.0.
The Dropwizard module is tested with dropwizard metrics 3.2.6, 4.0.0 and 4.1.2.
4 changes: 4 additions & 0 deletions metricbeat/module/dropwizard/_meta/supported-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variants:
- DROPWIZARD_VERSION: 4.1.2
- DROPWIZARD_VERSION: 4.0.0
- DROPWIZARD_VERSION: 3.2.6
19 changes: 1 addition & 18 deletions metricbeat/module/dropwizard/_meta/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,7 @@
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-servlets</artifactId>
<version>4.0.0</version>
<version>${env.DROPWIZARD_VERSION}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
4 changes: 2 additions & 2 deletions metricbeat/module/dropwizard/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ version: '2.3'

services:
dropwizard:
image: docker.elastic.co/integrations-ci/beats-dropwizard:${MAVEN_VERSION:-3.3-jdk-8}-1
image: docker.elastic.co/integrations-ci/beats-dropwizard:${DROPWIZARD_VERSION:-4.1.2}-1
build:
context: ./_meta
args:
MAVEN_VERSION: ${MAVEN_VERSION:-3.3-jdk-8}
DROPWIZARD_VERSION: ${DROPWIZARD_VERSION:-4.1.2}
ports:
- 8080
1 change: 1 addition & 0 deletions metricbeat/module/dropwizard/test_dropwizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import metricbeat


@metricbeat.parameterized_with_supported_versions
class Test(metricbeat.BaseTest):

COMPOSE_SERVICES = ['dropwizard']
Expand Down