-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25c7c71
commit da380e1
Showing
460 changed files
with
82,791 additions
and
21,926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ignore hidden files | ||
.* | ||
# except .babelrc, needed to build bundles-*.js by webpack | ||
!.babelrc | ||
|
||
*.egg-info | ||
**/__pycache__ | ||
Dockerfile | ||
Jenkinsfile | ||
Makefile | ||
tox.ini | ||
deploy | ||
data | ||
test | ||
debian | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,15 @@ | ||
image: python:latest | ||
|
||
stages: | ||
- deps | ||
- lint | ||
- test | ||
- qa | ||
|
||
cache: | ||
paths: | ||
- node_modules/ | ||
|
||
# see test/pgfixtures.py that needs these variables | ||
variables: | ||
POSTGRES_HOST: localhost | ||
POSTGRES_PORT: 5432 | ||
POSTGRES_USER: siaftest | ||
POSTGRES_PASSWORD: siaftest | ||
|
||
flake8: | ||
stage: lint | ||
before_script: | ||
- pip install tox | ||
script: tox -e flake8 | ||
allow_failure: true | ||
black: | ||
stage: lint | ||
before_script: | ||
- pip install tox | ||
script: tox -e black | ||
allow_failure: true | ||
dodgy: | ||
stage: lint | ||
before_script: | ||
- pip install tox | ||
script: tox -e dodgy | ||
allow_failure: true | ||
check-manifest: | ||
stage: lint | ||
before_script: | ||
- pip install tox | ||
script: tox -e check-manifest | ||
allow_failure: true | ||
|
||
py3: | ||
stage: test | ||
image: python | ||
before_script: | ||
# TODO - move this to an image | ||
- apt update && apt -y install ruby-sass python3-dev npm poppler-utils | ||
- pip install tox | ||
services: | ||
- name: dvainrub/postgres-plpython | ||
- name: docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.1 | ||
alias: elasticsearch | ||
command: ['bin/elasticsearch', '-Ediscovery.type=single-node'] | ||
script: | ||
- tox -e py37-gitlab-ci | ||
|
||
sonarqube: | ||
stage: qa | ||
image: newtmitch/sonar-scanner | ||
only: | ||
- branch/default | ||
script: | ||
- apt install -y python-setuptools | ||
- sonar-scanner | ||
--define sonar.scm.revision=${CI_COMMIT_REF_NAME##*/} | ||
--define sonar.projectBaseDir=. | ||
--define sonar.projectVersion=`python setup.py --version` | ||
--define sonar.scm.provider=hg | ||
--define sonar.host.url=${SONAR_URL} | ||
|
||
js-deps: | ||
stage: deps | ||
image: node:latest | ||
script: | ||
- npm install | ||
artifacts: | ||
paths: | ||
- node_modules/ | ||
|
||
js-format: | ||
stage: lint | ||
image: node:latest | ||
script: | ||
- npm run format | ||
|
||
js-lint: | ||
stage: lint | ||
image: node:latest | ||
script: | ||
- npm run lint | ||
|
||
js-build: | ||
stage: test | ||
image: node:latest | ||
script: | ||
- npm run build | ||
include: | ||
- project: francearchives/infra | ||
file: gitlab-ci/gitlab-ci.yml | ||
- project: francearchives/infra | ||
file: gitlab-ci/gitlab-ci-consultation.yml | ||
|
||
trigger-cms: | ||
stage: livraisoncontinue | ||
only: | ||
- branch/integration | ||
trigger: | ||
project: francearchives/cubicweb-frarchives-edition | ||
branch: branch/integration | ||
strategy: depend | ||
allow_failure: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends: default | ||
|
||
rules: | ||
# 80 chars should be enough, but don't fail if a line is longer | ||
line-length: | ||
max: 100 | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM python:3.9-alpine AS temp | ||
RUN apk --no-cache add npm | ||
RUN npm install -g sass | ||
COPY . . | ||
|
||
RUN npm ci | ||
ENV NODE_ENV="production" | ||
RUN npm run build | ||
RUN sass scss/main.scss:cubicweb_francearchives/data/css/francearchives.bundle.css | ||
RUN python setup.py sdist | ||
|
||
FROM logilab/cubicweb-base:bullseye-1.0@sha256:39e0c229d6fff2a96f17451587dd93022bfead40763267448ad17d53383ad671 | ||
USER root | ||
RUN apt update && apt -y --no-install-recommends install \ | ||
screen \ | ||
curl \ | ||
poppler-utils \ | ||
procps \ | ||
wget \ | ||
gnupg \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# XXX restart worker after a number of requests (prevent memory leak) | ||
# TODO remove when https://forge.extranet.logilab.fr/cubicweb/docker-cubicweb/-/issues/8 is fixed | ||
RUN echo "max-requests = 128000" >> /etc/uwsgi/uwsgi.ini | ||
# enable stats socket used by uwsgi prometheus exporter | ||
RUN echo "memory-report = true" >> /etc/uwsgi/uwsgi.ini | ||
RUN echo "stats = 127.0.0.1:8001" >> /etc/uwsgi/uwsgi.ini | ||
USER cubicweb | ||
COPY --from=temp dist/cubicweb-francearchives-*.tar.gz . | ||
COPY ./requirements.txt /requirements.txt | ||
RUN pip install --no-cache-dir -r /requirements.txt | ||
RUN pip install cubicweb-francearchives-*.tar.gz | ||
RUN pip install pyramid-session-redis | ||
ENV CUBE=francearchives | ||
ENV CW_DB_NAME=${CUBE} | ||
RUN docker-cubicweb-helper create-instance | ||
USER root | ||
RUN rm /requirements.txt | ||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list | ||
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - | ||
RUN apt-get update | ||
RUN apt-get remove -y postgresql-client | ||
RUN apt-get install -y postgresql-client-12 | ||
USER cubicweb |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version = $(shell hg log -r . -T "{sub(':.*', '', '{latesttag}')}{sub('^-0-.*', '', '-{latesttagdistance}-hg{shortest(node, 7)}')}\n") | ||
tag-version = $(REGISTRY):$(version) | ||
tag-latest = $(REGISTRY):latest | ||
|
||
all: build | ||
|
||
build: | ||
docker build --pull -t $(tag-version) . | ||
|
||
build-nocache: | ||
docker build --pull --no-cache -t $(tag-version) . | ||
|
||
push: | ||
docker push $(tag-version) | ||
docker tag $(tag-version) $(tag-latest) | ||
docker push $(tag-latest) |
Oops, something went wrong.