51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
stages:
|
|
- init
|
|
- build
|
|
- store
|
|
|
|
include:
|
|
- project: 'kt_asu_gis/infrastructure/easo-infra'
|
|
file: '/buildjob.yml'
|
|
|
|
set_version:
|
|
extends: .default_set_version
|
|
|
|
build:astra1.6:
|
|
stage: build
|
|
image: rep.gisdemo.ru/infra/astra16se:latest
|
|
tags: [docker]
|
|
only:
|
|
- easo/astra
|
|
before_script:
|
|
- apt update && apt install -y python-all wget python-pip gettext fakeroot debhelper python-argparse python-psycopg2
|
|
- pip install stdeb
|
|
- pip install -r requirements.txt
|
|
script:
|
|
- '[ -f "VERSION" ] && export VERSION=`cat VERSION`-$(date "+%Y%m%d-%H%M%S")'
|
|
- '[ ! -f "VERSION" ] && export VERSION="2.3.7"-$(date "+%Y%m%d-%H%M%S")'
|
|
- 'echo "Version: $VERSION"'
|
|
- python setup.py --command-packages=stdeb.command bdist_deb
|
|
- mv ./deb_dist/*.deb .
|
|
artifacts:
|
|
paths:
|
|
- '*.deb'
|
|
expire_in: 10 hours
|
|
|
|
store:astra1.6:
|
|
stage: store
|
|
image: rep.gisdemo.ru/infra/astra16se:latest
|
|
tags: [docker]
|
|
variables:
|
|
DEB_REPO: https://nexus.sitronics-kt.dev/repository/easo-ast16/
|
|
needs:
|
|
- build:astra1.6
|
|
dependencies:
|
|
- build:astra1.6
|
|
only:
|
|
- easo/astra
|
|
script:
|
|
- for pack in `ls *.deb`; do
|
|
echo "Uploading ${pack}...";
|
|
curl -k -u "${NEXUS_USER}:${NEXUS_PASS_ASTRA}" -H "Content-Type:multipart/form-data" --data-binary @$pack $DEB_REPO;
|
|
done;
|