Plugin-test configuration.yml dependencies support docker service command field (#357)

This commit is contained in:
zhyyu 2022-10-19 21:21:59 +08:00 committed by GitHub
parent bd76d1a618
commit 6d5bbe8e5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,7 @@ Release Notes.
* Bump up grpc to 1.50.0 to fix CVE-2022-3171
* Polish up nats plugin to unify MQ related tags
* Correct the duration of the transaction span for Neo4J 4.x.
* Plugin-test configuration.yml dependencies support docker service command field
#### Documentation

View File

@ -109,7 +109,7 @@ File Name | Descriptions
| withPlugins | Plugin selector rule, e.g.:`apm-spring-annotation-plugin-*.jar`. Required for `runningMode=with_optional` or `runningMode=with_bootstrap`.
| environment | Same as `docker-compose#environment`.
| depends_on | Same as `docker-compose#depends_on`.
| dependencies | Same as `docker-compose#services`, `image`, `links`, `hostname`, `environment` and `depends_on` are supported.
| dependencies | Same as `docker-compose#services`, `image`, `links`, `hostname`, `command`, `environment` and `depends_on` are supported.
**Note:, `docker-compose` activates only when `dependencies` is blank.**

View File

@ -248,6 +248,7 @@ public class ConfigurationImpl implements IConfiguration {
service.setHealthcheck(dependency.getHealthcheck());
service.setEnvironment(dependency.getEnvironment());
service.setRemoveOnExit(dependency.isRemoveOnExit());
service.setCommand(dependency.getCommand());
services.add(service);
});
return services;

View File

@ -36,6 +36,7 @@ public class DependencyComponent {
private List<String> environment;
private List<String> dependsOn;
private List<String> healthcheck;
private String command;
//make sure that depends_on can be set correctly
public void setDepends_on(List<String> dependsOn) {

View File

@ -36,4 +36,5 @@ public class DockerService {
private List<String> healthcheck;
private List<String> dependsOn;
private List<String> environment;
private String command;
}

View File

@ -64,6 +64,9 @@ services:
<#if service.remoteOnExit??>
remoteOnExit: ${service.remoteOnExit}
</#if>
<#if service.command??>
command: ${service.command}
</#if>
<#if service.volumes??>
volumes:
<#list service.volumes as volume>