6
6
set -euf -o pipefail
7
7
8
8
print_help () {
9
- echo " Usage: $0 [-h] [-l] [-o] [-p platforms] [-v jaeger_version] "
9
+ echo " Usage: $0 [-h] [-l] [-o] [-p platforms]"
10
10
echo " -h: Print help"
11
11
echo " -l: Enable local-only mode that only pushes images to local registry"
12
12
echo " -o: overwrite image in the target remote repository even if the semver tag already exists"
13
13
echo " -p: Comma-separated list of platforms to build for (default: all supported)"
14
- echo " -v: Jaeger version to use for hotrod image (v1 or v2, default: v1)"
15
14
exit 1
16
15
}
17
16
18
17
docker_compose_file=" ./examples/hotrod/docker-compose.yml"
19
18
platforms=" $( make echo-linux-platforms) "
20
19
current_platform=" $( go env GOOS) /$( go env GOARCH) "
21
- jaeger_version=" v1"
22
- binary=" all-in-one"
23
20
FLAGS=()
24
21
success=" false"
25
22
26
- while getopts " hlop:v: " opt; do
23
+ while getopts " hlop:" opt; do
27
24
case " ${opt} " in
28
25
l)
29
26
# in the local-only mode the images will only be pushed to local registry
@@ -35,30 +32,12 @@ while getopts "hlop:v:" opt; do
35
32
p)
36
33
platforms=${OPTARG}
37
34
;;
38
- v)
39
- jaeger_version=${OPTARG}
40
- ;;
41
35
* )
42
36
print_help
43
37
;;
44
38
esac
45
39
done
46
40
47
- case " $jaeger_version " in
48
- v1)
49
- docker_compose_file=" ./examples/hotrod/docker-compose.yml"
50
- binary=" all-in-one"
51
- ;;
52
- v2)
53
- docker_compose_file=" ./examples/hotrod/docker-compose-v2.yml"
54
- binary=" jaeger"
55
- ;;
56
- * )
57
- echo " Invalid Jaeger version provided: $jaeger_version "
58
- print_help
59
- ;;
60
- esac
61
-
62
41
set -x
63
42
64
43
dump_logs () {
94
73
# so we do not pass flags like -b and -t.
95
74
bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p " ${current_platform} "
96
75
97
- # Build all-in-one (for v1) or jaeger (for v2) image locally (-l) for integration test
98
- make build-${binary}
99
- bash scripts/build-upload-a-docker-image.sh -l -b -c " ${binary} " -d cmd/" ${binary} " -p " ${current_platform} " -t release
76
+ # Build all-in-one image locally (-l) for integration test
77
+ make build-all-in-one
78
+ bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one -d cmd/all-in-one -p " ${current_platform} " -t release
100
79
101
80
echo ' ::group:: docker compose'
102
81
JAEGER_VERSION=$GITHUB_SHA REGISTRY=" localhost:5000/" docker compose -f " $docker_compose_file " up -d
0 commit comments