Skip to content
Snippets Groups Projects
Commit 58111bcc authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

test image with docker compose

 * check that it starts
 * check the log dir is writable
parent b523f9db
No related branches found
No related tags found
1 merge request!7test image with docker compose
Pipeline #133615 failed
...@@ -30,6 +30,38 @@ build: ...@@ -30,6 +30,38 @@ build:
test-with-compose:
needs: [ "build"]
rules:
- if: $CI_COMMIT_BRANCH != "base-common"
variables:
CURL_ERR: "0"
before_script:
- i=0; while [ "$i" -lt 60 ]; do docker info && break; sleep 1; i=$(( i + 1 )) ; done
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
script:
- apk add --no-cache curl
- docker compose build
- docker compose up -d
- docker ps
- curl --retry-all-errors --retry 10 --retry-delay 1 -s -o /dev/null 0.0.0.0:3838 || CURL_ERR=1
- |
if [ ${CURL_ERR} == "1" ]; then
docker compose logs
exit 2
fi
# trying to create a log file
- docker exec $(basename $(pwd))-shiny-k8s-toolkit-1 touch /var/log/shiny-server/foo
- |
if [ -e logs/foo ]; then
echo "flag file created"
else
echo "cannot write in log dir with compose"
exit 3
fi
.deploy: .deploy:
rules: rules:
- if: $CI_COMMIT_BRANCH != "base-common" - if: $CI_COMMIT_BRANCH != "base-common"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment