This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/.gitlab-ci.yml

132 lines
3.5 KiB
YAML
Raw Normal View History

2018-11-26 21:44:00 +00:00
# Global Variables
before_script:
- "python3 -m pip install -U virtualenv"
- "virtualenv env"
- "source env/bin/activate"
2018-12-09 20:11:43 +00:00
- "pip3 install -U -r requirements-dev.txt"
2018-11-26 21:44:00 +00:00
stages:
- test
- build
- docs
image: python:3.5
2018-12-09 21:37:17 +00:00
include:
- /allauth/.gitlab-ci.yml
2018-11-26 21:44:00 +00:00
isort:
script:
- isort -c -sg env
stage: test
migrations:
script:
- python manage.py migrate
stage: test
prospector:
script:
- prospector
stage: test
pylint:
script:
- pylint passbook
stage: test
coverage:
script:
- coverage run manage.py test
- coverage report
stage: test
2018-12-09 16:44:54 +00:00
bandit:
script:
- bandit -r passbook
stage: test
2018-11-26 21:44:00 +00:00
2019-02-08 14:09:15 +00:00
package-docker:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- echo "{\"auths\":{\"https://docker.$NEXUS_URL/\":{\"username\":\"$NEXUS_USER\",\"password\":\"$NEXUS_PASS\"}}}" > /kaniko/.docker/config.json
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination docker.pkg.beryju.org/passbook:latest --destination docker.pkg.beryju.org/passbook:0.0.3-alpha
2019-02-08 14:09:15 +00:00
stage: build
only:
- tags
- /^version/.*$/
package-helm:
stage: build
script:
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
- helm package helm/passbook
- ./manage.py nexus_upload --method put --url $NEXUS_URL --user $NEXUS_USER --password $NEXUS_PASS --repo helm *.tgz
only:
- tags
- /^version/.*$/
2018-11-26 21:44:00 +00:00
# package-3.5:
# before_script:
# - apt update
# - apt install -y build-essential debhelper devscripts equivs python3 python3-pip
# - cp debian/control-3.5 debian/control
# - mk-build-deps debian/control
# - apt install ./*build-deps*deb -f -y
# - "python3 -m pip install -U virtualenv"
# - "virtualenv env"
# - "source env/bin/activate"
# - "pip3 install -U -r requirements.txt -r requirements-dev.txt"
# image: debian
# script:
# - debuild -us -uc
# - cp ../passbook*.deb .
# - python manage.py nexus_upload
# artifacts:
# paths:
# - passbook-python3.5*deb
# expire_in: 2 days
# stage: build
# only:
# - tags
# - /^debian/.*$/
# package-3.6:
# before_script:
# - apt update
# - apt install -y build-essential debhelper devscripts equivs python3 python3-pip
# - cp debian/control-3.6 debian/control
# - mk-build-deps debian/control
# - apt install ./*build-deps*deb -f -y
# - "python3 -m pip install -U virtualenv"
# - "virtualenv env"
# - "source env/bin/activate"
# - "pip3 install -U -r requirements.txt -r requirements-dev.txt"
# image: debian:buster
# script:
# - debuild -us -uc
# - cp ../passbook*.deb .
# - python manage.py nexus_upload
# artifacts:
# paths:
# - passbook-python3.6*deb
# expire_in: 2 days
# stage: build
# only:
# - tags
# - /^debian/.*$r
# docs:
# stage: docs
# only:
# - master
# - tags
# - /^debian/.*$/
# environment:
# name: docs
# url: "https://passbook.beryju.org/docs/"
# script:
# - apt update
# - apt install -y rsync
# - "mkdir ~/.ssh"
# - "cp .gitlab/known_hosts ~/.ssh/"
# - "pip3 install -U -r requirements-docs.txt"
# - "eval $(ssh-agent -s)"
# - "echo \"${CI_SSH_PRIVATE}\" | ssh-add -"
# - mkdocs build
# - 'rsync -avh --delete web/* "beryjuorg@ory1-web-prod-1.ory1.beryju.org:passbook.beryju.org/"'
# - 'rsync -avh --delete site/* "beryjuorg@ory1-web-prod-1.ory1.beryju.org:passbook.beryju.org/docs/"'