mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
#################################################
|
|
# Base configuration
|
|
#################################################
|
|
stages:
|
|
- package
|
|
- deploy
|
|
- test
|
|
|
|
job-centos7-rpm:
|
|
|
|
tags: [ "docker-centos7" ]
|
|
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos7-php
|
|
|
|
stage: package
|
|
script:
|
|
- make rpm-dev
|
|
artifacts:
|
|
paths:
|
|
- rpmbuild/x86_64/*.rpm
|
|
when: always
|
|
expire_in: 1 year
|
|
cache:
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
paths:
|
|
- flexiapi/vendor/
|
|
|
|
job-centos7-rpm-test:
|
|
|
|
tags: [ "docker-centos7" ]
|
|
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos7-php
|
|
|
|
stage: test
|
|
script:
|
|
- yum -y localinstall rpmbuild/x86_64/*.rpm
|
|
- cd /opt/belledonne-communications/share/flexisip-account-manager/flexiapi
|
|
- scl enable rh-php73 "php artisan key:generate"
|
|
- scl enable rh-php73 "vendor/bin/phpunit --log-junit $CI_PROJECT_DIR/flexiapi_phpunit.log"
|
|
artifacts:
|
|
paths:
|
|
- $CI_PROJECT_DIR/flexiapi_phpunit.log
|
|
- flexiapi/storage/logs/
|
|
when: always
|
|
expire_in: 1 day
|
|
|
|
job-centos7-rpm-deploy:
|
|
|
|
before_script:
|
|
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then eval $(ssh-agent -s); fi
|
|
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then echo "$SCP_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null; fi
|
|
|
|
stage: deploy
|
|
tags: [ "docker-centos7" ]
|
|
|
|
only:
|
|
refs:
|
|
- master
|
|
changes:
|
|
- flexisip-account-manager.spec
|
|
|
|
dependencies:
|
|
- job-centos7-rpm
|
|
|
|
script:
|
|
- cd rpmbuild/x86_64 && rsync -e "ssh -o StrictHostKeyChecking=no" -pr . $DEPLOY_SERVER:$CENTOS7_DEPLOY_DIRECTORY
|
|
- ssh $DEPLOY_SERVER "chmod a+r $CENTOS7_DEPLOY_DIRECTORY/*.rpm && createrepo_c --update $CENTOS7_DEPLOY_DIRECTORY/."
|