-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from 2600hz/circle-ci-builds-4.3
[4.3] config to create packages
- Loading branch information
Showing
2 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
version: 2 | ||
|
||
workflows: | ||
version: 2 | ||
build_branch: | ||
jobs: | ||
- build_centos7 | ||
|
||
build_release: | ||
jobs: | ||
- build_centos7: | ||
filters: | ||
tags: | ||
only: /^\d+\.\d+\.\d+$/ | ||
branches: | ||
ignore: /.*/ | ||
|
||
jobs: | ||
build_centos7: | ||
docker: | ||
- image: offical2600hz/metapackager:1.0-centos-7 | ||
user: circleci | ||
shell: /bin/bash --login | ||
working_directory: /home/circleci/2600hz/the_app | ||
environment: | ||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | ||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results | ||
BASH_ENV: "/home/circleci/2600hz/.bashrc" | ||
BUILD_ROOT: "/home/circleci/2600hz/packager" | ||
CORE_ROOT: "/home/circleci/2600hz/the_app" | ||
BUILD_SOURCES: "/home/circleci/2600hz/packager/SOURCES" | ||
BUILD_RPMS: "/home/circleci/2600hz/packager/RPMS" | ||
APP_DIR: "/home/circleci/2600hz/the_app" | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setting up Directories | ||
command: | | ||
APP=${CIRCLE_PROJECT_REPONAME#meta-} | ||
echo -e "export APP=${APP}\n" >> $BASH_ENV | ||
- run: | ||
name: Generating version info | ||
command: | | ||
cd $BUILD_ROOT | ||
VERSION=$(./version) | ||
RELEASE=$(./release) | ||
PACKAGE_NAME=$(./package_name) | ||
echo "export PACKAGE_NAME=${PACKAGE_NAME}" >> $BASH_ENV | ||
echo "export VERSION=${VERSION}" >> $BASH_ENV | ||
echo "export RELEASE=${RELEASE}" >> $BASH_ENV | ||
PACKAGE_NAME=$(./package_name) | ||
echo "export PACKAGE_NAME=${PACKAGE_NAME}" >> $BASH_ENV | ||
echo "build version for ${PACKAGE_NAME} version: ${VERSION} release: ${RELEASE}" | ||
- run: | ||
name: Generating CHANGELOG and VERSION files | ||
command: | | ||
cd $BUILD_ROOT | ||
echo " - generate build version and changelog" | ||
./package_docs | ||
- run: | ||
name: Preparing source for packaging | ||
command: | | ||
echo " - preparing source" | ||
cp -R ${APP_DIR}/* ${BUILD_SOURCES}/ | ||
cd $BUILD_SOURCES | ||
echo " - removing files that should not be packaged in the source tar" | ||
rm -rf ${BUILD_SOURCES}/.??* | ||
rm -rf ${BUILD_SOURCES}/doc* | ||
rm -rf ${BUILD_SOURCES}/*.md | ||
echo " - creating the source tar" | ||
cd $BUILD_ROOT | ||
ARTIFACTS_NAME=${PACKAGE_NAME}-${VERSION} | ||
mkdir -p ${ARTIFACTS_NAME} | ||
cp -r ${BUILD_SOURCES}/* ${ARTIFACTS_NAME}/. | ||
tar -cf ${ARTIFACTS_NAME}.tar ${ARTIFACTS_NAME} | ||
cp ${ARTIFACTS_NAME}.tar ${BUILD_SOURCES}/. | ||
- run: | ||
name: Building package | ||
command: | | ||
cd $BUILD_ROOT | ||
./build | ||
- store_artifacts: | ||
path: /home/circleci/2600hz/packager/RPMS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: kazoo-configs-haproxy | ||
base_branch: origin/4.3 | ||
base_core: null | ||
template: spec.tmpl | ||
package: | ||
centos7: | ||
name: kazoo-configs-haproxy | ||
group: Productivity/Telephony | ||
license: MPL1.1 | ||
build_arch: noarch | ||
build_requires: | ||
- rpm-build | ||
summary: Kazoo specific configuration for HAProxy | ||
description: | | ||
The Kazoo platform uses HAProxy primarily to proxy connetcions | ||
to the database servers to ensure they are always reachable as | ||
well as load balance. It is also used to proxy API, websockets | ||
and other services into Kazoo. This package is the minimal | ||
configuration to ensure there are no single points of failure. | ||
If you need help you can contact us via the dev mailing | ||
list or on IRC at #2600hz on FreeNode. | ||
dist: .el7.centos | ||
requires: | ||
centos7: | ||
sudo: {} | ||
source: '%{_build_tar}' | ||
prep: '%setup -q' | ||
install: | | ||
mkdir -p %{buildroot}/etc/kazoo | ||
cp -r haproxy %{buildroot}/etc/kazoo | ||
cp CHANGELOG VERSION %{buildroot}/etc/kazoo/haproxy | ||
mkdir -p %{buildroot}/usr/sbin | ||
cp -r system/sbin/* %{buildroot}/usr/sbin | ||
chmod +x %{buildroot}/usr/sbin/* | ||
mkdir -p %{buildroot}/etc/rsyslog.d | ||
rm -rf system/rsyslog.d/1-default-config-override.conf | ||
rm -rf system/rsyslog.d/5-rate-limits.conf | ||
cp -r system/rsyslog.d/*.conf %{buildroot}/etc/rsyslog.d | ||
mkdir -p %{buildroot}/etc/logrotate.d | ||
cp -r system/logrotate.d/*.conf %{buildroot}/etc/logrotate.d | ||
mkdir -p %{buildroot}/etc/security/limits.d | ||
cp -r system/security/limits.d/*.conf %{buildroot}/etc/security/limits.d | ||
mkdir -p %{buildroot}/usr/lib/systemd/system | ||
cp system/systemd/* %{buildroot}/usr/lib/systemd/system | ||
files: | ||
doc: | ||
- CHANGELOG | ||
- VERSION | ||
config: | ||
- mode: noreplace | ||
path: /etc/kazoo/haproxy | ||
- mode: noreplace | ||
path: /etc/rsyslog.d/*haproxy* | ||
- mode: noreplace | ||
path: /etc/logrotate.d/*haproxy* | ||
- mode: noreplace | ||
path: /etc/security/limits.d/*haproxy* | ||
path: | ||
- /usr/sbin/kazoo-haproxy | ||
- /usr/lib/systemd/system/kazoo-haproxy.service | ||
url: http://www.2600hz.org | ||
vendor: 2600Hz | ||
metapackage: | ||
- | ||
name: meta-kazoo-haproxy | ||
package: kazoo-configs-haproxy | ||
type: required | ||
branch: '4.3' |