Commit dd03bbad authored by Arif Ali's avatar Arif Ali
Browse files

use extends

parent 9a88457e
.pkg_default_options: &pkg_default_options
.pkg_default_options:
image: ubuntu:latest
only:
- master
build_deb:
extends: .pkg_default_options
stage: build
script:
- apt-get -y update && apt-get -y install build-essential devscripts debhelper git
......@@ -17,12 +18,11 @@ build_deb:
paths:
- debs/*.deb
expire_in: 7 day
<<: *pkg_default_options
deploy_deb:
extends: .pkg_default_options
stage: deploy
script:
- apt-get -y update && apt-get install openssh-clients
- ssh -o "StrictHostKeyChecking=no" root@mirror.ocf.co.uk "cd /var/www/html/salt/formula ; rm -rf $CI_PROJECT_NAME*.deb"
- scp -o "StrictHostKeyChecking=no" debs/*.deb root@mirror.ocf.co.uk:/var/www/html/salt/formula
<<: *pkg_default_options
.pkg_default_options: &pkg_default_options
.pkg_default_options:
image: centos:latest
only:
- master
build_rpm:
extends: .pkg_default_options
stage: build
script:
- yum -y install rpm-build git
......@@ -17,13 +18,12 @@ build_rpm:
paths:
- rpms/*.rpm
expire_in: 7 day
<<: *pkg_default_options
deploy_rpm:
extends: .pkg_default_options
stage: deploy
script:
- yum -y install openssh-clients
- ssh -o "StrictHostKeyChecking=no" root@mirror.ocf.co.uk "cd /var/www/html/salt/formula ; rm -rf $CI_PROJECT_NAME*.rpm"
- scp -o "StrictHostKeyChecking=no" rpms/$CI_PROJECT_NAME*.rpm root@mirror.ocf.co.uk:/var/www/html/salt/formula
- ssh -o "StrictHostKeyChecking=no" root@mirror.ocf.co.uk "cd /var/www/html/salt/formula ; createrepo ."
<<: *pkg_default_options
.pkg_default_options: &pkg_default_options
.pkg_default_options:
image: saltstack/centos-7-minimal
only:
- master
build_spm:
extends: .pkg_default_options
stage: build
script:
- export PROJ_NAME=`echo $CI_PROJECT_NAME | cut -d - -f 3-`
......@@ -14,13 +15,12 @@ build_spm:
paths:
- spms/*.spm
expire_in: 7 day
<<: *pkg_default_options
deploy_spm:
extends: .pkg_default_options
stage: deploy
script:
- export PROJ_NAME=`echo $CI_PROJECT_NAME | cut -d - -f 3-`
- ssh -o "StrictHostKeyChecking=no" root@mirror.ocf.co.uk "cd /var/www/html/salt/formula ; rm -rf $PROJ_NAME*.spm"
- scp -o "StrictHostKeyChecking=no" spms/$PROJ_NAME*.spm root@mirror.ocf.co.uk:/var/www/html/salt/formula
- ssh -o "StrictHostKeyChecking=no" root@mirror.ocf.co.uk "cd /var/www/html/salt/formula ; spm create_repo ."
<<: *pkg_default_options
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