Commit df9b2849 authored by Ghislain MARY's avatar Ghislain MARY

Handle deployment of RPM and DEB packages in CI.

parent bc8a3b6b
Pipeline #1031 passed with stage
in 21 minutes and 25 seconds
...@@ -6,6 +6,11 @@ variables: ...@@ -6,6 +6,11 @@ variables:
DEFAULT_MACOS_CMAKE_OPTIONS: -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=OFF -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON DEFAULT_MACOS_CMAKE_OPTIONS: -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=OFF -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON
stages:
- build
- deploy
.linux-ccache: .linux-ccache:
cache: cache:
...@@ -27,6 +32,7 @@ variables: ...@@ -27,6 +32,7 @@ variables:
.job-linux: .job-linux:
stage: build
extends: .linux-ccache extends: .linux-ccache
script: script:
...@@ -38,6 +44,8 @@ variables: ...@@ -38,6 +44,8 @@ variables:
.job-linux-rpm: .job-linux-rpm:
stage: build
script: script:
- sudo rpm -e `rpm -qa | grep "^bc-[^0-9]"` || true - sudo rpm -e `rpm -qa | grep "^bc-[^0-9]"` || true
- ./prepare.py flexisip-rpm $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS - ./prepare.py flexisip-rpm $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
...@@ -52,6 +60,8 @@ variables: ...@@ -52,6 +60,8 @@ variables:
.job-linux-deb: .job-linux-deb:
stage: build
script: script:
- sudo apt-get -y remove `dpkg-query -f '${binary:Package}\n' -W | grep "^bc-"` || true - sudo apt-get -y remove `dpkg-query -f '${binary:Package}\n' -W | grep "^bc-"` || true
- ./prepare.py flexisip-rpm $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS - ./prepare.py flexisip-rpm $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
...@@ -64,6 +74,19 @@ variables: ...@@ -64,6 +74,19 @@ variables:
expire_in: 1 week expire_in: 1 week
.job-debian-deb-deploy:
stage: deploy
tags: [ "deploy" ]
only:
- schedules
script:
- cd WORK/flexisip-rpm/rpmbuild/DEBS/ && rsync -pr . $DEPLOY_SERVER:$DEBIAN_DEPLOY_DIRECTORY/$DEBIAN_RELEASE
- ssh $DEPLOY_SERVER "cd $DEBIAN_DEPLOY_DIRECTORY/$DEBIAN_RELEASE && freight add --conf=/etc/freight.conf *.deb apt/$DEBIAN_RELEASE && freight cache --conf=/etc/freight.conf apt/$DEBIAN_RELEASE"
.scheduled-job-linux: .scheduled-job-linux:
extends: .job-linux extends: .job-linux
...@@ -122,6 +145,21 @@ job-centos7-rpm: ...@@ -122,6 +145,21 @@ job-centos7-rpm:
extends: .job-linux-rpm extends: .job-linux-rpm
job-centos7-rpm-deploy:
stage: deploy
tags: [ "deploy" ]
only:
- schedules
dependencies:
- job-centos7-rpm
script:
- cd WORK/flexisip-rpm/rpmbuild/RPMS/x86_64/ && rsync -pr . $DEPLOY_SERVER:$CENTOS7_DEPLOY_DIRECTORY
- ssh $DEPLOY_SERVER "chmod a+r $CENTOS7_DEPLOY_DIRECTORY/*.rpm && createrepo_c --update $CENTOS7_DEPLOY_DIRECTORY/."
job-debian8-makefile-gcc: job-debian8-makefile-gcc:
tags: [ "docker-debian8" ] tags: [ "docker-debian8" ]
...@@ -175,6 +213,15 @@ job-debian8-deb: ...@@ -175,6 +213,15 @@ job-debian8-deb:
extends: .job-linux-deb extends: .job-linux-deb
job-debian8-deb-deploy:
variables:
DEBIAN_RELEASE: jessie
extends: .job-debian-deb-deploy
dependencies:
- job-debian8-deb
job-debian9-makefile-gcc: job-debian9-makefile-gcc:
tags: [ "docker-debian9" ] tags: [ "docker-debian9" ]
...@@ -228,8 +275,18 @@ job-debian9-deb: ...@@ -228,8 +275,18 @@ job-debian9-deb:
extends: .job-linux-deb extends: .job-linux-deb
job-debian9-deb-deploy:
variables:
DEBIAN_RELEASE: stretch
extends: .job-debian-deb-deploy
dependencies:
- job-debian9-deb
.job-macosx: .job-macosx:
stage: build
tags: [ "macosx" ] tags: [ "macosx" ]
script: script:
...@@ -265,6 +322,7 @@ job-macosx-ninja: ...@@ -265,6 +322,7 @@ job-macosx-ninja:
job-macosx-xcode: job-macosx-xcode:
stage: build
tags: [ "macosx" ] tags: [ "macosx" ]
only: only:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment