.gitlab-ci.yml 1.34 KB
Newer Older
Henrik Triem's avatar
Henrik Triem committed
1 2 3 4 5 6 7 8 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
stages:
  - build
  - test
  - upload

variables:
  DOCKER_IMAGE_BASE: registry.icinga.com/build-docker

.build: &build
  stage: build
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - icinga-build-package
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - ccache/
  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:
    - tags

###################################
Henrik Triem's avatar
Henrik Triem committed
46
# SLES
Henrik Triem's avatar
Henrik Triem committed
47
###################################
Henrik Triem's avatar
Henrik Triem committed
48
build/sles/15.1:
Henrik Triem's avatar
Henrik Triem committed
49 50
  <<: *build
  variables:
Henrik Triem's avatar
Henrik Triem committed
51
    DOCKER_IMAGE: sles/15.1
Henrik Triem's avatar
Henrik Triem committed
52

Henrik Triem's avatar
Henrik Triem committed
53
test/sles/15.1:
Henrik Triem's avatar
Henrik Triem committed
54 55
  <<: *test
  variables:
Henrik Triem's avatar
Henrik Triem committed
56
    DOCKER_IMAGE: sles/15.1
Henrik Triem's avatar
Henrik Triem committed
57
  dependencies:
Henrik Triem's avatar
Henrik Triem committed
58
    - build/sles/15.1
Henrik Triem's avatar
Henrik Triem committed
59

Henrik Triem's avatar
Henrik Triem committed
60
upload/SUSE/15.1:
Henrik Triem's avatar
Henrik Triem committed
61 62
  <<: *upload
  dependencies:
Henrik Triem's avatar
Henrik Triem committed
63
    - build/sles/15.1
Henrik Triem's avatar
Henrik Triem committed
64 65

###################################
Henrik Triem's avatar
Henrik Triem committed
66
# openSUSE
Henrik Triem's avatar
Henrik Triem committed
67
###################################
Henrik Triem's avatar
Henrik Triem committed
68
build/opensuse/15.1:
Henrik Triem's avatar
Henrik Triem committed
69 70
  <<: *build
  variables:
Henrik Triem's avatar
Henrik Triem committed
71
    DOCKER_IMAGE: opensuse/15.1
Henrik Triem's avatar
Henrik Triem committed
72

Henrik Triem's avatar
Henrik Triem committed
73
test/opensuse/15.1:
Henrik Triem's avatar
Henrik Triem committed
74 75
  <<: *test
  variables:
Henrik Triem's avatar
Henrik Triem committed
76
    DOCKER_IMAGE: opensuse/15.1
Henrik Triem's avatar
Henrik Triem committed
77
  dependencies:
Henrik Triem's avatar
Henrik Triem committed
78
    - build/opensuse/15.1
Henrik Triem's avatar
Henrik Triem committed
79

Henrik Triem's avatar
Henrik Triem committed
80
upload/openSUSE/15.1:
Henrik Triem's avatar
Henrik Triem committed
81 82
  <<: *upload
  dependencies:
Henrik Triem's avatar
Henrik Triem committed
83
    - build/opensuse/15.1