add notify and we done
This commit is contained in:
parent
319e587f29
commit
d9b25c1063
@ -1,8 +1,8 @@
|
|||||||
.cic_notify_variables:
|
.cic_notify_variables:
|
||||||
variables:
|
variables:
|
||||||
APP_NAME: cic-notify
|
APP_NAME: cic-notify
|
||||||
DOCKERFILE_PATH: $APP_NAME/docker/Dockerfile
|
DOCKERFILE_PATH: docker/Dockerfile_ci
|
||||||
CONTEXT: apps/
|
CONTEXT: apps/$APP_NAME
|
||||||
|
|
||||||
build-mr-cic-notify:
|
build-mr-cic-notify:
|
||||||
extends:
|
extends:
|
||||||
@ -14,6 +14,31 @@ build-mr-cic-notify:
|
|||||||
- apps/cic-notify/**/*
|
- apps/cic-notify/**/*
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
test-mr-cic-notify:
|
||||||
|
stage: test
|
||||||
|
extends:
|
||||||
|
- .cic_notify_variables
|
||||||
|
cache:
|
||||||
|
key:
|
||||||
|
files:
|
||||||
|
- test_requirements.txt
|
||||||
|
paths:
|
||||||
|
- /root/.cache/pip
|
||||||
|
image: $MR_IMAGE_TAG
|
||||||
|
script:
|
||||||
|
- cd apps/$APP_NAME/
|
||||||
|
- >
|
||||||
|
pip install --extra-index-url https://pip.grassrootseconomics.net:8433
|
||||||
|
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple
|
||||||
|
-r test_requirements.txt
|
||||||
|
- export PYTHONPATH=. && pytest -x --cov=cic_notify --cov-fail-under=90 --cov-report term-missing tests
|
||||||
|
needs: ["build-mr-cic-notify"]
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
changes:
|
||||||
|
- apps/cic-eth/**/*
|
||||||
|
when: always
|
||||||
|
|
||||||
build-push-cic-notify:
|
build-push-cic-notify:
|
||||||
extends:
|
extends:
|
||||||
- .py_build_push
|
- .py_build_push
|
||||||
|
@ -1,38 +1,30 @@
|
|||||||
FROM python:3.8.6-slim-buster
|
# syntax = docker/dockerfile:1.2
|
||||||
|
FROM registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev-55da5f4e as dev
|
||||||
|
|
||||||
RUN apt-get update && \
|
#RUN pip install $pip_extra_index_url_flag cic-base[full_graph]==0.1.2a62
|
||||||
apt install -y gcc gnupg libpq-dev wget make g++ gnupg bash procps
|
|
||||||
|
|
||||||
WORKDIR /usr/src/cic-notify
|
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
|
||||||
|
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
ARG pip_extra_index_url_flag='--index https://pypi.org/simple --extra-index-url https://pip.grassrootseconomics.net:8433'
|
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
|
||||||
RUN pip install $pip_extra_index_url_flag cic-base[full_graph]==0.1.2a62
|
pip install --index-url https://pypi.org/simple \
|
||||||
|
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
|
||||||
|
-r requirements.txt
|
||||||
|
|
||||||
COPY cic-notify/setup.cfg \
|
COPY . .
|
||||||
cic-notify/setup.py \
|
|
||||||
./
|
|
||||||
|
|
||||||
COPY cic-notify/cic_notify/ ./cic_notify/
|
RUN python setup.py install
|
||||||
|
|
||||||
COPY cic-notify/requirements.txt \
|
# TODO please review..can this go into requirements?
|
||||||
cic-notify/test_requirements.txt \
|
|
||||||
./
|
|
||||||
|
|
||||||
COPY cic-notify/scripts/ scripts/
|
|
||||||
RUN pip install $pip_extra_index_url_flag .[africastalking,notifylog]
|
RUN pip install $pip_extra_index_url_flag .[africastalking,notifylog]
|
||||||
|
|
||||||
COPY cic-notify/tests/ tests/
|
COPY docker/*.sh .
|
||||||
COPY cic-notify/docker/db.sh \
|
|
||||||
cic-notify/docker/start_tasker.sh \
|
|
||||||
/root/
|
|
||||||
|
|
||||||
#RUN apk add postgresql-client
|
|
||||||
#RUN apk add bash
|
|
||||||
|
|
||||||
# ini files in config directory defines the configurable parameters for the application
|
# ini files in config directory defines the configurable parameters for the application
|
||||||
# they can all be overridden by environment variables
|
# they can all be overridden by environment variables
|
||||||
# to generate a list of environment variables from configuration, use: confini-dump -z <dir> (executable provided by confini package)
|
# to generate a list of environment variables from configuration, use: confini-dump -z <dir> (executable provided by confini package)
|
||||||
COPY cic-notify/.config/ /usr/local/etc/cic-notify/
|
COPY .config/ /usr/local/etc/cic-notify/
|
||||||
COPY cic-notify/cic_notify/db/migrations/ /usr/local/share/cic-notify/alembic/
|
COPY cic_notify/db/migrations/ /usr/local/share/cic-notify/alembic/
|
||||||
|
|
||||||
WORKDIR /root
|
ENTRYPOINT []
|
||||||
|
29
apps/cic-notify/docker/Dockerfile_ci
Normal file
29
apps/cic-notify/docker/Dockerfile_ci
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# syntax = docker/dockerfile:1.2
|
||||||
|
FROM registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev-55da5f4e as dev
|
||||||
|
|
||||||
|
#RUN pip install $pip_extra_index_url_flag cic-base[full_graph]==0.1.2a62
|
||||||
|
|
||||||
|
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
|
||||||
|
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
RUN pip install --index-url https://pypi.org/simple \
|
||||||
|
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
|
||||||
|
-r requirements.txt
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN python setup.py install
|
||||||
|
|
||||||
|
# TODO please review..can this go into requirements?
|
||||||
|
RUN pip install $pip_extra_index_url_flag .[africastalking,notifylog]
|
||||||
|
|
||||||
|
COPY docker/*.sh .
|
||||||
|
|
||||||
|
# ini files in config directory defines the configurable parameters for the application
|
||||||
|
# they can all be overridden by environment variables
|
||||||
|
# to generate a list of environment variables from configuration, use: confini-dump -z <dir> (executable provided by confini package)
|
||||||
|
COPY .config/ /usr/local/etc/cic-notify/
|
||||||
|
COPY cic_notify/db/migrations/ /usr/local/share/cic-notify/alembic/
|
||||||
|
|
||||||
|
ENTRYPOINT []
|
@ -403,8 +403,8 @@ services:
|
|||||||
|
|
||||||
cic-notify-tasker:
|
cic-notify-tasker:
|
||||||
build:
|
build:
|
||||||
context: apps/
|
context: apps/cic-notify
|
||||||
dockerfile: cic-notify/docker/Dockerfile
|
dockerfile: docker/Dockerfile
|
||||||
environment:
|
environment:
|
||||||
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
||||||
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
|
Loading…
Reference in New Issue
Block a user