21 lines
339 B
Bash
21 lines
339 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
echo "prebuiliding docker image"
|
||
|
|
||
|
cuddle_cli x build_release
|
||
|
|
||
|
echo "running docker image"
|
||
|
|
||
|
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
|
||
|
|
||
|
container_id=$(docker run -d "$tag")
|
||
|
|
||
|
sleep 5s
|
||
|
|
||
|
docker logs "$container_id"
|
||
|
|
||
|
echo "removing image"
|
||
|
docker stop "$container_id" > /dev/null && docker rm "$container_id" > /dev/null
|