Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.70 KB | None | 0 0
  1. image: python:3-alpine:3.9
  2.  
  3. variables:
  4.   DOCKER_IMAGE_REPO: "myrepo.com"
  5.   IMAGE_VERSION: 0.1.0
  6.  
  7. before_script:
  8.  - ln -sf "${CI_PROJECT_DIR}" "/app"
  9.   - cd /app/
  10.  
  11. stages:
  12.  - build
  13.   - test
  14. #  - deploy
  15.  
  16. build:
  17.   stage: build
  18.   image: docker:19.03.1
  19.   variables:
  20.     DOCKER_DRIVER: overlay2
  21.     DOCKER_HOST: tcp://localhost:2375
  22.   services:
  23.    - docker:19.03.1-dind
  24.   before_script:
  25.    - docker info
  26.   script:
  27.    - docker login --username="${REGISTRY_USER}" --password="${REGISTRY_PASS}" myregistry.com
  28.     - docker build -t "${DOCKER_IMAGE_REPO}:hello_flask-${IMAGE_VERSION}" .
  29.     - docker push "${DOCKER_IMAGE_REPO}:${IMAGE_VERSION}"
  30.  
  31. test:
  32.   stage: test
  33.   script:
  34.    - exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement