88 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 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,
 | |
|         [
 | |
|             [
 | |
|                 name: "ubuntu",
 | |
|                 path: "${repository}/dockerhub/library/ubuntu:24.04",
 | |
|                 command: "/bin/bash"
 | |
|             ]
 | |
|         ],
 | |
|     )
 | |
| ) {
 | |
|     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 ("ubuntu") {
 | |
|                 writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getCurrentRootCA())
 | |
|                 sh """
 | |
|                     apt update
 | |
|                     apt -y --no-install-recommends install build-essential curl ca-certificates python3 python-is-python3 ninja-build meson git
 | |
|                     apt clean
 | |
|                     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
 | |
|                     update-ca-certificates
 | |
|                     cd ${workspace}/ffmpeg
 | |
|                     AUTOINSTALL=yes ./build-ffmpeg --build --full-static --enable-gpl-and-non-free
 | |
|                 """
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         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/"
 | |
|         )
 | |
|     }
 | |
| }
 |