.gitlab-ci.yml 1.14 KB
Newer Older
jehan's avatar
jehan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#################################################
# Base configuration
#################################################

variables:
 DEPLOY_SERVER: buildbot@www.linphone.org
 CENTOS7_DEPLOY_DIRECTORY: snapshots-private/centos7
 
job-centos7-rpm:

  tags: [ "docker-centos7" ]
  image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
    
  stage: package
  script:
    - make rpm
  artifacts:
    paths:
    - rpmbuild/x86_64/*.rpm
    when: always
    expire_in: 1 year

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:
33 34 35 36 37
    refs:
      - master
    changes:
      - flexisip-account-manager.spec  

jehan's avatar
jehan committed
38 39 40 41 42 43 44 45 46 47 48
  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/."


stages:
 - package
 - deploy