.gitlab-ci.yml 1.88 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 14
    - docker push $CI_REGISTRY_IMAGE/build-env
  tags:
    - docker-host

15
.build-phoenix-image: &build_phoenix_image
Lukáš Lalinský's avatar
Lukáš Lalinský committed
16 17
  stage: prepare
  script:
18
    - JOB_NAME=($CI_JOB_NAME)
Lukáš Lalinský's avatar
Lukáš Lalinský committed
19
    - cd ci/phoenix
20
    - 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
21
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
22
    - docker push $CI_REGISTRY_IMAGE/phoenix:${JOB_NAME[2]}
Lukáš Lalinský's avatar
Lukáš Lalinský committed
23 24 25
  tags:
    - docker-host

26
build phoenix 4.11 image:
Lukáš Lalinský's avatar
Lukáš Lalinský committed
27
  <<: *build_phoenix_image
28 29 30 31 32
  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
33
  <<: *build_phoenix_image
34 35 36 37 38
  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
39
  <<: *build_phoenix_image
40 41 42 43 44
  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
45
  <<: *build_phoenix_image
46 47 48 49 50
  variables:
    PHOENIX_VERSION: 4.8.2-HBase-1.2
    HBASE_VERSION: 1.2.6

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

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

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

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

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