Add Docker command scripts
This commit is contained in:
11
run-test
Executable file
11
run-test
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NPM_COMMAND="npm run test:integ"
|
||||
CONTAINER_NAME=$(docker container ls --all --filter=ancestor=btroops --format "{{.Names}}")
|
||||
|
||||
if [[ -z "${CONTAINER_NAME}" ]]
|
||||
then
|
||||
docker run --rm -it -v $PWD:/usr/src/app btroops $NPM_COMMAND
|
||||
else
|
||||
docker exec -it $CONTAINER_NAME $NPM_COMMAND
|
||||
fi
|
||||
Reference in New Issue
Block a user