This commit is contained in:
parent
383e906102
commit
203a81573d
@ -20,20 +20,23 @@ steps:
|
||||
ACR_PASSWORD:
|
||||
from_secret: acr_password
|
||||
commands:
|
||||
- export DOCKER_IMAGE=marcin00.azurecr.io/user-microservice:$CI_COMMIT_SHA
|
||||
- dockerd-entrypoint.sh &
|
||||
- sleep 3 # czas na uruchomienie usługi Docker
|
||||
|
||||
- DOCKER_IMAGE=marcin00.azurecr.io/user-microservice:$CI_COMMIT_SHA
|
||||
|
||||
- echo "===> Building Docker image"
|
||||
- docker build -t $DOCKER_IMAGE .
|
||||
|
||||
- echo "===> Installing bash"
|
||||
- apk add --no-cache curl bash
|
||||
- apk add --no-cache bash
|
||||
|
||||
- echo "===> Installing goss"
|
||||
- curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o goss
|
||||
- wget https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -O goss
|
||||
- chmod +x goss
|
||||
|
||||
- echo "===> Starting container for test"
|
||||
- "CONTAINER_ID=$(docker run -d -e SQLALCHEMY_DATABASE_URI=sqlite:///:memory: $DOCKER_IMAGE)"
|
||||
- "CONTAINER_ID=$(docker run --rm -d -e SQLALCHEMY_DATABASE_URI=sqlite:///:memory: $DOCKER_IMAGE)"
|
||||
- sleep 3 # czas na uruchomienie
|
||||
|
||||
- echo "===> Copying goss.yaml to container"
|
||||
@ -44,7 +47,6 @@ steps:
|
||||
|
||||
- echo "===> Cleaning up test container"
|
||||
- docker stop $CONTAINER_ID
|
||||
- docker rm $CONTAINER_ID
|
||||
|
||||
- echo "===> Logging in to ACR"
|
||||
- echo "$ACR_PASSWORD" | docker login marcin00.azurecr.io -u $ACR_USERNAME --password-stdin
|
||||
|
Loading…
x
Reference in New Issue
Block a user