Add golang to `.TOOLVERSIONS` and fix md5 calculation

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
Pedro Pombeiro 2019-02-01 00:17:55 +01:00
parent fe7c7088db
commit 6d3211de46
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647
10 changed files with 56 additions and 35 deletions

View File

@ -5,6 +5,7 @@ android-sdk;4333796;aa190cfd7299cd6a1c687355bb2764e4
clojure_cli;1.9.0.381;
cmake;3.12.2;
conan;1.9.0;
golang;1.10.2;
leiningen;2.8.1;
maven;3.5.2;
node;10.12.0;

View File

@ -4,7 +4,7 @@ pipeline {
docker {
label 'linux-new'
/* WARNING: remember to keep this up-to-date with the value in docker/linux/Makefile */
image 'statusteam/status-build-linux:1.1.0-f653fffb'
image 'statusteam/status-build-linux:1.1.0-2a35dcde'
args (
"--privileged "+
"-v /dev/fuse:/dev/fuse "+

View File

@ -4,7 +4,7 @@ pipeline {
docker {
label 'linux-new'
/* WARNING: remember to keep this up-to-date with the value in docker/windows/Makefile */
image 'statusteam/status-build-windows:1.1.0-c37b3fa2'
image 'statusteam/status-build-windows:1.1.0-fb116054'
args (
"--privileged "+
"-v /dev/fuse:/dev/fuse "+

View File

@ -1,7 +1,7 @@
# This image is only for extracting and cleaning up NDK and SDK
ARG BASE_IMAGE_TAG
FROM statusteam/status-build-base:1.1.0-${BASE_IMAGE_TAG} AS sdk_and_ndk
FROM statusteam/status-build-base:${BASE_IMAGE_TAG} AS sdk_and_ndk
ARG ANDROID_NDK_VERSION
ARG ANDROID_SDK_VERSION
@ -40,7 +40,7 @@ RUN cd /usr/lib/android-ndk && rm -fr docs tests samples \
&& find sources -mindepth 2 -maxdepth 2 | grep -v 'gnu-libstdc' | xargs rm -fr
################################################################################
FROM statusteam/status-build-base:1.1.0-${BASE_IMAGE_TAG}
FROM statusteam/status-build-base:${BASE_IMAGE_TAG}
ARG ANDROID_NDK_VERSION
ARG ANDROID_SDK_VERSION

View File

@ -4,12 +4,12 @@ GIT_COMMIT = $(shell git rev-parse --short HEAD)
GIT_ROOT = $(shell git rev-parse --show-toplevel)
ANDROID_NDK_VERSION = $(call __toolversion, android-ndk)
ANDROID_NDK_CHECKSUM = $(call __toolversion, android-ndk_md5)
ANDROID_NDK_CHECKSUM = $(call __toolversion, -c android-ndk)
ANDROID_NDK_ARCHIVE = android-ndk-$(ANDROID_NDK_VERSION)-linux-x86_64.zip
ANDROID_NDK_URL = https://dl.google.com/android/repository/$(ANDROID_NDK_ARCHIVE)
ANDROID_SDK_VERSION = $(call __toolversion, android-sdk)
ANDROID_SDK_CHECKSUM = $(call __toolversion, android-sdk_md5)
ANDROID_SDK_CHECKSUM = $(call __toolversion, -c android-sdk)
ANDROID_SDK_URL = https://dl.google.com/android/repository/sdk-tools-linux-$(ANDROID_SDK_VERSION).zip
ANDROID_SDK_ARCHIVE = sdk-tools-linux-$(ANDROID_SDK_VERSION).zip
@ -17,17 +17,22 @@ SDK_PLATFORM_VERSION=$(call __toolversion, android-sdk-platform)
SDK_BUILD_TOOLS_VERSION=$(call __toolversion, android-sdk-build-tools)
# WARNING: Remember to change the tag when updating the image
BASE_IMAGE_TAG = $(shell cd ../base && make get-image-tag)
DEPS_HASH = $(shell $(GIT_ROOT)/scripts/gen-deps-hash.sh -b $(BASE_IMAGE_TAG) -d android-ndk -d android-sdk -d android-sdk-platform -d android-sdk-build-tools)
BASE_IMAGE_TAG = $(shell cd $(GIT_ROOT)/docker/base && make get-image-tag)
DEPS_HASH = $(shell $(GIT_ROOT)/scripts/gen-deps-hash.sh -b $(BASE_IMAGE_TAG) \
-d android-ndk \
-d android-sdk \
-d android-sdk-platform \
-d android-sdk-build-tools)
IMAGE_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-android:$(IMAGE_TAG)
build: $(ANDROID_NDK_ARCHIVE) $(ANDROID_SDK_ARCHIVE)
docker build \
--build-arg="BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)" \
--build-arg="ANDROID_NDK_VERSION=$(ANDROID_NDK_VERSION)" \
--build-arg="ANDROID_SDK_VERSION=$(ANDROID_SDK_VERSION)" \
--build-arg="SDK_PLATFORM_VERSION=$(SDK_PLATFORM_VERSION)" \
--build-arg="SDK_BUILD_TOOLS_VERSION=$(SDK_BUILD_TOOLS_VERSION)" \
--build-arg="SDK_PLATFORM_VERSION=$(SDK_PLATFORM_VERSION)" \
--label="commit=$(GIT_COMMIT)" \
-t $(IMAGE_NAME) .

View File

@ -9,7 +9,7 @@ IMAGE_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-base:$(IMAGE_TAG)
get-image-tag:
@echo $(DEPS_HASH)
@echo $(IMAGE_TAG)
build: nvm_install.sh
docker build \

View File

@ -1,10 +1,10 @@
ARG BASE_IMAGE_TAG
FROM statusteam/status-build-base:1.1.0-${BASE_IMAGE_TAG} AS qt_build
FROM statusteam/status-build-base:${BASE_IMAGE_TAG} AS qt_build
ARG QT_VERSION
ARG RNATIVE_VERSION
ARG QT_CI_COMMIT
ARG RNATIVE_VERSION
ENV XDG_RUNTIME_DIR=/tmp/runtime-root
@ -38,7 +38,7 @@ RUN mkdir -p /tmp/qtci \
'.*\/(qdoc|qgltf|linguist|designer|assistant|qhelpconverter|qmlprofiler)$' -delete \
&& rm -fr ${XDG_RUNTIME_DIR}
FROM statusteam/status-build-base:1.1.0-${BASE_IMAGE_TAG}
FROM statusteam/status-build-base:${BASE_IMAGE_TAG}
ARG QT_VERSION
ARG CMAKE_VERSION
@ -50,19 +50,18 @@ RUN ln -s /opt/qt/mkspecs /usr/local/mkspecs \
# We have to do this because Jenkins doesn't let us
# https://issues.jenkins-ci.org/browse/JENKINS-49076
ARG NODE_VERSION
ENV PATH=/opt/qt/bin:/home/jenkins/.nvm/versions/node/v${NODE_VERSION}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH=/opt/qt/bin:/home/jenkins/.nvm/versions/node/v${NODE_VERSION}/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN apt-get update \
&& add-apt-repository -y ppa:git-core/ppa \
&& add-apt-repository -y ppa:longsleep/golang-backports \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get -q -y --no-install-recommends install \
golang-go python python3-pip python3-setuptools python3-wheel \
apt-transport-https openjdk-8-jdk-headless \
extra-cmake-modules build-essential gcc g++ fuse \
libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \
libjasper-dev libegl1-mesa libxcomposite-dev libxcursor-dev \
python python3-pip python3-setuptools python3-wheel \
apt-transport-https openjdk-8-jdk-headless \
extra-cmake-modules build-essential gcc g++ fuse \
libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \
libjasper-dev libegl1-mesa libxcomposite-dev libxcursor-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man
@ -72,6 +71,12 @@ RUN cd /tmp \
&& rm -fr /usr/local/doc/cmake \
&& rm cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
ARG GOLANG_VERSION
RUN cd /tmp \
&& wget -q https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& rm go${GOLANG_VERSION}.linux-amd64.tar.gz
RUN mkdir -p /tmp/react-native-desktop \
&& cd /tmp/react-native-desktop \
&& git init \
@ -85,6 +90,6 @@ RUN mkdir -p /tmp/react-native-desktop \
&& cd \
&& rm -r /tmp/react-native-desktop
LABEL source="https://github.com/status-im/status-react/tree/develop/desktop/docker" \
LABEL source="https://github.com/status-im/status-react/tree/develop/docker/linux" \
description="Image for building Linux Desktop version of Status app." \
maintainer="jakub@status.im"

View File

@ -5,13 +5,13 @@ GIT_COMMIT = $(shell git rev-parse --short HEAD)
GIT_ROOT = $(shell git rev-parse --show-toplevel)
QT_VERSION = $(call __toolversion, qt)
QT_MD5SUM = $(call __toolversion, qt_md5)
QT_MD5SUM = $(call __toolversion, -c qt)
QT_ARCHIVE = qt-opensource-linux-x64-$(QT_VERSION).run
QT_URL = https://download.qt.io/archive/qt
# WARNING: Remember to update `ci/Jenkinsfile.*` with the same IMAGE_TAG value
BASE_IMAGE_TAG = $(shell cd ../base && make get-image-tag)
DEPS_HASH = $(shell $(GIT_ROOT)/scripts/gen-deps-hash.sh -b $(BASE_IMAGE_TAG) -d cmake -d node -d qt -d qtci -d react_native_desktop)
BASE_IMAGE_TAG = $(shell cd $(GIT_ROOT)/docker/base && make get-image-tag)
DEPS_HASH = $(shell $(GIT_ROOT)/scripts/gen-deps-hash.sh -b $(BASE_IMAGE_TAG) -d cmake -d golang -d node -d qt -d qtci -d react_native_desktop)
IMAGE_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-linux:$(IMAGE_TAG)
@ -22,11 +22,12 @@ build: $(QT_ARCHIVE)
fi
docker build \
--build-arg="BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)" \
--build-arg="CMAKE_VERSION=$(call __toolversion, cmake)" \
--build-arg="GOLANG_VERSION=$(call __toolversion, golang)" \
--build-arg="NODE_VERSION=$(call __toolversion, node)" \
--build-arg="QT_VERSION=$(QT_VERSION)" \
--build-arg="QT_CI_COMMIT=$(call __toolversion, qtci)" \
--build-arg="RNATIVE_VERSION=$(call __toolversion, react_native_desktop)" \
--build-arg="CMAKE_VERSION=$(call __toolversion, cmake)" \
--label="commit=$(GIT_COMMIT)" \
-t $(IMAGE_NAME) .

View File

@ -1,20 +1,22 @@
ARG BASE_IMAGE_TAG
FROM statusteam/status-build-base:1.1.0-${BASE_IMAGE_TAG}
FROM statusteam/status-build-base:${BASE_IMAGE_TAG}
ARG RNATIVE_VERSION
ARG CONAN_VERSION
ARG CMAKE_VERSION
ARG GOLANG_VERSION
ARG NODE_VERSION
ENV PATH=/home/jenkins/.nvm/versions/node/v${NODE_VERSION}/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN add-apt-repository -y ppa:git-core/ppa \
&& add-apt-repository -y ppa:longsleep/golang-backports \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get -q -y --no-install-recommends install \
nsis fuse golang-go python python3-pip python3-setuptools python3-wheel \
apt-transport-https openjdk-8-jdk-headless extra-cmake-modules build-essential \
libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \
libjasper-dev libegl1-mesa libxcomposite-dev libxcursor-dev \
nsis fuse python python3-pip python3-setuptools python3-wheel \
apt-transport-https openjdk-8-jdk-headless extra-cmake-modules build-essential \
libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \
libjasper-dev libegl1-mesa libxcomposite-dev libxcursor-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man \
&& python3 -m pip install --upgrade pip \
@ -26,6 +28,11 @@ RUN cd /tmp \
&& rm -fr /usr/local/doc/cmake \
&& rm cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
RUN cd /tmp \
&& wget -q https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& rm go${GOLANG_VERSION}.linux-amd64.tar.gz
RUN mkdir -p /tmp/react-native-desktop \
&& cd /tmp/react-native-desktop \
&& git --version \
@ -40,6 +47,6 @@ RUN mkdir -p /tmp/react-native-desktop \
&& cd \
&& rm -r /tmp/react-native-desktop
LABEL source="https://github.com/status-im/status-react/tree/develop/desktop/windows/docker" \
LABEL source="https://github.com/status-im/status-react/tree/develop/docker/windows" \
description="Image for building Windows Desktop version of Status app." \
maintainer="jakub@status.im"

View File

@ -4,8 +4,8 @@ GIT_COMMIT = $(shell git rev-parse --short HEAD)
GIT_ROOT = $(shell git rev-parse --show-toplevel)
# WARNING: Remember to update `ci/Jenkinsfile.*` with the same IMAGE_TAG value
BASE_IMAGE_TAG = $(shell cd ../base && make get-image-tag)
DEPS_HASH = $(shell $(GIT_ROOT)/scripts/gen-deps-hash.sh -b $(BASE_IMAGE_TAG) -d cmake -d conan -d react_native_desktop)
BASE_IMAGE_TAG = $(shell cd $(GIT_ROOT)/docker/base && make get-image-tag)
DEPS_HASH = $(shell $(GIT_ROOT)/scripts/gen-deps-hash.sh -b $(BASE_IMAGE_TAG) -d cmake -d conan -d golang -d node -d react_native_desktop)
IMAGE_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-windows:$(IMAGE_TAG)
@ -17,9 +17,11 @@ build:
docker build \
--build-arg="BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)" \
--build-arg="RNATIVE_VERSION=$(call __toolversion, react_native_desktop)" \
--build-arg="CONAN_VERSION=$(call __toolversion, conan)" \
--build-arg="CMAKE_VERSION=$(call __toolversion, cmake)" \
--build-arg="GOLANG_VERSION=$(call __toolversion, golang)" \
--build-arg="NODE_VERSION=$(call __toolversion, node)" \
--build-arg="RNATIVE_VERSION=$(call __toolversion, react_native_desktop)" \
--label="commit=$(GIT_COMMIT)" \
-t $(IMAGE_NAME) .