Browse Source

Merge remote-tracking branch 'LE/release-v0.13.x' into HEAD

pull/7336/head
David Canas 1 year ago
parent
commit
a6f55fc438
  1. 19
      .buildkite/build_windows_installer.sh
  2. 14
      .buildkite/pipeline.yml
  3. 7
      .buildkite/sign_windows_installer.bat
  4. 9
      Makefile
  5. 38
      docker/build_windows.dockerfile

19
.buildkite/build_windows_installer.sh

@ -1,19 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# Goto location of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Go to parent path (where kolibri sources are assumed to live)
cd "$DIR"
cd ..
PARENT_PATH=`pwd`
cd "$PARENT_PATH"
mkdir -p dist
buildkite-agent artifact download 'dist/*.whl' dist/
make docker-windows
buildkite-agent artifact upload './dist/*.exe'

14
.buildkite/pipeline.yml

@ -26,9 +26,6 @@ steps:
LE_TRIGGERED_FROM_JOB_ID: "${BUILDKITE_JOB_ID}"
LE_KOLIBRI_RELEASE: "${BUILDKITE_TAG:-false}"
- label: Build Windows installer
command: .buildkite/build_windows_installer.sh
- trigger: "kolibri-debian"
label: ":debian:"
key: deb-build
@ -41,6 +38,17 @@ steps:
# Autoblock unless there's a tag associated with the commit. Usually a release.
LE_KOLIBRI_RELEASE: "${BUILDKITE_TAG:-false}"
- trigger: "kolibri-windows"
label: ":windows:"
build:
message: "${BUILDKITE_MESSAGE}"
env:
LE_TRIGGERED_FROM_BUILD_ID: "${BUILDKITE_BUILD_ID}"
LE_TRIGGERED_FROM_JOB_ID: "${BUILDKITE_JOB_ID}"
# Determines whether build will be autoblocked or not.
# Autoblock unless there's a tag associated with the commit. Usually a release.
LE_KOLIBRI_RELEASE: "${BUILDKITE_TAG:-false}"
- trigger: "kolibri-raspbian-image"
label: ":raspberry-pi:"
build:

7
.buildkite/sign_windows_installer.bat

@ -1,7 +0,0 @@
@echo off
rem This script will download and sign the Kolibri Windows installer artifact build from the "Build Windows installer" Buildkite pipeline step.
rem The signed Windows installer artifact will be uploaded at the "Sign Windows installer" Buildkite step
set current_path=%cd%
buildkite-agent.exe artifact download "dist/*.exe" . --step "Build Windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\dist" && cd "%current_path%\dist\" && ren *.exe *-signed.exe && buildkite-agent.exe artifact upload "*.exe"

9
Makefile

@ -1,5 +1,5 @@
# List most target names as 'PHONY' to prevent Make from thinking it will be creating a file of the same name
.PHONY: help clean clean-assets clean-build clean-pyc clean-docs lint test test-all assets coverage docs release test-namespaced-packages staticdeps staticdeps-cext writeversion setrequirements buildconfig pex i18n-extract-frontend i18n-extract-backend i18n-transfer-context i18n-extract i18n-django-compilemessages i18n-upload i18n-pretranslate i18n-pretranslate-approve-all i18n-download i18n-regenerate-fonts i18n-stats i18n-install-font i18n-download-translations i18n-download-glossary i18n-upload-glossary docker-whl docker-windows docker-demoserver docker-devserver docker-envlist
.PHONY: help clean clean-assets clean-build clean-pyc clean-docs lint test test-all assets coverage docs release test-namespaced-packages staticdeps staticdeps-cext writeversion setrequirements buildconfig pex i18n-extract-frontend i18n-extract-backend i18n-transfer-context i18n-extract i18n-django-compilemessages i18n-upload i18n-pretranslate i18n-pretranslate-approve-all i18n-download i18n-regenerate-fonts i18n-stats i18n-install-font i18n-download-translations i18n-download-glossary i18n-upload-glossary docker-whl docker-demoserver docker-devserver docker-envlist
help:
@echo "Usage:"
@ -252,13 +252,6 @@ docker-whl: writeversion docker-envlist
"learningequality/kolibri-whl"
git checkout -- ./docker/env.list # restore env.list file
docker-windows: writeversion docker-envlist
@echo "\n !! This assumes you have run 'make dockerenvdist' or 'make dist' !!\n"
docker image build -t "learningequality/kolibri-windows" -f docker/build_windows.dockerfile .
export KOLIBRI_VERSION=$$(cat kolibri/VERSION) && \
docker run --env-file ./docker/env.list -v $$PWD/dist:/kolibridist "learningequality/kolibri-windows"
git checkout -- ./docker/env.list # restore env.list file
docker-build-base: writeversion
docker image build . \
-f docker/base.dockerfile \

38
docker/build_windows.dockerfile

@ -1,38 +0,0 @@
FROM ubuntu:bionic
# Install wine and related packages
RUN dpkg --add-architecture i386
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
git-lfs \
sudo \
software-properties-common \
ttf-mscorefonts-installer \
wine-stable \
wine32
RUN git lfs install
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
ttf-mscorefonts-installer \
wine-stable \
make \
wget
# TODO(cpauya): Verify the checksums of the downloaded Python installers.
# Build the Kolibri Windows installer
CMD git clone https://github.com/learningequality/kolibri-installer-windows.git && \
cd kolibri-installer-windows && \
git checkout $KOLIBRI_WINDOWS_INSTALLER_VERSION && \
cd src && \
cp /kolibridist/kolibri-$KOLIBRI_VERSION*.whl . && \
export KOLIBRI_BUILD_VERSION=$KOLIBRI_VERSION && \
make && \
wine inno-compiler/ISCC.exe installer-source/KolibriSetupScript.iss && \
mv *.exe kolibri-$KOLIBRI_VERSION-unsigned.exe && \
cp *.exe /kolibridist/
Loading…
Cancel
Save