forked from dcos/dcos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prep_teamcity
executable file
·38 lines (28 loc) · 1.2 KB
/
prep_teamcity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# Simple helper script to build wheels and install pkgpanda, dcos-image inside
# of CI
#
# Expects that it is being run inside of a virtual environment.
set -o errexit -o nounset -o pipefail
: ${VIRTUAL_ENV?"Must be run in a python virtual environment"}
# NOTE: If the directory already exists that is indeed a hard error. Should be
# cleaned up between builds to guarantee we get the artifacts we expect.
mkdir wheelhouse || (echo wheelhouse folder must be deleted before prep_teamcity is rerun && exit 1)
if [ -d ext/dcos-image ]
then
rm -rf ext/dcos-image
fi
# Make a clean copy of pkgpanda so the python artifacts build fast
git clone file://$PWD ext/dcos-image
git -C ext/dcos-image checkout -qf `git rev-parse --verify HEAD^{commit}`
# We have wheel as a dependency since we use it to build the wheels
pip install wheel
# Download distro independent artifacts
pip install --download wheelhouse ext/dcos-image
# Make the wheels, they will be output into the folder `wheelhouse` by default.
pip wheel --wheel-dir=wheelhouse --no-index --find-links=wheelhouse ext/dcos-image
# Install the wheels
pip install --no-index --find-links=wheelhouse dcos-image
# Cleanup the checkout
rm -rf ext/dcos-image