[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/pythonthings/python-gitlab/master/.gitlab-ci.yml [Back]  [Original]

image: python:3.7

stages:
  - deploy

build_test_image:
  stage: deploy
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/tools/Dockerfile-test --destination $CI_REGISTRY_IMAGE:test
  only:
    - tags

deploy:
  stage: deploy
  script:
    - pip install -U setuptools wheel twine
    - python setup.py sdist bdist_wheel
    # test package
    - python3 -m venv test
    - . test/bin/activate
    - pip install -U dist/python_gitlab*.whl
    - gitlab -h
    - deactivate
    - twine upload --skip-existing -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
  only:
    - tags

deploy_image:
  stage: deploy
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
  only:
    - tags

Web Proxy Viewer  |  New URL  |  Original Page