1
0

Update Jenkinsfile, dockerfile, and setup_variables.sh

This commit is contained in:
Andrea Cavalli 2020-10-04 13:55:17 +02:00
parent 528f19961d
commit 6764bafabd
3 changed files with 55 additions and 5 deletions

9
Jenkinsfile vendored
View File

@ -22,9 +22,12 @@ pipeline {
stages {
stage("Compile C++") {
agent {
docker {
image 'dockcross/linux-x64'
args "-v $JAVA_HOME:$JAVA_HOME -v $HOME:/var/maven -v \"${env.WORKSPACE}:/workdir\" bash"
dockerfile {
dir 'jenkins/docker'
filename 'dockerfile'
label 'tdlight-java-natives-linux-aarch64'
additionalBuildArgs '--build-arg version=1.0.0'
args "-v \"${env.WORKSPACE}/tdlight-java/src/main:/output\" -v \"$HOME:/var/maven\" -v \"${env.WORKSPACE}:/work\""
reuseNode false
}
}

43
jenkins/docker/dockerfile Normal file
View File

@ -0,0 +1,43 @@
FROM debian:stable-slim
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get upgrade -y
RUN apt-get install wget -y
RUN wget https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_amd64.deb -O /tmp/install.deb 2>/dev/null
RUN mkdir -p /usr/share/man/man1
RUN apt-get install /tmp/install.deb -y
RUN rm /tmp/install.deb
RUN apt-get install maven -y
RUN apt-get install gcc gperf cmake ccache -y
RUN apt-get install libssl-dev liblz4-dev libgflags-dev zlib1g-dev -y
RUN apt-get install build-essential -y
RUN apt-get install python3 -y
RUN apt-get install libreadline-dev git -y
RUN mkdir /work
RUN mkdir /output
WORKDIR /work
RUN export JAVA_HOME=/usr/lib/jvm/zulu15
#RUN ./build.sh
ENTRYPOINT [ "/bin/bash" ]

View File

@ -4,7 +4,8 @@ set -e
# ====== Static variables
export TRAVIS_CPU_ARCH="amd64"
export TRAVIS_OS_NAME="linux"
export TRAVIS_BUILD_DIR="/workdir/tdlight-java"
export TRAVIS_BUILD_DIR="/work/tdlight-java"
export OUTPUT_DIR="/output"
# ====== Variables
export TD_SRC_DIR=$TRAVIS_BUILD_DIR/dependencies/tdlight
@ -62,6 +63,7 @@ elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$TRAVIS_CPU_ARCH_JAVA"
export JAVA_INCLUDE_PATH="/usr/lib/jvm/java-11-openjdk-$TRAVIS_CPU_ARCH_JAVA/include"
fi
export TDLIB_RESOURCES_OUTPUT_DIR="$OUTPUT_DIR/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD"
# ====== Print variables
echo "TD_SRC_DIR=${TD_SRC_DIR}"
@ -86,6 +88,8 @@ echo "TRAVIS_OS_NAME_STANDARD=${TRAVIS_OS_NAME_STANDARD}"
echo "TRAVIS_OS_NAME_SHORT=${TRAVIS_OS_NAME_SHORT}"
echo "SRC_TDJNI_LIBNAME=${SRC_TDJNI_LIBNAME}"
echo "DEST_TDJNI_LIBNAME=${DEST_TDJNI_LIBNAME}"
echo "TDLIB_RESOURCES_OUTPUT_DIR=${TDLIB_RESOURCES_OUTPUT_DIR}"
echo "CURRENT DIRECTORY*=$(pwd)"
ls -alch "$(pwd)"
echo "WORK DIRECTORY CONTENT* (${TRAVIS_BUILD_DIR})="
ls -alch $TRAVIS_BUILD_DIR
ls -alch "$TRAVIS_BUILD_DIR"