.gitlab-ci.yml 2.56 KB
Newer Older
Markus Frosch's avatar
Markus Frosch committed
1 2 3 4 5 6 7
stages:
  - build
  - test
  - upload

variables:
  DOCKER_IMAGE_BASE: registry.icinga.com/build-docker
Johannes Meyer's avatar
Johannes Meyer committed
8
  #ICINGA_BUILD_TYPE: snapshot
Markus Frosch's avatar
Markus Frosch committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
  #ICINGA_BUILD_UPSTREAM_BRANCH:

.build: &build
  stage: build
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - icinga-build-package
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - ccache/
      - 'icingaweb2.git'
  artifacts:
    paths:
      - build/*
    expire_in: 1 week

.test: &test
  stage: test
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - find build/
    - icinga-build-test

.upload: &upload
  stage: upload
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/upload
  script:
    - find build/
    - icinga-build-upload-aptly
  only:
Markus Frosch's avatar
Markus Frosch committed
46 47
    - master
    - tags
Markus Frosch's avatar
Markus Frosch committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

###################################
# Debian
###################################
build/debian/buster:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/buster

test/debian/buster:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/buster
  dependencies:
    - build/debian/buster

upload/debian/buster:
  <<: *upload
  dependencies:
    - build/debian/buster

build/debian/stretch:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/stretch

test/debian/stretch:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/stretch
  dependencies:
    - build/debian/stretch

upload/debian/stretch:
  <<: *upload
  dependencies:
    - build/debian/stretch

Markus Frosch's avatar
Markus Frosch committed
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
build/debian/jessie:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/jessie

test/debian/jessie:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/jessie
  dependencies:
    - build/debian/jessie

upload/debian/jessie:
  <<: *upload
  dependencies:
    - build/debian/jessie

Markus Frosch's avatar
Markus Frosch committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
###################################
# Ubuntu
###################################
build/ubuntu/disco:
  <<: *build
  variables:
    DOCKER_IMAGE: ubuntu/disco

test/ubuntu/disco:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/disco
  dependencies:
    - build/ubuntu/disco

upload/ubuntu/disco:
  <<: *upload
  dependencies:
    - build/ubuntu/disco

build/ubuntu/bionic:
  <<: *build
  variables:
    DOCKER_IMAGE: ubuntu/bionic

test/ubuntu/bionic:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/bionic
  dependencies:
    - build/ubuntu/bionic

upload/ubuntu/bionic:
  <<: *upload
  dependencies:
    - build/ubuntu/bionic

build/ubuntu/xenial:
  <<: *build
  variables:
    DOCKER_IMAGE: ubuntu/xenial

test/ubuntu/xenial:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/xenial
  dependencies:
    - build/ubuntu/xenial

upload/ubuntu/xenial:
  <<: *upload
  dependencies:
    - build/ubuntu/xenial