.gitlab-ci.yml 823 Bytes
Newer Older
1 2 3
Build Docker image:
  stage: deploy
  only:
4
    - tags
5 6
  image: docker:stable
  services:
7
    - docker:18.09-dind
8 9 10 11 12 13
  variables:
    DOCKER_HOST: tcp://docker:2375
    DOCKER_DRIVER: overlay2
  before_script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
  script:
14 15
    - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
    - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
  tags:
    - docker-privileged

Publish on PyPI:
  stage: deploy
  image: python:3.7
  only:
    - tags
  before_script:
    - pip install twine
    - python setup.py sdist bdist_wheel
  variables:
    TWINE_USERNAME: cbenz
    # TWINE_PASSWORD: # Secret variable, see project CI settings.
  script:
    - twine upload dist/*
  environment:
    name: PyPI
    url: https://pypi.org/project/validata-ui/$CI_COMMIT_TAG