.gitlab-ci.yml 2.1 KB
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4 5 6 7 8 9
before_script:
  - echo $NGINX_VERSION
  - echo $NGINX_BINARY

  # Relies on latest binary build artifact from https://git.ethitter.com/debian/nginx-build.
  - curl -o nginx-build "${NGINX_BINARY}"
  - chmod +x nginx-build
  - ./nginx-build -V

10 11 12 13 14 15
after_script:
  - export $BUILD_DIR=$CI_PROJECT_DIR/deb-$(lsb_release -r)
  - mkdir $BUILD_DIR
  - mv $CI_PROJECT_DIR/nginx_${NGINX_VERSION}* $BUILD_DIR
  - mv $CI_PROJECT_DIR/nginx-dbgsym_* $BUILD_DIR

Erick Hitter's avatar
Erick Hitter committed
16
build-deb:jessie:
17 18
  stage: build
  image: containers.ethitter.com:443/docker/images/debian:jessie
Erick Hitter's avatar
Erick Hitter committed
19 20 21
  variables:
    NGINX_BINARY: $NGINX_BINARY_JESSIE
    NGINX_VERSION: $NGINX_VERSION_JESSIE
22 23 24 25 26
  script:
    - cd source
    - debuild -us -uc
  artifacts:
    paths:
27
      - $BUILD_DIR
Erick Hitter's avatar
Erick Hitter committed
28

Erick Hitter's avatar
Erick Hitter committed
29 30 31
test-deb:jessie:
  stage: test
  image: containers.ethitter.com:443/docker/images/debian:jessie
Erick Hitter's avatar
Erick Hitter committed
32
  before_script:
33
    - ''
Erick Hitter's avatar
Erick Hitter committed
34
  script:
35
    - dpkg -i deb-$(lsb_release -r)/nginx_${NGINX_VERSION_JESSIE}*.deb
Erick Hitter's avatar
Erick Hitter committed
36
    - nginx -V
37 38
  after_script:
    - ''
Erick Hitter's avatar
Erick Hitter committed
39 40 41 42
  dependencies:
    - build-deb:jessie

build-deb:stretch:
43 44
  stage: build
  image: containers.ethitter.com:443/docker/images/debian:stretch
Erick Hitter's avatar
Erick Hitter committed
45 46 47
  variables:
    NGINX_BINARY: $NGINX_BINARY_STRETCH
    NGINX_VERSION: $NGINX_VERSION_STRETCH
48 49 50 51 52
  script:
    - cd source
    - debuild -us -uc
  artifacts:
    paths:
53
      - $BUILD_DIR
Erick Hitter's avatar
Erick Hitter committed
54

Erick Hitter's avatar
Erick Hitter committed
55 56 57
test-deb:stretch:
  stage: test
  image: containers.ethitter.com:443/docker/images/debian:stretch
Erick Hitter's avatar
Erick Hitter committed
58
  before_script:
59
    - ''
Erick Hitter's avatar
Erick Hitter committed
60
  script:
61
    - dpkg -i deb-$(lsb_release -r)/nginx_${NGINX_VERSION_STRECTH}*.deb
Erick Hitter's avatar
Erick Hitter committed
62
    - nginx -V
63 64
  after_script:
    - ''
Erick Hitter's avatar
Erick Hitter committed
65 66 67 68
  dependencies:
    - build-deb:stretch

build-deb:buster:
Erick Hitter's avatar
Erick Hitter committed
69
  stage: build
70
  image: containers.ethitter.com:443/docker/images/debian:buster
Erick Hitter's avatar
Erick Hitter committed
71 72 73
  variables:
    NGINX_BINARY: $NGINX_BINARY_BUSTER
    NGINX_VERSION: $NGINX_VERSION_BUSTER
Erick Hitter's avatar
Erick Hitter committed
74
  script:
Erick Hitter's avatar
Erick Hitter committed
75
    - cd source
Erick Hitter's avatar
Erick Hitter committed
76
    - debuild -us -uc
Erick Hitter's avatar
Erick Hitter committed
77 78
  artifacts:
    paths:
79
      - $BUILD_DIR
Erick Hitter's avatar
Erick Hitter committed
80 81 82 83

test-deb:buster:
  stage: test
  image: containers.ethitter.com:443/docker/images/debian:buster
Erick Hitter's avatar
Erick Hitter committed
84
  before_script:
85
    - ''
Erick Hitter's avatar
Erick Hitter committed
86
  script:
87
    - dpkg -i deb-$(lsb_release -r)/nginx_${NGINX_VERSION_BUSTER}*.deb
Erick Hitter's avatar
Erick Hitter committed
88
    - nginx -V
89 90
  after_script:
    - ''
Erick Hitter's avatar
Erick Hitter committed
91 92
  dependencies:
    - build-deb:buster