-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2909 Remove checkout step from verify-compose and enable speci…
…fying path to postman tests (#787) Co-authored-by: Giovanni Toraldo <[email protected]>
- Loading branch information
Showing
3 changed files
with
15 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 4 additions & 25 deletions
29
.github/actions/dbp-charts/verify-compose/docker_compose.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,15 @@ | ||
#!/bin/bash -e | ||
|
||
COMPOSE_FILE=$(basename $COMPOSE_FILE_PATH) | ||
COMPOSE_PATH=$(dirname $COMPOSE_FILE_PATH) | ||
COMPOSE_BIN="docker compose" | ||
alf_port=8080 | ||
|
||
dump_all_compose_logs() { | ||
echo "Dumping logs for all containers" | ||
$COMPOSE_BIN -f "${COMPOSE_FILE}" logs --no-color | ||
exit 1 | ||
} | ||
|
||
cd "$COMPOSE_PATH" || { | ||
echo "Error: docker compose dir not found" | ||
exit 1 | ||
} | ||
docker info | ||
$COMPOSE_BIN version | ||
$COMPOSE_BIN -f "${COMPOSE_FILE}" config | ||
echo "Starting Alfresco in docker compose" | ||
$COMPOSE_BIN -f "${COMPOSE_FILE}" ps | ||
$COMPOSE_BIN -f "${COMPOSE_FILE_PATH}" ps | ||
if [ "$COMPOSE_PULL" = "true" ]; then | ||
$COMPOSE_BIN -f "${COMPOSE_FILE}" pull --quiet | ||
$COMPOSE_BIN -f "${COMPOSE_FILE_PATH}" pull --quiet | ||
fi | ||
export COMPOSE_HTTP_TIMEOUT=120 | ||
$COMPOSE_BIN -f "${COMPOSE_FILE}" up -d --quiet-pull --wait | ||
$COMPOSE_BIN -f "${COMPOSE_FILE_PATH}" up -d --quiet-pull --wait | ||
|
||
echo "All services are up and running... starting postman tests" | ||
|
||
cd .. | ||
docker run -a STDOUT --volume "${PWD}"/test/postman/docker-compose:/etc/newman --network host postman/newman:5.3 run "acs-test-docker-compose-collection.json" --global-var "protocol=http" --global-var "url=localhost:8080" | ||
|
||
retVal=$? | ||
|
||
[ "${retVal}" -eq 0 ] && echo "Postman tests were successful" || dump_all_compose_logs | ||
docker run -a STDOUT --volume "$(realpath "${POSTMAN_PATH}"):/etc/newman" --network host postman/newman:5.3 run "${POSTMAN_JSON}" --global-var "protocol=http" --global-var "url=localhost:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v8.0.0 | ||
v8.1.0 |