.gitlab-ci.yml 2.15 KB
Newer Older
Christian Bayle's avatar
Christian Bayle committed
1 2 3 4 5 6
.build_job: &job_build
  stage: build
  script:
     - apt-get update && apt-get -y dist-upgrade
     - ci-build-pkg
  artifacts:
7
    expire_in: 1 hour
Christian Bayle's avatar
Christian Bayle committed
8 9 10
    paths:
      - result/*

Maxime Besson's avatar
Maxime Besson committed
11 12 13 14 15 16 17 18 19 20 21 22

.build_job_centos:
  stage: build
  script:
     - yum -y install epel-release
     - make rpm-dist
     - ci-build-pkg
  artifacts:
     expire_in: 1 day
     paths:
       - result/*

23
stages:
Christian Bayle's avatar
Christian Bayle committed
24 25 26
- build
- sign
- deploy
27

Christian Bayle's avatar
Christian Bayle committed
28 29 30 31
before_script:
  - env | grep ^CI_
  # Converting to native package...
  - sed -i "1{s/-1) /$suffix) /}" debian/changelog
Clément OUDOT's avatar
Clément OUDOT committed
32
  - sed -i "1{s/-2) /$suffix) /}" debian/changelog
Christian Bayle's avatar
Christian Bayle committed
33 34
  - sed -i 's/3.0 (quilt)/3.0 (native)/' debian/source/format

35 36 37 38 39 40 41 42 43 44
autopkgtest:
  stage: build
  image: buildpkg/debian:buster
  script:
    - cd $CI_PROJECT_DIR
    - env DEBIAN_FRONTEND=noninteractive apt-get -q -y install --no-install-recommends aspcud apt-cudf pkg-perl-autopkgtest
    - env DEBIAN_FRONTEND=noninteractive apt-get -q -y --solver aspcud -o APT::Solver::Strict-Pinning=0 -o Debug::pkgProblemResolver=yes build-dep .
    - make
    - make -j8 autopkgtest

Christian Bayle's avatar
Christian Bayle committed
45 46 47 48
build_stretch:
  image: buildpkg/debian:stretch
  <<: *job_build

49 50 51 52
build_buster:
  image: buildpkg/debian:buster
  <<: *job_build

Xavier Guimard's avatar
Xavier Guimard committed
53 54 55
build_disco:
  image: buildpkg/ubuntu:disco
  <<: *job_build
Christian Bayle's avatar
Christian Bayle committed
56 57 58 59 60

build_bionic:
  image: buildpkg/ubuntu:bionic
  <<: *job_build

Maxime Besson's avatar
Maxime Besson committed
61 62 63 64
build_centos_7:
   image: buildpkg/centos:7
   extends: .build_job_centos

Christian Bayle's avatar
Christian Bayle committed
65 66 67 68 69 70 71 72 73 74 75
sign:
  image: buildpkg/debian:stretch
  stage: sign
#  variables:
#    SIGN_USER: firstname.lastname@orange.com
#    GPG_PRIVATE_KEY:
  script:
    - cd $CI_PROJECT_DIR
    - ci-sign-pkg
  dependencies:
    - build_stretch
76
    - build_buster
Xavier Guimard's avatar
Xavier Guimard committed
77
    - build_disco
Christian Bayle's avatar
Christian Bayle committed
78
    - build_bionic
Maxime Besson's avatar
Maxime Besson committed
79
    - build_centos_7
Christian Bayle's avatar
Christian Bayle committed
80 81 82 83
  artifacts:
    expire_in: 1 day
    paths:
      - result/*
Xavier Guimard's avatar
Xavier Guimard committed
84 85
  only:
    - master
Christian Bayle's avatar
Christian Bayle committed
86 87 88 89 90

pages:
  image: buildpkg/debian:stretch
  stage: deploy
  variables:
Christian Bayle's avatar
Christian Bayle committed
91 92 93
    # Default page dir
    # PAGES_DIR: public
    PAGES_HOST: ow2.io
Christian Bayle's avatar
Christian Bayle committed
94 95
  environment:
    name: PPA
Christian Bayle's avatar
Christian Bayle committed
96
    url: http://${CI_PROJECT_NAMESPACE}.${PAGES_HOST}/${CI_PROJECT_NAME}
Christian Bayle's avatar
Christian Bayle committed
97 98 99 100 101 102 103
  script:
    - cd $CI_PROJECT_DIR
    - ci-pages-ppa
    - ci-pages-home
    - ci-pages-tree
  dependencies:
    - sign
104
  artifacts:
Christian Bayle's avatar
Christian Bayle committed
105
    expire_in: 1 day
106
    paths:
Christian Bayle's avatar
Christian Bayle committed
107 108 109 110
      - public
  only:
    - master