Update Jenkinsfile, dockerfile, and setup_variables.sh
This commit is contained in:
parent
528f19961d
commit
6764bafabd
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -22,9 +22,12 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage("Compile C++") {
|
stage("Compile C++") {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
dockerfile {
|
||||||
image 'dockcross/linux-x64'
|
dir 'jenkins/docker'
|
||||||
args "-v $JAVA_HOME:$JAVA_HOME -v $HOME:/var/maven -v \"${env.WORKSPACE}:/workdir\" bash"
|
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
|
reuseNode false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
43
jenkins/docker/dockerfile
Normal file
43
jenkins/docker/dockerfile
Normal 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" ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4,7 +4,8 @@ set -e
|
|||||||
# ====== Static variables
|
# ====== Static variables
|
||||||
export TRAVIS_CPU_ARCH="amd64"
|
export TRAVIS_CPU_ARCH="amd64"
|
||||||
export TRAVIS_OS_NAME="linux"
|
export TRAVIS_OS_NAME="linux"
|
||||||
export TRAVIS_BUILD_DIR="/workdir/tdlight-java"
|
export TRAVIS_BUILD_DIR="/work/tdlight-java"
|
||||||
|
export OUTPUT_DIR="/output"
|
||||||
|
|
||||||
# ====== Variables
|
# ====== Variables
|
||||||
export TD_SRC_DIR=$TRAVIS_BUILD_DIR/dependencies/tdlight
|
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_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"
|
export JAVA_INCLUDE_PATH="/usr/lib/jvm/java-11-openjdk-$TRAVIS_CPU_ARCH_JAVA/include"
|
||||||
fi
|
fi
|
||||||
|
export TDLIB_RESOURCES_OUTPUT_DIR="$OUTPUT_DIR/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD"
|
||||||
|
|
||||||
# ====== Print variables
|
# ====== Print variables
|
||||||
echo "TD_SRC_DIR=${TD_SRC_DIR}"
|
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 "TRAVIS_OS_NAME_SHORT=${TRAVIS_OS_NAME_SHORT}"
|
||||||
echo "SRC_TDJNI_LIBNAME=${SRC_TDJNI_LIBNAME}"
|
echo "SRC_TDJNI_LIBNAME=${SRC_TDJNI_LIBNAME}"
|
||||||
echo "DEST_TDJNI_LIBNAME=${DEST_TDJNI_LIBNAME}"
|
echo "DEST_TDJNI_LIBNAME=${DEST_TDJNI_LIBNAME}"
|
||||||
|
echo "TDLIB_RESOURCES_OUTPUT_DIR=${TDLIB_RESOURCES_OUTPUT_DIR}"
|
||||||
echo "CURRENT DIRECTORY*=$(pwd)"
|
echo "CURRENT DIRECTORY*=$(pwd)"
|
||||||
|
ls -alch "$(pwd)"
|
||||||
echo "WORK DIRECTORY CONTENT* (${TRAVIS_BUILD_DIR})="
|
echo "WORK DIRECTORY CONTENT* (${TRAVIS_BUILD_DIR})="
|
||||||
ls -alch $TRAVIS_BUILD_DIR
|
ls -alch "$TRAVIS_BUILD_DIR"
|
||||||
|
Loading…
Reference in New Issue
Block a user