package:jessie:
  stage: build
  image: containers.ethitter.com:443/docker/images/debian:jessie
  before_script:
    # Relies on latest binary build artifact from https://git.ethitter.com/debian/nginx-build.
    - curl -o nginx-build "${NGINX_BINARY_JESSIE}"
    - chmod +x nginx-build
    - ./nginx-build -V
  script:
    - cd source
    - debuild -us -uc
  artifacts:
    paths:
      - nginx_${NGINX_VERSION_JESSIE}*
      - nginx-dbgsym_${NGINX_VERSION_JESSIE}*

package:stretch:
  stage: build
  image: containers.ethitter.com:443/docker/images/debian:stretch
  before_script:
    # Relies on latest binary build artifact from https://git.ethitter.com/debian/nginx-build.
    - curl -o nginx-build "${NGINX_BINARY_STRETCH}"
    - chmod +x nginx-build
    - ./nginx-build -V
  script:
    - cd source
    - debuild -us -uc
  artifacts:
    paths:
      - nginx_${NGINX_VERSION_STRETCH}*
      - nginx-dbgsym_${NGINX_VERSION_STRETCH}*

package:buster:
  stage: build
  image: containers.ethitter.com:443/docker/images/debian:buster
  before_script:
    # Relies on latest binary build artifact from https://git.ethitter.com/debian/nginx-build.
    - curl -o nginx-build "${NGINX_BINARY_BUSTER}"
    - chmod +x nginx-build
    - ./nginx-build -V
  script:
    - cd source
    - debuild -us -uc
  artifacts:
    paths:
      - nginx_${NGINX_VERSION_BUSTER}*
      - nginx-dbgsym_${NGINX_VERSION_BUSTER}*