forked from qa-guru/niffler
-
Notifications
You must be signed in to change notification settings - Fork 29
/
docker-compose-e2e.sh
37 lines (29 loc) · 1.13 KB
/
docker-compose-e2e.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
source ./niffler-e-2-e-tests/docker.properties
echo '### Java version ###'
java --version
echo '### Gradle version ###'
gradle --version
docker-compose -f docker-compose.test.yml down
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi -f $(docker images | grep 'niffler')
ARCH=$(uname -m)
bash ./gradlew clean build dockerTagLatest -x :niffler-e-2-e-tests:test
var DOCKER_ARCH
if [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then
DOCKER_ARCH="linux/arm64/v8"
docker build --build-arg DOCKER=arm64v8/eclipse-temurin:19-jdk -t "${IMAGE_NAME}":"${VERSION}" -t "${IMAGE_NAME}":latest -f ./niffler-e-2-e-tests/Dockerfile .
else
DOCKER_ARCH="linux/amd64"
docker build --build-arg DOCKER=eclipse-temurin:19-jdk -t "${IMAGE_NAME}":"${VERSION}" -t "${IMAGE_NAME}":latest -f ./niffler-e-2-e-tests/Dockerfile .
fi
var front
if [[ "$1" = "gql" ]]; then front="./niffler-frontend-gql/"; else front="./niffler-frontend/"; fi
cd "$front" || exit
bash ./docker-build.sh test
cd ../ || exit
docker pull selenoid/vnc_chrome:110.0
docker images
ARCH="$DOCKER_ARCH" docker-compose -f docker-compose.test.yml up -d
docker ps -a