From e9e61780da1ea84012a44de5c11412fdc3ad40da Mon Sep 17 00:00:00 2001 From: Will Milton Date: Mon, 5 Aug 2019 13:26:15 +0000 Subject: [PATCH] build "devel" packages --- .circleci/config.yml | 60 +++++++++++++++++++++++++++++++++++++++++ scripts/docker-inner.sh | 12 ++++++++- scripts/docker-outer.sh | 4 ++- 3 files changed, 74 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7af29ae3..2600b274 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: @@ -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 diff --git a/scripts/docker-inner.sh b/scripts/docker-inner.sh index 9e14c7f9..6c963605 100755 --- a/scripts/docker-inner.sh +++ b/scripts/docker-inner.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # set -ex @@ -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" @@ -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 diff --git a/scripts/docker-outer.sh b/scripts/docker-outer.sh index aacba7e5..29eae49a 100755 --- a/scripts/docker-outer.sh +++ b/scripts/docker-outer.sh @@ -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" @@ -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"