lemonldap-ng/.gitlab-ci.yml

142 lines
2.9 KiB
YAML
Raw Permalink Normal View History

2021-01-15 18:31:54 +01:00
.build_job:
2018-06-02 01:54:40 +02:00
stage: build
retry: 1
2018-06-02 01:54:40 +02:00
artifacts:
2018-06-17 23:03:13 +02:00
expire_in: 1 hour
2018-06-02 01:54:40 +02:00
paths:
- result/*
2021-01-16 14:30:55 +01:00
except:
variables:
- $SONARJOB == "1"
2018-06-02 01:54:40 +02:00
2021-01-15 18:31:54 +01:00
.debian_build_job:
extends: .build_job
script:
- apt-get update --allow-releaseinfo-change && apt-get -y dist-upgrade
2021-01-15 18:31:54 +01:00
- DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata
- ci-build-pkg
before_script:
- env | grep ^CI_
# Converting to native package...
- sed -i "1{s/-1) /$suffix) /}" debian/changelog
- sed -i "1{s/-2) /$suffix) /}" debian/changelog
- sed -i 's/3.0 (quilt)/3.0 (native)/' debian/source/format
2019-10-31 21:33:09 +01:00
2017-12-13 22:24:53 +01:00
stages:
2018-06-02 01:54:40 +02:00
- build
- sign
- deploy
2017-12-13 22:24:53 +01:00
2018-06-02 01:54:40 +02:00
before_script:
- env | grep ^CI_
2018-12-07 00:28:00 +01:00
build_buster:
2021-01-15 18:31:54 +01:00
extends: .debian_build_job
2018-12-07 00:28:00 +01:00
image: buildpkg/debian:buster
2021-08-21 19:46:29 +02:00
build_bullseye:
extends: .debian_build_job
image: buildpkg/debian:bullseye
2018-06-02 01:54:40 +02:00
#build_xenial:
2021-01-15 18:31:54 +01:00
# extends: .debian_build_job
2018-06-02 01:54:40 +02:00
# image: buildpkg/ubuntu:xenial
# <<: *job_build
build_bionic:
2021-01-15 18:31:54 +01:00
extends: .debian_build_job
2018-06-02 01:54:40 +02:00
image: buildpkg/ubuntu:bionic
2019-10-31 21:33:09 +01:00
build_centos_7:
2021-01-15 18:31:54 +01:00
extends: .build_job
2020-04-30 21:09:47 +02:00
image: buildpkg/centos:7
script:
- rm -f /etc/yum.repos.d/CentOS-Sources.repo
- yum -y install epel-release
2022-01-04 10:19:40 +01:00
- scripts/ci-install-lasso-centos
2021-04-08 15:01:05 +02:00
- make dist
2020-04-30 21:09:47 +02:00
- ci-build-pkg
build_centos_8:
2021-01-15 18:31:54 +01:00
extends: .build_job
image: buildpkg/centos:8
script:
2022-02-02 21:57:37 +01:00
- sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
- sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
- yum-config-manager --enable PowerTools
- yum-config-manager --enable AppStream
- yum -y install epel-release
2022-01-04 10:19:40 +01:00
- scripts/ci-install-lasso-centos
2021-04-08 15:01:05 +02:00
- make dist
- ci-build-pkg
2019-10-31 21:33:09 +01:00
2018-06-02 01:54:40 +02:00
sign:
2021-08-22 13:46:52 +02:00
image: buildpkg/debian:bullseye
2018-06-02 01:54:40 +02:00
stage: sign
# variables:
# SIGN_USER: firstname.lastname@orange.com
# GPG_PRIVATE_KEY:
script:
- cd $CI_PROJECT_DIR
- ci-sign-pkg
dependencies:
2018-12-07 00:28:00 +01:00
- build_buster
2021-08-21 19:46:29 +02:00
- build_bullseye
2018-06-02 01:54:40 +02:00
# - build_xenial
- build_bionic
2019-10-31 21:33:09 +01:00
- build_centos_7
2021-04-08 15:10:17 +02:00
- build_centos_8
2018-06-02 01:54:40 +02:00
artifacts:
expire_in: 1 day
paths:
- result/*
2019-02-11 16:30:12 +01:00
only:
- master
2018-06-02 01:54:40 +02:00
pages:
2021-08-22 13:46:52 +02:00
image: buildpkg/debian:bullseye
2018-06-02 01:54:40 +02:00
stage: deploy
variables:
2018-06-02 09:05:37 +02:00
# Default page dir
# PAGES_DIR: public
PAGES_HOST: ow2.io
2018-06-02 01:54:40 +02:00
environment:
name: PPA
2018-06-02 09:05:37 +02:00
url: http://${CI_PROJECT_NAMESPACE}.${PAGES_HOST}/${CI_PROJECT_NAME}
2018-06-02 01:54:40 +02:00
script:
- cd $CI_PROJECT_DIR
- ci-pages-ppa
- ci-pages-home
- ci-pages-tree
dependencies:
- sign
2017-12-13 22:24:53 +01:00
artifacts:
2018-06-02 01:57:17 +02:00
expire_in: 1 day
2017-12-13 22:24:53 +01:00
paths:
2018-06-02 01:54:40 +02:00
- public
only:
- master
2021-01-16 14:30:55 +01:00
sonar-inspect:
image: buildpkg/debian:buster
stage: build
script:
- scripts/sonar
artifacts:
expire_in: 1 hour
paths:
- lemonldap-ng-*/cover_db/sonar_generic.xml
- lemonldap-ng-*/perlcritic_report.txt
only:
variables:
- $SONARJOB == "1"
sonar-upload:
stage: deploy
image: sonarsource/sonar-scanner-cli
script:
2021-05-12 20:26:24 +02:00
- /usr/bin/entrypoint.sh
2021-01-16 14:30:55 +01:00
only:
variables:
- $SONARJOB == "1"