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; clojure_cli;1.9.0.381;
cmake;3.12.2; cmake;3.12.2;
conan;1.9.0; conan;1.9.0;
golang;1.10.2;
leiningen;2.8.1; leiningen;2.8.1;
maven;3.5.2; maven;3.5.2;
node;10.12.0; node;10.12.0;

View File

@ -4,7 +4,7 @@ pipeline {
docker { docker {
label 'linux-new' label 'linux-new'
/* WARNING: remember to keep this up-to-date with the value in docker/linux/Makefile */ /* 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 ( args (
"--privileged "+ "--privileged "+
"-v /dev/fuse:/dev/fuse "+ "-v /dev/fuse:/dev/fuse "+

View File

@ -4,7 +4,7 @@ pipeline {
docker { docker {
label 'linux-new' label 'linux-new'
/* WARNING: remember to keep this up-to-date with the value in docker/windows/Makefile */ /* 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 ( args (
"--privileged "+ "--privileged "+
"-v /dev/fuse:/dev/fuse "+ "-v /dev/fuse:/dev/fuse "+

View File

@ -1,7 +1,7 @@
# This image is only for extracting and cleaning up NDK and SDK # This image is only for extracting and cleaning up NDK and SDK
ARG BASE_IMAGE_TAG 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_NDK_VERSION
ARG ANDROID_SDK_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 && 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_NDK_VERSION
ARG ANDROID_SDK_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) GIT_ROOT = $(shell git rev-parse --show-toplevel)
ANDROID_NDK_VERSION = $(call __toolversion, android-ndk) 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_ARCHIVE = android-ndk-$(ANDROID_NDK_VERSION)-linux-x86_64.zip
ANDROID_NDK_URL = https://dl.google.com/android/repository/$(ANDROID_NDK_ARCHIVE) ANDROID_NDK_URL = https://dl.google.com/android/repository/$(ANDROID_NDK_ARCHIVE)
ANDROID_SDK_VERSION = $(call __toolversion, android-sdk) 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_URL = https://dl.google.com/android/repository/sdk-tools-linux-$(ANDROID_SDK_VERSION).zip
ANDROID_SDK_ARCHIVE = 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) SDK_BUILD_TOOLS_VERSION=$(call __toolversion, android-sdk-build-tools)
# WARNING: Remember to change the tag when updating the image # WARNING: Remember to change the tag when updating the image
BASE_IMAGE_TAG = $(shell cd ../base && make get-image-tag) 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) 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_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-android:$(IMAGE_TAG) IMAGE_NAME = statusteam/status-build-android:$(IMAGE_TAG)
build: $(ANDROID_NDK_ARCHIVE) $(ANDROID_SDK_ARCHIVE) build: $(ANDROID_NDK_ARCHIVE) $(ANDROID_SDK_ARCHIVE)
docker build \ docker build \
--build-arg="BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)" \
--build-arg="ANDROID_NDK_VERSION=$(ANDROID_NDK_VERSION)" \ --build-arg="ANDROID_NDK_VERSION=$(ANDROID_NDK_VERSION)" \
--build-arg="ANDROID_SDK_VERSION=$(ANDROID_SDK_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_BUILD_TOOLS_VERSION=$(SDK_BUILD_TOOLS_VERSION)" \
--build-arg="SDK_PLATFORM_VERSION=$(SDK_PLATFORM_VERSION)" \
--label="commit=$(GIT_COMMIT)" \ --label="commit=$(GIT_COMMIT)" \
-t $(IMAGE_NAME) . -t $(IMAGE_NAME) .

View File

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

View File

@ -1,10 +1,10 @@
ARG BASE_IMAGE_TAG 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 QT_VERSION
ARG RNATIVE_VERSION
ARG QT_CI_COMMIT ARG QT_CI_COMMIT
ARG RNATIVE_VERSION
ENV XDG_RUNTIME_DIR=/tmp/runtime-root ENV XDG_RUNTIME_DIR=/tmp/runtime-root
@ -38,7 +38,7 @@ RUN mkdir -p /tmp/qtci \
'.*\/(qdoc|qgltf|linguist|designer|assistant|qhelpconverter|qmlprofiler)$' -delete \ '.*\/(qdoc|qgltf|linguist|designer|assistant|qhelpconverter|qmlprofiler)$' -delete \
&& rm -fr ${XDG_RUNTIME_DIR} && 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 QT_VERSION
ARG CMAKE_VERSION ARG CMAKE_VERSION
@ -50,15 +50,14 @@ RUN ln -s /opt/qt/mkspecs /usr/local/mkspecs \
# We have to do this because Jenkins doesn't let us # We have to do this because Jenkins doesn't let us
# https://issues.jenkins-ci.org/browse/JENKINS-49076 # https://issues.jenkins-ci.org/browse/JENKINS-49076
ARG NODE_VERSION 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 \ RUN apt-get update \
&& add-apt-repository -y ppa:git-core/ppa \ && add-apt-repository -y ppa:git-core/ppa \
&& add-apt-repository -y ppa:longsleep/golang-backports \
&& apt-get update \ && apt-get update \
&& DEBIAN_FRONTEND=noninteractive \ && DEBIAN_FRONTEND=noninteractive \
apt-get -q -y --no-install-recommends install \ apt-get -q -y --no-install-recommends install \
golang-go python python3-pip python3-setuptools python3-wheel \ python python3-pip python3-setuptools python3-wheel \
apt-transport-https openjdk-8-jdk-headless \ apt-transport-https openjdk-8-jdk-headless \
extra-cmake-modules build-essential gcc g++ fuse \ extra-cmake-modules build-essential gcc g++ fuse \
libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \ libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \
@ -72,6 +71,12 @@ RUN cd /tmp \
&& rm -fr /usr/local/doc/cmake \ && rm -fr /usr/local/doc/cmake \
&& rm cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && 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 \ RUN mkdir -p /tmp/react-native-desktop \
&& cd /tmp/react-native-desktop \ && cd /tmp/react-native-desktop \
&& git init \ && git init \
@ -85,6 +90,6 @@ RUN mkdir -p /tmp/react-native-desktop \
&& cd \ && cd \
&& rm -r /tmp/react-native-desktop && 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." \ description="Image for building Linux Desktop version of Status app." \
maintainer="jakub@status.im" 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) GIT_ROOT = $(shell git rev-parse --show-toplevel)
QT_VERSION = $(call __toolversion, qt) 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_ARCHIVE = qt-opensource-linux-x64-$(QT_VERSION).run
QT_URL = https://download.qt.io/archive/qt QT_URL = https://download.qt.io/archive/qt
# WARNING: Remember to update `ci/Jenkinsfile.*` with the same IMAGE_TAG value # WARNING: Remember to update `ci/Jenkinsfile.*` with the same IMAGE_TAG value
BASE_IMAGE_TAG = $(shell cd ../base && make get-image-tag) 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 node -d qt -d qtci -d react_native_desktop) 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_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-linux:$(IMAGE_TAG) IMAGE_NAME = statusteam/status-build-linux:$(IMAGE_TAG)
@ -22,11 +22,12 @@ build: $(QT_ARCHIVE)
fi fi
docker build \ docker build \
--build-arg="BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)" \ --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="NODE_VERSION=$(call __toolversion, node)" \
--build-arg="QT_VERSION=$(QT_VERSION)" \ --build-arg="QT_VERSION=$(QT_VERSION)" \
--build-arg="QT_CI_COMMIT=$(call __toolversion, qtci)" \ --build-arg="QT_CI_COMMIT=$(call __toolversion, qtci)" \
--build-arg="RNATIVE_VERSION=$(call __toolversion, react_native_desktop)" \ --build-arg="RNATIVE_VERSION=$(call __toolversion, react_native_desktop)" \
--build-arg="CMAKE_VERSION=$(call __toolversion, cmake)" \
--label="commit=$(GIT_COMMIT)" \ --label="commit=$(GIT_COMMIT)" \
-t $(IMAGE_NAME) . -t $(IMAGE_NAME) .

View File

@ -1,17 +1,19 @@
ARG BASE_IMAGE_TAG 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 RNATIVE_VERSION
ARG CONAN_VERSION ARG CONAN_VERSION
ARG CMAKE_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 \ RUN add-apt-repository -y ppa:git-core/ppa \
&& add-apt-repository -y ppa:longsleep/golang-backports \
&& apt-get update \ && apt-get update \
&& DEBIAN_FRONTEND=noninteractive \ && DEBIAN_FRONTEND=noninteractive \
apt-get -q -y --no-install-recommends install \ apt-get -q -y --no-install-recommends install \
nsis fuse golang-go python python3-pip python3-setuptools python3-wheel \ nsis fuse python python3-pip python3-setuptools python3-wheel \
apt-transport-https openjdk-8-jdk-headless extra-cmake-modules build-essential \ apt-transport-https openjdk-8-jdk-headless extra-cmake-modules build-essential \
libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \ libx11-xcb1 libxss1 libasound2 libgl-dev libsm6 libxrandr2 python-dev \
libjasper-dev libegl1-mesa libxcomposite-dev libxcursor-dev \ libjasper-dev libegl1-mesa libxcomposite-dev libxcursor-dev \
@ -26,6 +28,11 @@ RUN cd /tmp \
&& rm -fr /usr/local/doc/cmake \ && rm -fr /usr/local/doc/cmake \
&& rm cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && 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 \ RUN mkdir -p /tmp/react-native-desktop \
&& cd /tmp/react-native-desktop \ && cd /tmp/react-native-desktop \
&& git --version \ && git --version \
@ -40,6 +47,6 @@ RUN mkdir -p /tmp/react-native-desktop \
&& cd \ && cd \
&& rm -r /tmp/react-native-desktop && 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." \ description="Image for building Windows Desktop version of Status app." \
maintainer="jakub@status.im" 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) GIT_ROOT = $(shell git rev-parse --show-toplevel)
# WARNING: Remember to update `ci/Jenkinsfile.*` with the same IMAGE_TAG value # WARNING: Remember to update `ci/Jenkinsfile.*` with the same IMAGE_TAG value
BASE_IMAGE_TAG = $(shell cd ../base && make get-image-tag) 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 react_native_desktop) 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_TAG = 1.1.0-$(DEPS_HASH)
IMAGE_NAME = statusteam/status-build-windows:$(IMAGE_TAG) IMAGE_NAME = statusteam/status-build-windows:$(IMAGE_TAG)
@ -17,9 +17,11 @@ build:
docker build \ docker build \
--build-arg="BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)" \ --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="CONAN_VERSION=$(call __toolversion, conan)" \
--build-arg="CMAKE_VERSION=$(call __toolversion, cmake)" \ --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)" \ --label="commit=$(GIT_COMMIT)" \
-t $(IMAGE_NAME) . -t $(IMAGE_NAME) .