From 100a4bf62c9ec5502446b4cd7f5e7c160156a12b Mon Sep 17 00:00:00 2001 From: The_Spider Date: Thu, 20 Jan 2022 16:50:03 -0600 Subject: [PATCH] updates call to pushArtifact --- build-ffmpeg.jenkins | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 build-ffmpeg.jenkins diff --git a/build-ffmpeg.jenkins b/build-ffmpeg.jenkins new file mode 100644 index 0000000..c6a0aba --- /dev/null +++ b/build-ffmpeg.jenkins @@ -0,0 +1,76 @@ +def repository = "registry.c.test-chamber-13.lan" +def repositoryCreds = "harbor-repository-creds" + +def label = "kubernetes-${UUID.randomUUID().toString()}" +def templateName = "pipeline-worker" +podTemplate( + label: label, + name: templateName, + yaml: functions.podYaml( + repo: repository, + templateName: templateName, + alpine: true, + fedora: true + ) +) { + node (label) { + def workspace = pwd() + + stage ("Pull FFMpeg Builder") { + dir("ffmpeg") { + checkout ([ + $class: "GitSCM", + branches: [ + [ + name: "refs/heads/master", + ], + ], + userRemoteConfigs: [ + [ + url: "https://github.com/markus-perl/ffmpeg-build-script.git", + ], + ], + extensions: [ + [ + $class: "CloneOption", + shallow: true, + ], + [ + $class: "CheckoutOption", + timeout: 2, + ], + ], + ]) + } + } + + stage ("Build FFMpeg") { + container ("fedora") { + sh """ + dnf install curl gcc-g++ libtool make xz python perl perl-devel openssl-devel diffutils bzip2 glibc-static libstdc++-static -y + cd ${workspace}/ffmpeg + SKIPINSTALL=yes ./build-ffmpeg --full-static --enable-gpl-and-non-free --build + """ + } + } + + functions.pushArtifact( + repoCreds: "nexus-generic-upload-bot", + fileName: "ffmpeg", + filePath: "${workspace}/ffmpeg/workspace/bin/", + fileURL: "https://nexus.c.test-chamber-13.lan/repository/generic/ffmpeg/" + ) + functions.pushArtifact( + repoCreds: "nexus-generic-upload-bot", + fileName: "ffprobe", + filePath: "${workspace}/ffmpeg/workspace/bin/", + fileURL: "https://nexus.c.test-chamber-13.lan/repository/generic/ffmpeg/" + ) + functions.pushArtifact( + repoCreds: "nexus-generic-upload-bot", + fileName: "ffplay", + filePath: "${workspace}/ffmpeg/workspace/bin/", + fileURL: "https://nexus.c.test-chamber-13.lan/repository/generic/ffmpeg/" + ) + } +}