From 41018715f56465307fa16f80f0f7a9cd3b78b5fb Mon Sep 17 00:00:00 2001 From: Dany LE Date: Wed, 17 Aug 2022 19:15:55 +0200 Subject: [PATCH 1/3] Create Jenkinsfile --- Jenkinsfile | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3abe088 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,102 @@ +def build_plugin() +{ + sh ''' + set -e + cd $WORKSPACE + mkdir -p build/$arch/opt/www + [ -f Makefile ] && make clean + libtoolize + aclocal + autoconf + automake --add-missing + search_path=$(realpath $WORKSPACE/../ant-http/build/$arch/usr) + CFLAGS="-I$search_path/include" LDFLAGS="-L$search_path/lib" ./configure --prefix=/opt/www + CFLAGS="-I$search_path/include" LDFLAGS="-L$search_path/lib" make + DESTDIR=$WORKSPACE/build/$arch make install + ''' +} + +pipeline{ + agent { node{ label'master' }} + options { + // Limit build history with buildDiscarder option: + // daysToKeepStr: history is only kept up to this many days. + // numToKeepStr: only this many build logs are kept. + // artifactDaysToKeepStr: artifacts are only kept up to this many days. + // artifactNumToKeepStr: only this many builds have their artifacts kept. + buildDiscarder(logRotator(numToKeepStr: "1")) + // Enable timestamps in build log console + timestamps() + // Maximum time to run the whole pipeline before canceling it + timeout(time: 3, unit: 'HOURS') + // Use Jenkins ANSI Color Plugin for log console + ansiColor('xterm') + // Limit build concurrency to 1 per branch + disableConcurrentBuilds() + } + stages + { + stage('Build AMD64') { + agent { + docker { + image 'xsangle/ci-tools:latest-amd64' + args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http' + // Run the container on the node specified at the + // top-level of the Pipeline, in the same workspace, + // rather than on a new node entirely: + reuseNode true + } + } + steps { + script{ + env.arch = "amd64" + } + build_plugin() + } + } + stage('Build ARM64') { + agent { + docker { + image 'xsangle/ci-tools:latest-arm64' + args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http' + // Run the container on the node specified at the + // top-level of the Pipeline, in the same workspace, + // rather than on a new node entirely: + reuseNode true + } + } + steps { + script{ + env.arch = "arm64" + } + build_plugin() + } + } + stage('Build ARM') { + agent { + docker { + image 'xsangle/ci-tools:latest-arm' + args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http' + // Run the container on the node specified at the + // top-level of the Pipeline, in the same workspace, + // rather than on a new node entirely: + reuseNode true + } + } + steps { + script{ + env.arch = "arm" + } + build_plugin() + } + } + stage('Archive') { + steps { + script { + archiveArtifacts artifacts: 'build/', fingerprint: true + } + } + } + } +} +Footer From a137ec52a18013b04683e78f4537950f537da094 Mon Sep 17 00:00:00 2001 From: Dany LE Date: Wed, 17 Aug 2022 19:36:49 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 974a9e8..93b38d6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ As **WVNC** is an **Antd's** plugin, the server need to be pre-installed: ### Plugin Dependencies -* Zlib * libjpeg-turbo * libvncserver-dev From 14c28b2c36dd01107891fb76b91a8a4de8eb4036 Mon Sep 17 00:00:00 2001 From: Dany LE Date: Wed, 17 Aug 2022 19:49:24 +0200 Subject: [PATCH 3/3] Update Jenkinsfile --- Jenkinsfile | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3abe088..53fdf0a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,11 +19,6 @@ def build_plugin() pipeline{ agent { node{ label'master' }} options { - // Limit build history with buildDiscarder option: - // daysToKeepStr: history is only kept up to this many days. - // numToKeepStr: only this many build logs are kept. - // artifactDaysToKeepStr: artifacts are only kept up to this many days. - // artifactNumToKeepStr: only this many builds have their artifacts kept. buildDiscarder(logRotator(numToKeepStr: "1")) // Enable timestamps in build log console timestamps() @@ -41,9 +36,6 @@ pipeline{ docker { image 'xsangle/ci-tools:latest-amd64' args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http' - // Run the container on the node specified at the - // top-level of the Pipeline, in the same workspace, - // rather than on a new node entirely: reuseNode true } } @@ -59,9 +51,6 @@ pipeline{ docker { image 'xsangle/ci-tools:latest-arm64' args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http' - // Run the container on the node specified at the - // top-level of the Pipeline, in the same workspace, - // rather than on a new node entirely: reuseNode true } } @@ -77,9 +66,6 @@ pipeline{ docker { image 'xsangle/ci-tools:latest-arm' args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http' - // Run the container on the node specified at the - // top-level of the Pipeline, in the same workspace, - // rather than on a new node entirely: reuseNode true } } @@ -99,4 +85,3 @@ pipeline{ } } } -Footer