Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.

Commit 2296d3b

Browse files
committed
Add utility scripts for building packages under travis
Signed-off-by: John Else <john.else@citrix.com>
1 parent 648e575 commit 2296d3b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
set -eux
4+
5+
REPO_PATH=$1
6+
REPO=`basename $REPO_PATH`
7+
8+
cp -r $REPO_PATH .
9+
cd $REPO
10+
11+
eval $REPO_CONFIGURE_CMD
12+
eval $REPO_BUILD_CMD
13+
eval $REPO_TEST_CMD

utils/travis-build-repo.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
3+
# This script is intended to called from inside a git repo by travis.
4+
# It will download travis-build-repo-internal.sh and run.py, launch a
5+
# xenserver-build-env container with the git repo mounted, and will finally
6+
# run the script travis-build-repo-internal.sh inside the container.
7+
#
8+
# travis-build-repo.sh expects a package name as the first argument; this will
9+
# be used to install dependencies inside the container.
10+
11+
set -eux
12+
13+
BUILDENV_USER=${BUILDENV_USER:-xenserver}
14+
BUILDENV_BRANCH=${BUILDENV_BRANCH:-master}
15+
16+
wget https://raw.githubusercontent.com/${BUILDENV_USER}/xenserver-build-env/${BUILDENV_BRANCH}/run.py
17+
wget https://raw.githubusercontent.com/${BUILDENV_USER}/xenserver-build-env/${BUILDENV_BRANCH}/utils/travis-build-repo-internal.sh
18+
19+
REPO=`basename $PWD`
20+
REPO_PATH=/repos/$REPO
21+
22+
REPO_CONFIGURE_CMD=${REPO_CONFIGURE_CMD:-./configure}
23+
REPO_BUILD_CMD=${REPO_BUILD_CMD:-make}
24+
REPO_TEST_CMD=${REPO_TEST_CMD:-make test}
25+
26+
python run.py -p $REPO_PACKAGE_NAME --rm \
27+
-e "REPO_CONFIGURE_CMD=$REPO_CONFIGURE_CMD" \
28+
-e "REPO_BUILD_CMD=$REPO_BUILD_CMD" \
29+
-e "REPO_TEST_CMD=$REPO_TEST_CMD" \
30+
-v $PWD:$REPO_PATH \
31+
sh $REPO_PATH/travis-build-repo-internal.sh $REPO_PATH

0 commit comments

Comments
 (0)