Skip to content

Commit e47c948

Browse files
author
Corneil du Plessis
authored
Update baseImage to 1.0.1 (spring-attic#4897)
Fixed bin/sh in compose files. Added local developer support scripts. Add buffered client for logging interceptor.
1 parent 61c1f80 commit e47c948

File tree

9 files changed

+61
-15
lines changed

9 files changed

+61
-15
lines changed

spring-cloud-dataflow-server/src/test/java/org/springframework/cloud/dataflow/integration/test/DataFlowIT.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,8 +2029,9 @@ private void setDefaultVersionForTimestamp(String version) {
20292029
private void resetTimestampVersion() {
20302030
try {
20312031
AppRegistryOperations appRegistryOperations = this.dataFlowOperations.appRegistryOperations();
2032+
DetailedAppRegistrationResource registrationResource = null;
20322033
try {
2033-
appRegistryOperations.info("timestamp", ApplicationType.task, false);
2034+
registrationResource = appRegistryOperations.info("timestamp", ApplicationType.task, true);
20342035
}
20352036
catch (DataFlowClientException dfe) {
20362037
if (dfe.getMessage().equals("The 'task:timestamp' application could not be found.")) {
@@ -2041,10 +2042,12 @@ private void resetTimestampVersion() {
20412042
}
20422043
}
20432044
setDefaultVersionForTimestamp(CURRENT_VERSION_NUMBER);
2044-
appRegistryOperations.unregister("timestamp", ApplicationType.task, TEST_VERSION_NUMBER);
2045+
if(registrationResource != null && !registrationResource.getVersions().contains(TEST_VERSION_NUMBER)) {
2046+
appRegistryOperations.unregister("timestamp", ApplicationType.task, TEST_VERSION_NUMBER);
2047+
}
20452048
}
20462049
catch (DataFlowClientException dfe) {
2047-
logger.trace(dfe.getMessage(), dfe);
2050+
logger.error(dfe.getMessage(), dfe);
20482051
}
20492052

20502053
}

spring-cloud-dataflow-server/src/test/java/org/springframework/cloud/dataflow/integration/test/DataFlowOperationsITConfiguration.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
import org.springframework.context.annotation.Configuration;
3737
import org.springframework.context.annotation.Import;
3838
import org.springframework.http.HttpRequest;
39+
import org.springframework.http.client.BufferingClientHttpRequestFactory;
3940
import org.springframework.http.client.ClientHttpRequestExecution;
41+
import org.springframework.http.client.ClientHttpRequestFactory;
4042
import org.springframework.http.client.ClientHttpRequestInterceptor;
4143
import org.springframework.http.client.ClientHttpResponse;
4244
import org.springframework.util.StreamUtils;
@@ -58,10 +60,11 @@ public class DataFlowOperationsITConfiguration {
5860

5961
@Bean
6062
public RestTemplate restTemplate(DataFlowClientProperties dataFlowClientProperties) throws URISyntaxException {
61-
RestTemplate restTemplate = new RestTemplate(HttpClientConfigurer
63+
ClientHttpRequestFactory requestFactory = HttpClientConfigurer
6264
.create(new URI(dataFlowClientProperties.getServerUri()))
6365
.skipTlsCertificateVerification(dataFlowClientProperties.isSkipSslValidation())
64-
.buildClientHttpRequestFactory());
66+
.buildClientHttpRequestFactory();
67+
RestTemplate restTemplate = new RestTemplate(new BufferingClientHttpRequestFactory(requestFactory));
6568

6669
restTemplate.setInterceptors(Arrays.asList(new AcceptCharsetInterceptor(), new LoggingInterceptor()));
6770

spring-cloud-dataflow-server/src/test/resources/docker-compose-docker-it-task-import.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: '3'
44
services:
55

66
ci-app-import-task:
7-
image: springcloud/baseimage:1.0.0
7+
image: springcloud/baseimage:1.0.1
88
container_name: dataflow-app-import-task-ci
99
depends_on:
1010
- dataflow-server

spring-cloud-dataflow-server/src/test/resources/docker-compose-maven-it-task-import.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: '3'
44
services:
55

66
ci-app-import-task:
7-
image: springcloud/baseimage:1.0.0
7+
image: springcloud/baseimage:1.0.1
88
container_name: dataflow-app-import-task-ci
99
depends_on:
1010
- dataflow-server

src/docker-compose/docker-compose.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ services:
8383
depends_on:
8484
- kafka-broker
8585
- skipper-server
86+
- mariadb
8687
entrypoint: >
87-
bin/sh -c "
88+
/bin/sh -c "
8889
apt-get update && apt-get install --no-install-recommends -y wget &&
8990
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
9091
chmod a+x /tmp/wait-for-it.sh &&
@@ -94,7 +95,7 @@ services:
9495
- ${HOST_MOUNT_PATH:-.}:${DOCKER_MOUNT_PATH:-/home/cnb/scdf}
9596

9697
app-import-stream:
97-
image: springcloud/baseimage:1.0.0
98+
image: springcloud/baseimage:1.0.1
9899
container_name: dataflow-app-import-stream
99100
depends_on:
100101
- dataflow-server
@@ -108,7 +109,7 @@ services:
108109
echo 'Maven Stream apps imported'"
109110
110111
app-import-task:
111-
image: springcloud/baseimage:1.0.0
112+
image: springcloud/baseimage:1.0.1
112113
container_name: dataflow-app-import-task
113114
depends_on:
114115
- dataflow-server
@@ -122,6 +123,8 @@ services:
122123
user: root
123124
image: springcloud/spring-cloud-skipper-server:${SKIPPER_VERSION:-2.9.0-SNAPSHOT}${BP_JVM_VERSION:-}
124125
container_name: skipper
126+
depends_on:
127+
- mariadb
125128
ports:
126129
- "7577:7577"
127130
- ${APPS_PORT_RANGE:-20000-20195:20000-20195}
@@ -134,7 +137,7 @@ services:
134137
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.mariadb.jdbc.Driver
135138
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_SKIPPER_SERVER_DEPLOYER=ERROR
136139
entrypoint: >
137-
bin/sh -c "
140+
/bin/sh -c "
138141
apt-get update && apt-get install --no-install-recommends -y wget &&
139142
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
140143
chmod a+x /tmp/wait-for-it.sh &&

src/local/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Local Development Support
2+
3+
The files in this folder are to support local testing and development.
4+
5+
## `create-containers.sh`
6+
Creates all containers and pushes to local docker registry.
7+
8+
## `simple-integration-test.sh`
9+
10+
Execute simple Integration tests using MariaDB.

src/local/create-containers.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
TAG=2.10.0-SNAPSHOT
3+
v=11
4+
pack build \
5+
--path spring-cloud-dataflow-server/target/spring-cloud-dataflow-server-$TAG.jar \
6+
--builder gcr.io/paketo-buildpacks/builder:base \
7+
--env BP_JVM_VERSION=$v springcloud/spring-cloud-dataflow-server:$TAG
8+
pack build \
9+
--path spring-cloud-dataflow-composed-task-runner/target/spring-cloud-dataflow-composed-task-runner-$TAG.jar \
10+
--builder gcr.io/paketo-buildpacks/builder:base \
11+
--env BP_JVM_VERSION=$v springcloud/spring-cloud-dataflow-composed-task-runner:$TAG
12+
pack build \
13+
--path spring-cloud-dataflow-tasklauncher/spring-cloud-dataflow-tasklauncher-sink-kafka/target/spring-cloud-dataflow-tasklauncher-sink-kafka-$TAG.jar \
14+
--builder gcr.io/paketo-buildpacks/builder:base \
15+
--env BP_JVM_VERSION=$v springcloud/spring-cloud-dataflow-tasklauncher-sink-kafka:$TAG
16+
pack build \
17+
--path spring-cloud-dataflow-tasklauncher/spring-cloud-dataflow-tasklauncher-sink-rabbit/target/spring-cloud-dataflow-tasklauncher-sink-rabbit-$TAG.jar \
18+
--builder gcr.io/paketo-buildpacks/builder:base \
19+
--env BP_JVM_VERSION=$v springcloud/spring-cloud-dataflow-tasklauncher-sink-rabbit:$TAG
20+
pack build \
21+
--path spring-cloud-dataflow-single-step-batch-job/target/spring-cloud-dataflow-single-step-batch-job-$TAG.jar \
22+
--builder gcr.io/paketo-buildpacks/builder:base \
23+
--env BP_JVM_VERSION=$v springcloud/spring-cloud-dataflow-single-step-batch-job:$TAG
24+
docker build -t springcloud/spring-cloud-dataflow-prometheus-local:$TAG src/grafana/prometheus/docker/prometheus-local

src/local/simple-integration-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
./mvnw -X clean test-compile failsafe:integration-test -pl spring-cloud-dataflow-server \
3+
-Pfailsafe -Dgroups=docker-compose -Dtest.docker.compose.pullOnStartup=false

src/templates/docker-compose/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ services:
8484
- kafka-broker
8585
- skipper-server
8686
entrypoint: >
87-
bin/sh -c "
87+
/bin/sh -c "
8888
apt-get update && apt-get install --no-install-recommends -y wget &&
8989
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
9090
chmod a+x /tmp/wait-for-it.sh &&
@@ -94,7 +94,7 @@ services:
9494
- ${HOST_MOUNT_PATH:-.}:${DOCKER_MOUNT_PATH:-/home/cnb/scdf}
9595

9696
app-import-stream:
97-
image: springcloud/baseimage:1.0.0
97+
image: springcloud/baseimage:1.0.1
9898
container_name: dataflow-app-import-stream
9999
depends_on:
100100
- dataflow-server
@@ -108,7 +108,7 @@ services:
108108
echo 'Maven Stream apps imported'"
109109
110110
app-import-task:
111-
image: springcloud/baseimage:1.0.0
111+
image: springcloud/baseimage:1.0.1
112112
container_name: dataflow-app-import-task
113113
depends_on:
114114
- dataflow-server
@@ -134,7 +134,7 @@ services:
134134
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.mariadb.jdbc.Driver
135135
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_SKIPPER_SERVER_DEPLOYER=ERROR
136136
entrypoint: >
137-
bin/sh -c "
137+
/bin/sh -c "
138138
apt-get update && apt-get install --no-install-recommends -y wget &&
139139
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
140140
chmod a+x /tmp/wait-for-it.sh &&

0 commit comments

Comments
 (0)