.gitlab-ci.yml 1.03 KB
Newer Older
1 2 3 4 5 6
#################################################
# Base configuration
#################################################

job-centos7-rpm:

jehan's avatar
jehan committed
7
  tags: [ "docker" ]
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
  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:
johan's avatar
johan committed
29 30 31
    refs:
      - master
    changes:
johan's avatar
johan committed
32
      - flexisip-http-file-transfer-server.spec
johan's avatar
johan committed
33

34 35 36 37 38 39 40 41 42 43 44
  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