corrected tester.sh

This commit is contained in:
Andreas Balogh
2021-02-11 18:39:11 +01:00
parent b7e0207de8
commit 7f7458f7d8
3 changed files with 10 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ build_flask:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $IMAGE_TAG
build_api:
build_tester:
stage: build
tags:
- shell
@@ -35,6 +35,7 @@ build_api:
- echo "Build api image"
- export
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26785
unit_test:
stage: test
services:
@@ -42,7 +43,9 @@ unit_test:
alias: zeo
- name: $CI_REGISTRY_IMAGE/webui:$CI_COMMIT_REF_SLUG
alias: webui
image: ubuntu:20.04
image:
name: $CI_REGISTRY_IMAGE/webui:$CI_COMMIT_REF_SLUG
entrypoint: ["tester.sh"]
tags:
- docker
- ubuntu
@@ -50,6 +53,5 @@ unit_test:
paths:
- var/
script:
- apt-get install -y wget
- mkdir var
- wget webui:5000 -o var/index.html

View File

@@ -1,11 +1,13 @@
FROM python:3.9-slim
RUN apt-get update && apt-get install -y \
gcc \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN pip install ZEO==5.2.1
RUN pip install flask
WORKDIR /flaskr
COPY . .
RUN chmod +x /tester.sh
RUN chmod +x /run.sh
ENV FLASK_APP=flaskr/zeo_db
EXPOSE 5000
CMD python3 -m flask run --host=0.0.0.0

2
src/webui/tester.sh Normal file
View File

@@ -0,0 +1,2 @@
mkdir var
wget webui:5000 -o var/index.html