.gitlab-ci.yml 1.92 KB
Newer Older
Lukáš Lalinský's avatar
Lukáš Lalinský committed
1 2 3 4 5 6 7 8
stages:
  - prepare
  - test

build build-env image:
  stage: prepare
  script:
    - cd ci/build-env
Lukáš Lalinský's avatar
Lukáš Lalinský committed
9
    - docker build -t ${CI_REGISTRY_IMAGE}/build-env .
Lukáš Lalinský's avatar
Lukáš Lalinský committed
10
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
Lukáš Lalinský's avatar
Lukáš Lalinský committed
11 12 13
    - docker push $CI_REGISTRY_IMAGE/build-env
  tags:
    - docker-host
Lukáš Lalinský's avatar
Lukáš Lalinský committed
14 15
  only:
    - master@lukas/python-phoenixdb
Lukáš Lalinský's avatar
Lukáš Lalinský committed
16

17
.build-phoenix-image: &build_phoenix_image
Lukáš Lalinský's avatar
Lukáš Lalinský committed
18 19
  stage: prepare
  script:
20
    - JOB_NAME=($CI_JOB_NAME)
Lukáš Lalinský's avatar
Lukáš Lalinský committed
21
    - cd ci/phoenix
22
    - docker build -t ${CI_REGISTRY_IMAGE}/phoenix:${JOB_NAME[2]} --build-arg HBASE_VERSION=$HBASE_VERSION --build-arg PHOENIX_VERSION=$PHOENIX_VERSION .
Lukáš Lalinský's avatar
Lukáš Lalinský committed
23
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
24
    - docker push $CI_REGISTRY_IMAGE/phoenix:${JOB_NAME[2]}
Lukáš Lalinský's avatar
Lukáš Lalinský committed
25 26 27
  tags:
    - docker-host

28
build phoenix 4.11 image:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
29
  <<: *build_phoenix_image
30 31 32 33 34
  variables:
    PHOENIX_VERSION: 4.11.0-HBase-1.3
    HBASE_VERSION: 1.3.1

build phoenix 4.10 image:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
35
  <<: *build_phoenix_image
36 37 38 39 40
  variables:
    PHOENIX_VERSION: 4.10.0-HBase-1.2
    HBASE_VERSION: 1.2.6

build phoenix 4.9 image:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
41
  <<: *build_phoenix_image
42 43 44 45 46
  variables:
    PHOENIX_VERSION: 4.9.0-HBase-1.2
    HBASE_VERSION: 1.2.6

build phoenix 4.8 image:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
47
  <<: *build_phoenix_image
48 49 50 51 52
  variables:
    PHOENIX_VERSION: 4.8.2-HBase-1.2
    HBASE_VERSION: 1.2.6

.test: &test
Lukáš Lalinský's avatar
Lukáš Lalinský committed
53
  image: $CI_REGISTRY_IMAGE/build-env
54 55
  variables:
    PHOENIXDB_TEST_DB_URL: http://phoenix:8765/
56
    PIP_CACHE_DIR: $CI_PROJECT_DIR/cache/
Lukáš Lalinský's avatar
Lukáš Lalinský committed
57
  script:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
58
    - tox -e py27,py35
59 60 61
  cache:
    paths:
      - cache/
Lukáš Lalinský's avatar
Lukáš Lalinský committed
62 63
  tags:
    - docker
64 65

test phoenix 4.11:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
66
  <<: *test
67 68 69 70 71
  services:
    - name: $CI_REGISTRY_IMAGE/phoenix:4.11
      alias: phoenix

test phoenix 4.10:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
72
  <<: *test
73 74 75 76 77
  services:
    - name: $CI_REGISTRY_IMAGE/phoenix:4.10
      alias: phoenix

test phoenix 4.9:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
78
  <<: *test
79 80 81 82 83
  services:
    - name: $CI_REGISTRY_IMAGE/phoenix:4.9
      alias: phoenix

test phoenix 4.8:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
84
  <<: *test
85 86 87
  services:
    - name: $CI_REGISTRY_IMAGE/phoenix:4.8
      alias: phoenix