.gitlab-ci.yml 2.26 KB
Newer Older
Mike Shoup's avatar
Mike Shoup committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
image: docker

services:
  - docker:dind

stages:
  - build
  - test

variables:
  IMAGE_PATH: registry.gitlab.com/shouptech/web-benchmarks

build_pyfalcon_gunicorn:
  stage: build
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    - docker build --pull -t $IMAGE_PATH:pyfalcon-gunicorn -f pyfalcon/Dockerfile.gunicorn pyfalcon/
    - docker push $IMAGE_PATH:pyfalcon-gunicorn

test_pyfalcon_gunicorn:
  stage: test
  script:
    - docker run -d -p 8000:8000 $IMAGE_PATH:pyfalcon-gunicorn
Mike Shoup's avatar
Mike Shoup committed
24 25
    - sleep 5
    - wget -qO- http://docker:8000/hello | grep world
26 27 28 29 30 31 32 33 34 35 36 37 38 39

build_pyfalcon_uwsgi:
  stage: build
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    - docker build --pull -t $IMAGE_PATH:pyfalcon-uwsgi -f pyfalcon/Dockerfile.uwsgi pyfalcon/
    - docker push $IMAGE_PATH:pyfalcon-uwsgi

test_pyfalcon_uwsgi:
  stage: test
  script:
    - docker run -d -p 8000:8000 $IMAGE_PATH:pyfalcon-uwsgi
    - sleep 5
    - wget -qO- http://docker:8000/hello | grep world
Mike Shoup's avatar
Mike Shoup committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

build_pyflask_gunicorn:
  stage: build
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    - docker build --pull -t $IMAGE_PATH:pyflask-gunicorn -f pyflask/Dockerfile.gunicorn pyflask/
    - docker push $IMAGE_PATH:pyflask-gunicorn

test_pyflask_gunicorn:
  stage: test
  script:
    - docker run -d -p 8000:8000 $IMAGE_PATH:pyflask-gunicorn
    - sleep 5
    - wget -qO- http://docker:8000/hello | grep world

build_pyflask_uwsgi:
  stage: build
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    - docker build --pull -t $IMAGE_PATH:pyflask-uwsgi -f pyflask/Dockerfile.uwsgi pyflask/
    - docker push $IMAGE_PATH:pyflask-uwsgi

test_pyflask_uwsgi:
  stage: test
  script:
    - docker run -d -p 8000:8000 $IMAGE_PATH:pyflask-uwsgi
    - sleep 5
    - wget -qO- http://docker:8000/hello | grep world
Mike Shoup's avatar
Mike Shoup committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81

build_golang:
  stage: build
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    - docker build --pull -t $IMAGE_PATH:golang -f golang/Dockerfile.uwsgi golang/
    - docker push $IMAGE_PATH:golang

test_golang:
  stage: test
  script:
    - docker run -d -p 8000:8000 $IMAGE_PATH:golang
    - sleep 5
    - wget -qO- http://docker:8000/hello | grep world