Browse Source

add shipyard configuration files

4.3
karl anderson 6 years ago
parent
commit
50848e013e
3 changed files with 145 additions and 0 deletions
  1. +1
    -0
      .base_branch
  2. +126
    -0
      .circleci/config.yml
  3. +18
    -0
      .shipyard.yml

+ 1
- 0
.base_branch View File

@ -0,0 +1 @@
origin/4.3

+ 126
- 0
.circleci/config.yml View File

@ -0,0 +1,126 @@
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/monster-ui-packager: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/monster-ui"
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: Getting base branch
command: |
BAZE="$(cat "${HOME}/2600hz/the_app/.base_branch")"
if [ -n "$BAZE" ]; then
echo -e "\n\nexport BASE_BRANCH=$BAZE" >> $BASH_ENV
else
echo "add base branch name of main Monster-UI repo (like origin/master) to '.base_branch' in your application root directory"
exit 1
fi
- run:
name: Setting up Directories
command: |
APP=${CIRCLE_PROJECT_REPONAME#monster-ui-}
echo -e "export MONSTER_APP=${APP}\n" >> $BASH_ENV
echo -e "export APP=${APP}\n" >> $BASH_ENV
echo -e "export MONSTER_ROOT=${HOME}/2600hz/monster-ui" >> $BASH_ENV
echo -e "export APP_PATH=src/apps/${APP}\n\n" >> $BASH_ENV
- run:
name: Verify directories
command: |
echo ":: behold, running ci tests for application: $MONSTER_APP"
echo "MONSTER_ROOT: $MONSTER_ROOT"
echo "APP_PATH: $APP_PATH"
echo "BASE_BRANCH: $BASE_BRANCH"
if [ ! -d ${MONSTER_ROOT} ]; then
git clone https://github.com/2600hz/monster-ui $MONSTER_ROOT
fi
- run:
name: Running base setup script
command: ${MONSTER_ROOT}/scripts/circleci.bash
- restore_cache:
key: dependency-cache-centos-{{ checksum "/home/circleci/2600hz/monster-ui/package-lock.json" }}
paths:
-/home/circle/2600hz/monster-ui/node_modules
- run:
name: Install dependencies from package.json
command: |
cd $MONSTER_ROOT
npm install
- run:
name: Run a production build
command: |
cd $MONSTER_ROOT
gulp build-app --app=${APP}
- 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: Preparing source
command: |
cd $BUILD_ROOT
./package_docs
cd $BUILD_SOURCES
echo " - copy build into artifacts"
cp -R ${MONSTER_ROOT}/dist/apps/${MONSTER_APP} ${BUILD_SOURCES}/
echo " - generate build version and changelog"
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
- save_cache:
key: dependency-cache-centos-{{ checksum "/home/circleci/2600hz/monster-ui/package-lock.json" }}
paths:
- /home/circle/2600hz/monster-ui/node_modules

+ 18
- 0
.shipyard.yml View File

@ -0,0 +1,18 @@
---
name: monster-ui-application-voip
base_branch: origin/4.3
metapackage:
- name: meta-monster-ui
branch: "4.3"
package: monster-ui-application-voip
type: required
base_core: monster-ui
template: monster-ui-application.spec.tmpl
package:
centos7:
name: monster-ui-application-voip
app_name: voip
license: "MPL 2.0"
group: Productivity/Telephony
url: http://www.2600hz.org/
vendor: 2600Hz

Loading…
Cancel
Save