adjust versions for client packages, auto build client-packages
This commit is contained in:
parent
c621e61978
commit
e6571826cb
|
@ -10,11 +10,15 @@ tag_name = version/{new_version}
|
||||||
[bumpversion:part:release]
|
[bumpversion:part:release]
|
||||||
optional_value = stable
|
optional_value = stable
|
||||||
first_value = beta
|
first_value = beta
|
||||||
values =
|
values =
|
||||||
alpha
|
alpha
|
||||||
beta
|
beta
|
||||||
stable
|
stable
|
||||||
|
|
||||||
|
[bumpversion:file:client-packages/allauth/setup.py]
|
||||||
|
|
||||||
|
[bumpversion:file:client-packages/sentry-auth-passbook/setup.py]
|
||||||
|
|
||||||
[bumpversion:file:helm/passbook/values.yaml]
|
[bumpversion:file:helm/passbook/values.yaml]
|
||||||
|
|
||||||
[bumpversion:file:helm/passbook/Chart.yaml]
|
[bumpversion:file:helm/passbook/Chart.yaml]
|
||||||
|
|
176
.gitlab-ci.yml
176
.gitlab-ci.yml
|
@ -1,98 +1,124 @@
|
||||||
# Global Variables
|
# Global Variables
|
||||||
before_script:
|
before_script:
|
||||||
- "python3 -m pip install -U virtualenv"
|
- "python3 -m pip install -U virtualenv"
|
||||||
- "virtualenv env"
|
- "virtualenv env"
|
||||||
- "source env/bin/activate"
|
- "source env/bin/activate"
|
||||||
- "pip3 install -U -r requirements-dev.txt"
|
- "pip3 install -U -r requirements-dev.txt"
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- docs
|
- docs
|
||||||
- deploy
|
- deploy
|
||||||
image: python:3.6
|
image: python:3.6
|
||||||
services:
|
services:
|
||||||
- postgres:latest
|
- postgres:latest
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
POSTGRES_DB: passbook
|
POSTGRES_DB: passbook
|
||||||
POSTGRES_USER: passbook
|
POSTGRES_USER: passbook
|
||||||
POSTGRES_PASSWORD: 'EK-5jnKfjrGRm<77'
|
POSTGRES_PASSWORD: "EK-5jnKfjrGRm<77"
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- /client-packages/allauth/.gitlab-ci.yml
|
- /client-packages/allauth/.gitlab-ci.yml
|
||||||
|
|
||||||
isort:
|
isort:
|
||||||
script:
|
script:
|
||||||
- isort -c -sg env
|
- isort -c -sg env
|
||||||
stage: test
|
stage: test
|
||||||
migrations:
|
migrations:
|
||||||
script:
|
script:
|
||||||
- python manage.py migrate
|
- python manage.py migrate
|
||||||
stage: test
|
stage: test
|
||||||
prospector:
|
prospector:
|
||||||
script:
|
script:
|
||||||
- prospector
|
- prospector
|
||||||
stage: test
|
stage: test
|
||||||
pylint:
|
pylint:
|
||||||
script:
|
script:
|
||||||
- pylint passbook
|
- pylint passbook
|
||||||
stage: test
|
stage: test
|
||||||
coverage:
|
coverage:
|
||||||
script:
|
script:
|
||||||
- coverage run manage.py test
|
- coverage run manage.py test
|
||||||
- coverage report
|
- coverage report
|
||||||
stage: test
|
stage: test
|
||||||
bandit:
|
bandit:
|
||||||
script:
|
script:
|
||||||
- bandit -r passbook
|
- bandit -r passbook
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
package-docker:
|
package-docker:
|
||||||
image:
|
image:
|
||||||
name: gcr.io/kaniko-project/executor:debug
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
before_script:
|
before_script:
|
||||||
- echo "{\"auths\":{\"docker.$NEXUS_URL\":{\"auth\":\"$NEXUS_AUTH\"}}}" > /kaniko/.docker/config.json
|
- echo "{\"auths\":{\"docker.$NEXUS_URL\":{\"auth\":\"$NEXUS_AUTH\"}}}" > /kaniko/.docker/config.json
|
||||||
script:
|
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.1.17-beta
|
- /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.1.17-beta
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- /^version/.*$/
|
- /^version/.*$/
|
||||||
package-helm:
|
package-helm:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
|
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
|
||||||
- helm init --client-only
|
- helm init --client-only
|
||||||
- helm package helm/passbook
|
- helm package helm/passbook
|
||||||
- ./manage.py nexus_upload --method put --url $NEXUS_URL --auth $NEXUS_AUTH --repo helm *.tgz
|
- ./manage.py nexus_upload --method put --url $NEXUS_URL --auth $NEXUS_AUTH --repo helm *.tgz
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- /^version/.*$/
|
- /^version/.*$/
|
||||||
package-debian:
|
package-debian:
|
||||||
before_script:
|
before_script:
|
||||||
- apt update
|
- apt update
|
||||||
- apt install -y --no-install-recommends build-essential debhelper devscripts equivs python3 python3-dev python3-pip libsasl2-dev libldap2-dev
|
- apt install -y --no-install-recommends build-essential debhelper devscripts equivs python3 python3-dev python3-pip libsasl2-dev libldap2-dev
|
||||||
- mk-build-deps debian/control
|
- mk-build-deps debian/control
|
||||||
- apt install ./*build-deps*deb -f -y
|
- apt install ./*build-deps*deb -f -y
|
||||||
- python3 -m pip install -U virtualenv pip
|
- python3 -m pip install -U virtualenv pip
|
||||||
- virtualenv env
|
- virtualenv env
|
||||||
- source env/bin/activate
|
- source env/bin/activate
|
||||||
- pip3 install -U -r requirements.txt -r requirements-dev.txt
|
- pip3 install -U -r requirements.txt -r requirements-dev.txt
|
||||||
- ./manage.py collectstatic --no-input
|
- ./manage.py collectstatic --no-input
|
||||||
image: ubuntu:18.04
|
image: ubuntu:18.04
|
||||||
script:
|
script:
|
||||||
- debuild -us -uc
|
- debuild -us -uc
|
||||||
- cp ../passbook*.deb .
|
- cp ../passbook*.deb .
|
||||||
- ./manage.py nexus_upload --method post --url $NEXUS_URL --auth $NEXUS_AUTH --repo apt passbook*deb
|
- ./manage.py nexus_upload --method post --url $NEXUS_URL --auth $NEXUS_AUTH --repo apt passbook*deb
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- passbook*deb
|
- passbook*deb
|
||||||
expire_in: 2 days
|
expire_in: 2 days
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- /^version/.*$/
|
- /^version/.*$/
|
||||||
|
|
||||||
|
package-client-package-allauth:
|
||||||
|
script:
|
||||||
|
- cd client-packages/allauth
|
||||||
|
- python setup.py sdist
|
||||||
|
- twine upload --username $TWINE_USERNAME --password $TWINE_PASSWORD dist/*
|
||||||
|
stage: build
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- tags
|
||||||
|
- /^version/.*$/
|
||||||
|
changes:
|
||||||
|
- client-packages/allauth/**
|
||||||
|
|
||||||
|
package-client-package-sentry:
|
||||||
|
script:
|
||||||
|
- cd client-packages/sentry-auth-passbook
|
||||||
|
- python setup.py sdist
|
||||||
|
- twine upload --username $TWINE_USERNAME --password $TWINE_PASSWORD dist/*
|
||||||
|
stage: build
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- tags
|
||||||
|
- /^version/.*$/
|
||||||
|
changes:
|
||||||
|
- client-packages/sentry-auth-passbook/**
|
||||||
|
|
||||||
# docs:
|
# docs:
|
||||||
# stage: docs
|
# stage: docs
|
||||||
|
|
|
@ -7,6 +7,7 @@ ignore-paths:
|
||||||
- migrations
|
- migrations
|
||||||
- docs
|
- docs
|
||||||
- node_modules
|
- node_modules
|
||||||
|
- client-packages
|
||||||
|
|
||||||
uses:
|
uses:
|
||||||
- django
|
- django
|
||||||
|
|
|
@ -3,7 +3,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='django-allauth-passbook',
|
name='django-allauth-passbook',
|
||||||
version='1.0.0',
|
version='0.1.17-beta',
|
||||||
description='passbook support for django-allauth',
|
description='passbook support for django-allauth',
|
||||||
# long_description='\n'.join(read_simple('docs/index.md')[2:]),
|
# long_description='\n'.join(read_simple('docs/index.md')[2:]),
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|
|
@ -18,7 +18,7 @@ tests_require = [
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='sentry-auth-passbook',
|
name='sentry-auth-passbook',
|
||||||
version='1.0.0',
|
version='0.1.17-beta',
|
||||||
author='BeryJu.org',
|
author='BeryJu.org',
|
||||||
author_email='support@beryju.org',
|
author_email='support@beryju.org',
|
||||||
url='https://passbook.beryju.org',
|
url='https://passbook.beryju.org',
|
||||||
|
|
|
@ -13,3 +13,4 @@ unittest-xml-reporting
|
||||||
autopep8
|
autopep8
|
||||||
bandit
|
bandit
|
||||||
bumpversion
|
bumpversion
|
||||||
|
twine
|
||||||
|
|
Reference in a new issue