Skip to content

Commit

Permalink
build "devel" packages
Browse files Browse the repository at this point in the history
  • Loading branch information
winmillwill committed Aug 5, 2019
1 parent 843c7dd commit e9e6178
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 2 deletions.
60 changes: 60 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,50 @@ jobs:
command: BUILD_VERSIONS=28 bash scripts/docker-outer.sh
- *persist_to_workspace

build-test-22-devel:
executor: python-executor
steps:
- checkout
- setup_remote_docker
- run:
name: Install cpplint
command: sudo pip install cpplint
- run:
name: Set up version
command: bash scripts/version.sh
- run:
name: Call cpplint; expected to fail, so set things up to pass
command: |
set +eo pipefail
/usr/local/bin/cpplint --filter=-whitespace/line_length src/*
true
- run:
name: Build the packages
command: BUILD_VERSIONS=22 DEVEL=-devel bash scripts/docker-outer.sh
- *persist_to_workspace

build-test-28-devel:
executor: python-executor
steps:
- checkout
- setup_remote_docker
- run:
name: Install cpplint
command: sudo pip install cpplint
- run:
name: Set up version
command: bash scripts/version.sh
- run:
name: Call cpplint; expected to fail, so set things up to pass
command: |
set +eo pipefail
/usr/local/bin/cpplint --filter=-whitespace/line_length src/*
true
- run:
name: Build the packages
command: BUILD_VERSIONS=28 DEVEL=-devel bash scripts/docker-outer.sh
- *persist_to_workspace

deploy-dev:
executor: ruby-executor
steps:
Expand Down Expand Up @@ -94,6 +138,22 @@ workflows:
jobs:
- build-test-22
- build-test-28
- build-test-22-devel:
filters:
branches:
ignore:
- dev
- yolo
- stage
- master
- build-test-28-devel:
filters:
branches:
ignore:
- dev
- yolo
- stage
- master
- deploy-dev:
requires:
- build-test-22
Expand Down
12 changes: 11 additions & 1 deletion scripts/docker-inner.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
#
set -ex
Expand All @@ -14,6 +14,11 @@ rpm_dir=$2
build=$3
epoch=$4

devel=
if [[ "$fusedav_channel" == *-devel ]]; then
devel=true
fi

fedora_release=$(rpm -q --queryformat '%{VERSION}\n' fedora-release)
GITSHA=$(git log -1 --format="%h")
name="fusedav-$fusedav_channel"
Expand Down Expand Up @@ -64,6 +69,11 @@ if [ "1" != "$?" ] ; then
fi
set -e

# just a way to pack sources and tests into the rpm
if [[ -n $devel ]]; then
cp -r -t $install_prefix src tests
fi

mv /usr/local/bin/fusedav $install_prefix/$name
cp $bin/exec_wrapper/mount.fusedav_chan /usr/sbin/mount.$name
chmod 755 /usr/sbin/mount.$name
Expand Down
4 changes: 3 additions & 1 deletion scripts/docker-outer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN_ARGS="--rm"
# set a default build -> 0 for when it doesn't exist
CIRCLE_BUILD_NUM=${CIRCLE_BUILD_NUM:-0}

DEVEL=${DEVEL:-}

# location to mount the source in the container
inner_mount="/fusedav"

Expand All @@ -33,7 +35,7 @@ for ver in $BUILD_VERSIONS; do
$docker pull $build_image

channel=$(tr -d "\n\r" < $bin/../CHANNEL)
exec_cmd="$inner_mount/scripts/docker-inner.sh $channel $inner_mount/pkg $CIRCLE_BUILD_NUM $epoch"
exec_cmd="$inner_mount/scripts/docker-inner.sh $channel$DEVEL $inner_mount/pkg $CIRCLE_BUILD_NUM $epoch"
if [ -n "$BUILD_DEBUG" ] ; then
RUN_ARGS="$RUN_ARGS -ti "
exec_cmd="/bin/bash"
Expand Down

0 comments on commit e9e6178

Please sign in to comment.