stages: - targz_build - srpm_build - rpm_build before_script: - sed -i -e 's/^mirror/#mirror/' -e 's/# *baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo - sed -i -e 's/mirror.centos.org\/centos\/\($releasever\|[56]\)\/os\/$basearch/katello.corp.ifax.com\/pulp\/repos\/ifax\/Library\/custom\/centos\/centos-$releasever-$basearch/' /etc/yum.repos.d/CentOS-Base.repo - sed -i -e 's/mirror.centos.org\/centos\/\($releasever\|[56]\)\/\(updates\|extras\|centosplus\)\/$basearch/katello.corp.ifax.com\/pulp\/repos\/ifax\/Library\/custom\/centos\/centos-$releasever-\2-$basearch/' /etc/yum.repos.d/CentOS-Base.repo # CentOS-Sources.repo doesn't exist on base CentOS 6 install - if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i -e 's/vault.centos.org\/centos\/\($releasever\|[56]\)\/os\/Source/katello.corp.ifax.com\/pulp\/repos\/ifax\/Library\/custom\/centos\/centos-$releasever-source/' /etc/yum.repos.d/CentOS-Sources.repo; sed -i -e 's/vault.centos.org\/centos\/\($releasever\|[56]\)\/\(updates\|extras\|centosplus\)\/Source/katello.corp.ifax.com\/pulp\/repos\/ifax\/Library\/custom\/centos\/centos-$releasever-\2-source/' /etc/yum.repos.d/CentOS-Sources.repo; fi # Install EPEL - yum install -y epel-release - sed -i -e 's/^mirror/#mirror/' -e 's/# *baseurl/baseurl/' /etc/yum.repos.d/epel.repo - sed -i -e 's/download.fedoraproject.org\/pub\/epel\/[0-9]\/$basearch/katello.corp.ifax.com\/pulp\/repos\/ifax\/Library\/custom\/epel\/epel-$releasever-$basearch/' /etc/yum.repos.d/epel.repo - sed -i -e 's/download.fedoraproject.org\/pub\/epel\/[0-9]\/SRPMS/katello.corp.ifax.com\/pulp\/repos\/ifax\/Library\/custom\/epel\/epel-$releasever-source/' /etc/yum.repos.d/epel.repo - yum update -y targz_build: stage: targz_build image: katello.corp.ifax.com:5000/ifax-docker-centos:7 tags: - linux - docker dependencies: [] script: - yum install -y git - VERSION=`cat VERSION` - git archive -v --prefix hylafax-$VERSION/ -o hylafax-$VERSION.tar.gz HEAD artifacts: paths: - ./*.tar.gz srpm_build: stage: srpm_build image: katello.corp.ifax.com:5000/ifax-docker-centos:7 tags: - linux - docker dependencies: - targz_build script: - yum install -y rpm-build yum-utils # Required for Centos 5 macros: - test -f /etc/rpm/macros.dist || yum install -y buildsys-macros - mkdir -p rpmbuild/{RPMS,SOURCES,SPECS,SRPMS} - ln -s .. rpmbuild/BUILD - VERSION=`cat VERSION` - cp -v hylafax-$VERSION.tar.gz rpmbuild/SOURCES - rpmbuild --define "_topdir $CI_PROJECT_DIR/rpmbuild" --define "dist .${dist}" --nodeps -bs rpm/hylafax.spec - mv rpmbuild/SRPMS/*.rpm . artifacts: paths: - ./*.rpm .rpm_build: &rpm_build tags: - linux - docker dependencies: - targz_build - srpm_build script: # Add Development repository: - file=/etc/yum.repos.d/build.repo - yum install -y rpm-build yum-utils # Required for Centos 5 macros: - test -f /etc/rpm/macros.dist || yum install -y buildsys-macros - mkdir -p rpmbuild/{RPMS,SOURCES,SPECS,SRPMS} - ln -s .. rpmbuild/BUILD - VERSION=`cat VERSION` - cp -v hylafax-$VERSION.tar.gz rpmbuild/SOURCES # Centos 5 yum-builddep can't work directly with spec file # We'll remove this hack for when Centos 5 support will be removed - rpmbuild --define "_topdir $CI_PROJECT_DIR/rpmbuild" --define "dist .${dist}" --nodeps -bs rpm/hylafax.spec - yum-builddep -y rpmbuild/SRPMS/hylafax*.src.rpm - rpmbuild --rebuild --define "_topdir $CI_PROJECT_DIR/rpmbuild" --define "dist .${dist}" -bb rpmbuild/SRPMS/hylafax-*.src.rpm - mv rpmbuild/RPMS/$arch/*.rpm . - rm *.src.rpm artifacts: paths: - ./*.rpm centos7-x86_64_rpm_build: stage: rpm_build image: katello.corp.ifax.com:5000/ifax-docker-centos:7 variables: dist: "el7" arch: "x86_64" <<: *rpm_build centos6-x86_64_rpm_build: stage: rpm_build image: katello.corp.ifax.com:5000/ifax-docker-centos:6 variables: dist: "el6" arch: "x86_64" <<: *rpm_build centos6-i686_rpm_build: stage: rpm_build image: katello.corp.ifax.com:5000/ifax-docker-centos-i386:centos6 variables: dist: "el6" arch: "i686" <<: *rpm_build centos5-i386_rpm_build: stage: rpm_build image: katello.corp.ifax.com:5000/ifax-docker-centos-i386:centos5 variables: dist: "el5" arch: "i386" <<: *rpm_build