Skip to content
Snippets Groups Projects
Verified Commit 237e5514 authored by Martin Weise's avatar Martin Weise
Browse files

Build pipeline

parent ed948ae9
No related branches found
No related tags found
No related merge requests found
...@@ -583,7 +583,7 @@ release-libs: ...@@ -583,7 +583,7 @@ release-libs:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
only: only:
refs: refs:
- /^release-[0-9]+.*/ - /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile"
script: script:
...@@ -591,8 +591,5 @@ release-libs: ...@@ -591,8 +591,5 @@ release-libs:
- pip install pipenv - pip install pipenv
- pipenv install gunicorn && pipenv install --dev --system --deploy - pipenv install gunicorn && pipenv install --dev --system --deploy
- pip install twine build - pip install twine build
- 'sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" ./lib/python/pyproject.toml ./lib/python/setup.py ./lib/python/README.md' - ./lib/python/package.sh
- python -m build --sdist ./lib/python - ./lib/python/release.sh
- python -m build --wheel ./lib/python \ No newline at end of file
- cat ${CI_PIPYRC} | base64 -d > .pypirc
- python -m twine upload --config-file .pypirc --verbose --repository pypi ./lib/python/dist/dbrepo-*
\ No newline at end of file
#!/bin/bash
mvn -f ./dbrepo-metadata-service/pom.xml clean install -DskipTests
# test java services
mvn -f ./dbrepo-metadata-service/pom.xml clean test verify
mvn -f ./dbrepo-data-service/pom.xml clean test verify
# test python services
bash ./dbrepo-analyse-service/test.sh
bash ./dbrepo-search-service/test.sh
# test ui
yarn --cwd ./dbrepo-ui install
yarn --cwd ./dbrepo-ui run test:unit
yarn --cwd ./dbrepo-ui run coverage
\ No newline at end of file
all:
clean:
rm -rf ./python/dist/* ./docs/build/* ./dist/*
install:
pipenv install
docs: clean
sphinx-apidoc -o ./docs/source ./dbrepo
sphinx-build -M html ./docs/ ./docs/build/
check:
python3 ./python/setup.py develop
build: clean
python3 -m build --sdist .
python3 -m build --wheel .
deploy: build
python3 -m twine upload --config-file ~/.pypirc --verbose --repository pypi ./dist/dbrepo-*
deploy-test: build
python3 -m twine upload --config-file ~/.pypirc --verbose --repository testpypi ./dist/dbrepo-*
FORCE: ;
\ No newline at end of file
#!/bin/bash
# needed for MariaDB Connector/C
apt update && apt install -y curl gcc libmariadb3 libmariadb-dev
python3 -m venv ./lib/python/venv
source ./lib/python/venv/bin/activate
PIPENV_PIPFILE=./lib/python/Pipfile pipenv install --dev
\ No newline at end of file
#!/bin/bash
PRE_RELEASE=""
if [ "${CI_COMMIT_BRANCH:8:8}" = "master" ]; then
PRE_RELEASE="rc${CI_PIPELINE_ID}"
fi
sed -i -e "s/__APPVERSION__/${APP_VERSION}${PRE_RELEASE}/g" ./lib/python/pyproject.toml ./lib/python/setup.py ./lib/python/README.md
python -m build --sdist ./lib/python
python -m build --wheel ./lib/python
#!/bin/bash
cat ${CI_PIPYRC} | base64 -d > .pypirc
python -m twine upload --config-file .pypirc --verbose --repository pypi ./lib/python/dist/dbrepo-*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment