File tree Expand file tree Collapse file tree 7 files changed +72
-29
lines changed Expand file tree Collapse file tree 7 files changed +72
-29
lines changed Original file line number Diff line number Diff line change @@ -197,9 +197,11 @@ orbs:
197
197
- setup_remote_docker :
198
198
docker_layer_caching : true
199
199
- run :
200
- command : ./integration/bin/build-images -a
200
+ command : ./integration/bin/build-images
201
201
- run :
202
- command : ./integration/bin/ci
202
+ command : ./integration/apps/rack/bin/build-images
203
+ - run :
204
+ command : ./integration/apps/rack/bin/ci -v 2.7
203
205
test :
204
206
<< : *test_job_default
205
207
docker :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ APP_BIN_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
5
+ APP_DIR=${APP_BIN_DIR%/ bin}
6
+ cd $APP_DIR
7
+
8
+ # Parse options
9
+ while getopts " v:" opt; do
10
+ case $opt in
11
+ v)
12
+ APP_RUBY_VERSION=$OPTARG
13
+ ;;
14
+ \? )
15
+ echo " Invalid option: -$OPTARG " >&2
16
+ exit 1
17
+ ;;
18
+ :)
19
+ echo " Option -$OPTARG requires an argument." >&2
20
+ exit 1
21
+ ;;
22
+ esac
23
+ done
24
+
25
+ # Validate options
26
+ if [ -z ${APP_RUBY_VERSION+x} ]; then
27
+ echo " You must specify a Ruby version with -v. (e.g. 2.7)" >&2
28
+ exit 1
29
+ fi
30
+
31
+ # Set configuration
32
+ APP_BASE_IMAGE=${APP_BASE_IMAGE:- datadog/ dd-apm-demo: rb-$APP_RUBY_VERSION }
33
+ APP_IMAGE=${APP_IMAGE:- $APP_BASE_IMAGE -rack}
34
+ APP_COMPOSE_FILES=" -f docker-compose.yml -f docker-compose.ci.yml"
35
+
36
+ echo " == Running integration tests... =="
37
+ echo " - App: rack"
38
+ echo " - Ruby version: $APP_RUBY_VERSION "
39
+ echo " - Base image: $APP_BASE_IMAGE "
40
+ echo " - App image: $APP_IMAGE "
41
+ echo " "
42
+
43
+ # Pull/build any missing images
44
+ APP_IMAGE=$APP_IMAGE docker-compose $APP_COMPOSE_FILES build
45
+
46
+ # Run the test suite
47
+ APP_IMAGE=$APP_IMAGE docker-compose $APP_COMPOSE_FILES run tester
48
+
49
+ # Cleanup
50
+ APP_IMAGE=$APP_IMAGE docker-compose $APP_COMPOSE_FILES down -t 0 --remove-orphans
Original file line number Diff line number Diff line change
1
+ version : ' 3.2'
2
+ services :
3
+ app :
4
+ image : ${APP_IMAGE}
5
+ tester :
6
+ image : ${APP_IMAGE}
7
+ ddagent :
8
+ environment :
9
+ - DD_API_KEY=invalid_api_key
Original file line number Diff line number Diff line change @@ -47,9 +47,10 @@ services:
47
47
- " 8125/udp"
48
48
- " 8126"
49
49
volumes :
50
- - type : bind
51
- source : ../../config/agent.yaml
52
- target : /etc/datadog-agent/datadog.yaml
50
+ - ../../config/agent.yaml:/etc/datadog-agent/datadog.yaml
51
+ # - type: bind
52
+ # source: ../../config/agent.yaml
53
+ # target: /etc/datadog-agent/datadog.yaml
53
54
# For monitoring performance of containers (e.g. CPU, Memory, etc...)
54
55
# - type: bind
55
56
# source: /var/run/docker.sock
@@ -65,7 +66,7 @@ services:
65
66
context : .
66
67
args :
67
68
BASE_IMAGE : datadog/dd-apm-demo:rb-2.7
68
- command : ./ bin/rspec
69
+ command : bin/rspec
69
70
depends_on :
70
71
- app
71
72
environment :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ cd $INTEGRATION_DIR
7
7
8
8
# Set base image version
9
9
INTEGRATION_VERSIONS=( " 2.2" " 2.5" " 2.7" )
10
- INTEGRATION_APPS=( " rack" )
10
+ INTEGRATION_APPS=( " rack" )
11
11
12
12
echo " == Starting CI test suite... =="
13
13
echo " - Apps: $INTEGRATION_APPS "
19
19
for version in " ${INTEGRATION_VERSIONS[@]} "
20
20
do
21
21
:
22
- ./bin/test -a $app -v $version
22
+ # ./bin/test -a $app -v $version
23
+ bash $INTEGRATION_DIR /apps/$app /bin/ci -v $version
23
24
done
24
25
done
25
26
Original file line number Diff line number Diff line change 38
38
39
39
# Set configuration
40
40
INTEGRATION_BASE_IMAGE=${INTEGRATION_BASE_IMAGE:- datadog/ dd-apm-demo: rb-$INTEGRATION_RUBY_VERSION }
41
- INTEGRATION_APP_IMAGE=${INTEGRATION_APP_IMAGE:- datadog / dd-apm-demo : rb- $INTEGRATION_RUBY_VERSION -$INTEGRATION_APP }
41
+ INTEGRATION_APP_IMAGE=${INTEGRATION_APP_IMAGE:- $INTEGRATION_BASE_IMAGE -$INTEGRATION_APP }
42
42
INTEGRATION_COMPOSE_FILES=" -f $INTEGRATION_DIR /apps/$INTEGRATION_APP /docker-compose.yml -f docker-compose.ci.yml"
43
43
44
44
echo " == Running integration tests... =="
@@ -49,13 +49,10 @@ echo " - App image: $INTEGRATION_APP_IMAGE"
49
49
echo " "
50
50
51
51
# Pull/build any missing images
52
- # BASE_IMAGE=$INTEGRATION_BASE_IMAGE docker-compose $INTEGRATION_COMPOSE_FILES build
53
52
APP_IMAGE=$INTEGRATION_APP_IMAGE docker-compose $INTEGRATION_COMPOSE_FILES build
54
53
55
54
# Run the test suite
56
- # BASE_IMAGE=$INTEGRATION_BASE_IMAGE docker-compose $INTEGRATION_COMPOSE_FILES run tester /bin/bash
57
55
APP_IMAGE=$INTEGRATION_APP_IMAGE docker-compose $INTEGRATION_COMPOSE_FILES run tester
58
56
59
57
# Cleanup
60
- # BASE_IMAGE=$INTEGRATION_BASE_IMAGE docker-compose $INTEGRATION_COMPOSE_FILES down -t 0 --remove-orphans
61
58
APP_IMAGE=$INTEGRATION_APP_IMAGE docker-compose $INTEGRATION_COMPOSE_FILES down -t 0 --remove-orphans
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments