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