try migrate to "linux.json" for dockers
Some checks failed
SHS Gitea/shstk/pipeline/head There was a failure building this commit
Some checks failed
SHS Gitea/shstk/pipeline/head There was a failure building this commit
This commit is contained in:
37
Jenkinsfile
vendored
37
Jenkinsfile
vendored
@@ -1,4 +1,4 @@
|
|||||||
def build_docker(name, release_dir) {
|
def build_docker(name, docker_dir, docker_image, release_dir) {
|
||||||
def image_name = "${name}-shstk"
|
def image_name = "${name}-shstk"
|
||||||
echo "Build image ${image_name}"
|
echo "Build image ${image_name}"
|
||||||
def pref = ""
|
def pref = ""
|
||||||
@@ -9,13 +9,17 @@ def build_docker(name, release_dir) {
|
|||||||
if (env.JOBS_COUNT) {
|
if (env.JOBS_COUNT) {
|
||||||
jobs = "${env.JOBS_COUNT}"
|
jobs = "${env.JOBS_COUNT}"
|
||||||
}
|
}
|
||||||
def args = "${pref} --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER} --build-arg JOBS_COUNT=${jobs}"
|
def args = "${pref}"
|
||||||
dir ("docker/${image_name}") {
|
args += " --build-arg IMAGE_FROM=${docker_image}"
|
||||||
sh "docker build ${args} --no-cache -t ${image_name} ."
|
args += " --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER}"
|
||||||
def diargs = "-v " + release_dir + ":/soft/release"
|
args += " --build-arg JOBS_COUNT=${jobs}"
|
||||||
docker.image(image_name).inside(diargs) {
|
dir ("docker/${docker_dir}-shstk") {
|
||||||
sh 'cp -vf /soft/shstk/release/* /soft/release/ || true'
|
//sh "docker build ${args} --no-cache -t ${image_name} ."
|
||||||
}
|
//def diargs = "-v " + release_dir + ":/soft/release"
|
||||||
|
//docker.image(image_name).inside(diargs) {
|
||||||
|
// sh 'cp -vf /soft/shstk/release/* /soft/release/ || true'
|
||||||
|
//}
|
||||||
|
print "docker build ${args} --no-cache -t ${image_name} ."
|
||||||
}
|
}
|
||||||
return "\n - ${image_name}"
|
return "\n - ${image_name}"
|
||||||
}
|
}
|
||||||
@@ -38,14 +42,27 @@ node {
|
|||||||
sh "rm -rvf ${rel_dir}"
|
sh "rm -rvf ${rel_dir}"
|
||||||
sh "mkdir -p ${rel_dir}"
|
sh "mkdir -p ${rel_dir}"
|
||||||
def _msg = "Built images:"
|
def _msg = "Built images:"
|
||||||
def platforms = ['debian', 'debian11', 'osx', 'windows', 'windows32', 'android', 'pi', 'ubuntu']
|
|
||||||
|
// individual platforms
|
||||||
|
def platforms = ['osx', 'android', 'windows', 'windows32', 'pi']
|
||||||
for (int i = 0; i < platforms.size(); ++i) {
|
for (int i = 0; i < platforms.size(); ++i) {
|
||||||
if (_envmap["BUILD_${platforms[i]}"] == "1") {
|
if (_envmap["BUILD_${platforms[i]}"] == "1") {
|
||||||
stage("${platforms[i]}-shstk") {
|
stage("${platforms[i]}-shstk") {
|
||||||
_msg += build_docker("${platforms[i]}", rel_dir)
|
_msg += build_docker("${platforms[i]}", "${platforms[i]}", "", rel_dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// desktop linux set
|
||||||
|
sh 'wget https://shs.tools/files/linux.json'
|
||||||
|
def root = readJSON(file: 'linux.json')
|
||||||
|
for (dist in root.Linux) {
|
||||||
|
if (dist.off) continue
|
||||||
|
stage ("${dist.system}-shstk") {
|
||||||
|
_msg += build_docker(dist.docker_image, "linux_desktop", dist.docker_image, rel_dir)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sh "docker system prune -f"
|
sh "docker system prune -f"
|
||||||
archiveArtifacts 'release/*'
|
archiveArtifacts 'release/*'
|
||||||
echo "${_msg}"
|
echo "${_msg}"
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
ARG DOCKER_PREFIX=wapmobil/
|
|
||||||
FROM ${DOCKER_PREFIX}debian11
|
|
||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
|
||||||
ARG JOBS_COUNT=4
|
|
||||||
ENV PATH=/opt/cmake/bin:$PATH
|
|
||||||
|
|
||||||
WORKDIR /soft
|
|
||||||
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/shstk.git
|
|
||||||
|
|
||||||
WORKDIR /soft/shstk_build_debian
|
|
||||||
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
|
|
||||||
&& cmake --build ./ --target install -j${JOBS_COUNT} \
|
|
||||||
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \
|
|
||||||
&& rm -rf * \
|
|
||||||
&& ldconfig
|
|
||||||
|
|
||||||
WORKDIR /soft/src
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
ARG DOCKER_PREFIX=wapmobil/
|
ARG DOCKER_PREFIX=wapmobil/
|
||||||
FROM ${DOCKER_PREFIX}debian
|
ARG IMAGE_FROM
|
||||||
|
FROM ${DOCKER_PREFIX}${IMAGE_FROM}
|
||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
ARG LIBS_BUILD_NUMBER=9999
|
||||||
ARG JOBS_COUNT=4
|
ARG JOBS_COUNT=4
|
||||||
@@ -8,7 +9,7 @@ ENV PATH=/opt/cmake/bin:$PATH
|
|||||||
WORKDIR /soft
|
WORKDIR /soft
|
||||||
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/shstk.git
|
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/shstk.git
|
||||||
|
|
||||||
WORKDIR /soft/shstk_build_debian
|
WORKDIR /soft/shstk_build_linux
|
||||||
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
|
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
|
||||||
&& cmake --build ./ --target install -j${JOBS_COUNT} \
|
&& cmake --build ./ --target install -j${JOBS_COUNT} \
|
||||||
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \
|
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
ARG DOCKER_PREFIX=wapmobil/
|
|
||||||
FROM ${DOCKER_PREFIX}ubuntu
|
|
||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
|
||||||
ARG JOBS_COUNT=4
|
|
||||||
ENV PATH=/opt/cmake/bin:$PATH
|
|
||||||
|
|
||||||
WORKDIR /soft
|
|
||||||
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/shstk.git
|
|
||||||
|
|
||||||
WORKDIR /soft/shstk_build_ubuntu
|
|
||||||
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
|
|
||||||
&& cmake --build ./ --target install -j${JOBS_COUNT} \
|
|
||||||
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \
|
|
||||||
&& rm -rf * \
|
|
||||||
&& ldconfig
|
|
||||||
|
|
||||||
WORKDIR /soft/src
|
|
||||||
2
pip
2
pip
Submodule pip updated: d66f7efb3c...2d1c86bc83
Reference in New Issue
Block a user