-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5474 from mrpau/feature/5473-build-python-package…
…s-and-pexfile-using-buildkite Build python packages and pex file using buildkite
- Loading branch information
Showing
4 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
make dockerenvdist | ||
buildkite-agent artifact upload 'dist/*.whl' | ||
buildkite-agent artifact upload 'dist/*.zip' | ||
buildkite-agent artifact upload 'dist/*.tar.gz' | ||
buildkite-agent artifact upload 'dist/*.pex' | ||
buildkite-agent artifact upload 'dist/*.exe' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
steps: | ||
- label: Build the docker environment | ||
command: make dockerenvbuild | ||
|
||
- wait | ||
|
||
- label: Build the python packages and windows installer | ||
command: mkdir -p dist && .buildkite/build_and_upload_artifact.sh && docker container prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM ubuntu:xenial | ||
|
||
# install latest python and nodejs | ||
RUN apt-get -y update | ||
RUN apt-get install -y software-properties-common curl | ||
RUN add-apt-repository ppa:voronov84/andreyv | ||
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - | ||
RUN apt-get -y update && apt-get install -y python2.7 python-pip git nodejs gettext python-sphinx wget | ||
|
||
# Install wine and related packages | ||
RUN dpkg --add-architecture i386 | ||
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates sudo software-properties-common | ||
RUN add-apt-repository -y ppa:ubuntu-wine/ppa && apt-get -y update && apt-get install --no-install-recommends --assume-yes wine | ||
|
||
|
||
COPY . /kalite | ||
VOLUME /kalitedist/ | ||
|
||
# for mounting the whl files into other docker containers | ||
RUN pip install virtualenv && virtualenv /kalite/kalite_env --python=python2.7 | ||
RUN /kalite/kalite_env/bin/pip install -r /kalite/requirements_dev.txt \ | ||
&& /kalite/kalite_env/bin/pip install -r /kalite/requirements_sphinx.txt \ | ||
&& /kalite/kalite_env/bin/pip install -e /kalite/. | ||
|
||
# Override the PATH to add the path of our virtualenv python binaries first so it's python executes instead of | ||
# the system python. | ||
ENV PATH=/kalite/kalite_env/bin:$PATH | ||
ENV KALITE_PYTHON=/kalite/kalite_env/bin/python | ||
|
||
# Installer dependencies | ||
RUN cd /kalite/ && git clone https://github.com/learningequality/ka-lite-installers.git && cd /kalite/ka-lite-installers && git checkout 0.17.x | ||
RUN cd /kalite/ka-lite-installers/windows && wget http://pantry.learningequality.org/downloads/ka-lite/0.17/content/contentpacks/en.zip | ||
|
||
# Build the python packages and the ka-lite windows installer | ||
CMD cd /kalite && make dist \ | ||
&& cd /kalite/ka-lite-installers/windows \ | ||
&& cp -R /kalite/dist/ka_lite_static-*-py2-none-any.whl /kalite/ka-lite-installers/windows \ | ||
&& export KALITE_BUILD_VERSION=$(/kalite/kalite_env/bin/kalite --version) \ | ||
&& wine inno-compiler/ISCC.exe installer-source/KaliteSetupScript.iss \ | ||
&& cp /kalite/dist/* /kalitedist/ \ | ||
&& cp /kalite/ka-lite-installers/windows/KALiteSetup-$(/kalite/kalite_env/bin/kalite --version).exe /kalitedist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters