Skip to content
Snippets Groups Projects
Verified Commit a41ee682 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'master' into 276-fix-notification-system

parents 9dbfe3c6 99707723
No related branches found
No related tags found
1 merge request!280Resolve "Fix notification system"
Pipeline #2299 passed
image: registry.edugit.org/teckids/team-sysadmin/docker-images/python-pimped:master
stages:
- test
- build
- deploy
include:
- local: "/ci/test.yml"
- local: "/ci/build_dist.yml"
- local: "/ci/build_docker.yml"
- local: "/ci/deploy.yml"
variables:
GIT_SUBMODULE_STRATEGY: recursive
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
......@@ -18,105 +22,3 @@ cache:
paths:
- .cache/pip
- .tox
test:
stage: test
services:
- name: selenium/standalone-firefox
alias: selenium
before_script:
- adduser --disabled-password --gecos "Test User" testuser
- chown -R testuser .
script:
- sudo apt update
- sudo apt install python3-ldap libldap2-dev libssl-dev libsasl2-dev python3.7-dev -y
- sudo -u testuser
env TEST_SELENIUM_HUB=http://selenium:4444/wd/hub
TEST_SELENIUM_BROWSERS=firefox
TEST_HOST=build
tox -e selenium -- --junitxml=.tox/junit.xml
artifacts:
paths:
- .tox/screenshots
reports:
junit: .tox/junit.xml
lint:
stage: test
script:
- tox -e lint,security
build_dist:
stage: build
script:
- tox -e build
artifacts:
paths:
- dist/
pages:
stage: deploy
before_script:
- cp -r .tox/screenshots/firefox docs/screenshots
script:
- export LC_ALL=en_GB.utf8
- tox -e docs -- BUILDDIR=../public/docs
artifacts:
paths:
- public/
only:
- master
build_docker:
stage: build
image:
name: gcr.io/kaniko-project/executor:v0.22.0
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" >/kaniko/.docker/config.json
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
--cache=true
--cleanup
- /kaniko/executor
--context $CI_PROJECT_DIR/docker/nginx
--dockerfile $CI_PROJECT_DIR/docker/nginx/Dockerfile
--destination $CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_NAME
--cache=true
--cleanup
only:
- master
- tags
deploy_demo-master:
stage: deploy
environment:
name: demo/master
url: http://demo-master.aleksis.org
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- grep -v "build:" docker-compose.yml | ssh root@demo-master.aleksis.org
env ALEKSIS_IMAGE_TAG=${CI_COMMIT_REF_NAME}
docker-compose
-p aleksis-${CI_ENVIRONMENT_SLUG}
-f /dev/stdin
pull
- grep -v "build:" docker-compose.yml | ssh root@demo-master.aleksis.org
env ALEKSIS_IMAGE_TAG=${CI_COMMIT_REF_NAME}
NGINX_HTTP_PORT=80
ALEKSIS_maintenance__debug=true
docker-compose
-p aleksis-${CI_ENVIRONMENT_SLUG}
-f /dev/stdin
up -d
only:
- master
build_dist:
stage: build
script:
- tox -e build
artifacts:
paths:
- dist/
image: registry.edugit.org/teckids/team-sysadmin/docker-images/python-pimped:master
build_docker:
stage: build
image:
name: gcr.io/kaniko-project/executor:v0.22.0
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" >/kaniko/.docker/config.json
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
--cache=true
--cleanup
- /kaniko/executor
--context $CI_PROJECT_DIR/docker/nginx
--dockerfile $CI_PROJECT_DIR/docker/nginx/Dockerfile
--destination $CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_NAME
--cache=true
--cleanup
only:
- master
- tags
pages:
stage: deploy
before_script:
- cp -r .tox/screenshots/firefox docs/screenshots
script:
- export LC_ALL=en_GB.utf8
- tox -e docs -- BUILDDIR=../public/docs
artifacts:
paths:
- public/
only:
- master
deploy_demo-master:
stage: deploy
environment:
name: demo/master
url: http://demo-master.aleksis.org
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- grep -v "build:" docker-compose.yml | ssh root@demo-master.aleksis.org
env ALEKSIS_IMAGE_TAG=${CI_COMMIT_REF_NAME}
docker-compose
-p aleksis-${CI_ENVIRONMENT_SLUG}
-f /dev/stdin
pull
- grep -v "build:" docker-compose.yml | ssh root@demo-master.aleksis.org
env ALEKSIS_IMAGE_TAG=${CI_COMMIT_REF_NAME}
NGINX_HTTP_PORT=80
ALEKSIS_maintenance__debug=true
docker-compose
-p aleksis-${CI_ENVIRONMENT_SLUG}
-f /dev/stdin
up -d
only:
- master
test:
stage: test
services:
- name: selenium/standalone-firefox
alias: selenium
before_script:
- adduser --disabled-password --gecos "Test User" testuser
- chown -R testuser .
script:
- sudo apt update
- sudo apt install python3-ldap libldap2-dev libssl-dev libsasl2-dev python3.7-dev -y
- sudo -u testuser
env TEST_SELENIUM_HUB=http://selenium:4444/wd/hub
TEST_SELENIUM_BROWSERS=firefox
TEST_HOST=build
tox -e selenium -- --junitxml=.tox/junit.xml
artifacts:
paths:
- .tox/screenshots
reports:
junit: .tox/junit.xml
lint:
stage: test
script:
- tox -e lint,security
This diff is collapsed.
......@@ -79,7 +79,7 @@ django-guardian = "^2.2.0"
rules = "^2.2"
django-cache-memoize = "^0.1.6"
django-haystack = {version="3.0b1", allow-prereleases = true}
celery-haystack = {version="^0.7.0", optional=true}
celery-haystack = {version="^0.10.0", optional=true}
django-dbbackup = "^3.3.0"
spdx-license-list = "^0.4.0"
license-expression = "^1.2"
......
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