-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
34 lines (32 loc) · 1.13 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
stages:
- python
- docker
build_and_upload_python_package:
image: python:3.7.3
stage: python
script:
- pip3 install -U twine setuptools
- if [ "$(python setup.py --version)" != "$CI_COMMIT_TAG" ]; then echo 'Tag does not match version'; exit 1; fi
- python3 setup.py sdist bdist_wheel
- python3 -m twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/akinaka-$CI_COMMIT_TAG*
only:
- tags
# build_and_upload_image:
# image: docker:stable
# stage: docker
# services:
# - docker:dind
# dependencies:
# - build_and_upload_python_package
# variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
# AKINAKA_VERSION: $CI_COMMIT_TAG
# script:
# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.olindata.com
# - docker build --build-arg AKINAKA_VERSION=${AKINAKA_VERSION} -t registry.olindata.com/olindata/akinaka/akinaka:$CI_COMMIT_TAG .
# - docker push registry.olindata.com/olindata/akinaka/akinaka:$CI_COMMIT_TAG
# when: delayed
# start_in: 5 seconds
# only:
# - tags