Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image: python:3-alpine:3.9
- variables:
- DOCKER_IMAGE_REPO: "myrepo.com"
- IMAGE_VERSION: 0.1.0
- before_script:
- - ln -sf "${CI_PROJECT_DIR}" "/app"
- - cd /app/
- stages:
- - build
- - test
- # - deploy
- build:
- stage: build
- image: docker:19.03.1
- variables:
- DOCKER_DRIVER: overlay2
- DOCKER_HOST: tcp://localhost:2375
- services:
- - docker:19.03.1-dind
- before_script:
- - docker info
- script:
- - docker login --username="${REGISTRY_USER}" --password="${REGISTRY_PASS}" myregistry.com
- - docker build -t "${DOCKER_IMAGE_REPO}:hello_flask-${IMAGE_VERSION}" .
- - docker push "${DOCKER_IMAGE_REPO}:${IMAGE_VERSION}"
- test:
- stage: test
- script:
- - exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement