Compare commits

14 Commits

Author SHA1 Message Date
c6dc7fe310 Remove parameter for parallel conversions from Jenkinsfile
Signed-off-by: Stephen Simpson <stevo81989@gmail.com>
2025-11-26 10:57:16 -06:00
411abf8683 Update Jenkinsfile to change parameter types for parallel downloads and conversions to strings
Signed-off-by: Stephen Simpson <stevo81989@gmail.com>
2025-11-26 10:55:43 -06:00
c3fef46d6a Update Jenkinsfile to modify default Rocky Linux version and add parameters for parallel downloads and conversions
Signed-off-by: Stephen Simpson <stevo81989@gmail.com>
2025-11-26 10:49:36 -06:00
a0994a5c16 Update Jenkinsfile 2025-11-25 13:41:19 -06:00
7bda4a1155 Update Jenkinsfile 2025-11-25 13:33:44 -06:00
3f2ecebb08 Update Jenkinsfile 2025-11-25 13:32:23 -06:00
c9b59737b9 Update Jenkinsfile 2025-11-25 11:52:39 -06:00
067965d983 Update Jenkinsfile 2025-11-25 11:50:10 -06:00
b9f6697100 Update Jenkinsfile 2025-11-25 10:54:31 -06:00
106e680f11 Update Jenkinsfile 2025-11-25 08:28:52 -06:00
b1e987f1b1 Merge pull request 'update' (#4) from fix-build into main
Reviewed-on: #4
2025-11-24 16:28:33 -06:00
9e2943754f Merge pull request 'update' (#3) from fix-build into main
Reviewed-on: #3
2025-11-24 15:52:56 -06:00
b371431aa5 Merge pull request 'update' (#2) from fix-build into main
Reviewed-on: #2
2025-11-24 15:27:06 -06:00
2315422d4f Merge pull request 'fix-build' (#1) from fix-build into main
Reviewed-on: #1
2025-11-24 15:20:19 -06:00

62
Jenkinsfile vendored
View File

@@ -1,6 +1,4 @@
// Jenkinsfile for Rocky Man // Jenkinsfile for Rocky Man
// This pipeline uses Kubernetes agents to build and run the container
pipeline { pipeline {
agent { agent {
kubernetes { kubernetes {
@@ -29,6 +27,11 @@ spec:
volumeMounts: volumeMounts:
- name: docker-sock - name: docker-sock
mountPath: /var/run mountPath: /var/run
- name: b2
image: backblazeit/b2:latest
command:
- cat
tty: true
volumes: volumes:
- name: docker-sock - name: docker-sock
emptyDir: {} emptyDir: {}
@@ -39,9 +42,24 @@ spec:
parameters { parameters {
string( string(
name: 'VERSIONS', name: 'VERSIONS',
defaultValue: '8.10 9.6 10.0', defaultValue: '8.10 9.6 10.1',
description: 'Rocky Linux versions to build (space-separated)' description: 'Rocky Linux versions to build (space-separated)'
) )
string(
name: 'B2_BUCKET_NAME',
defaultValue: 'rockyman',
description: 'B2 bucket name for uploads'
)
string(
name: 'PARALLEL_DOWNLOADS',
defaultValue: '5',
description: 'Number of parallel downloads'
)
string(
name: 'PARALLEL_CONVERSIONS',
defaultValue: '10',
description: 'Number of parallel conversions'
)
} }
options { options {
@@ -70,32 +88,51 @@ spec:
stage('Build Man Pages') { stage('Build Man Pages') {
steps { steps {
container('docker-cli') { container('docker-cli') {
sh """ sh '''
# Create output directories # Create output directories
mkdir -p ./html ./tmp mkdir -p ./html ./tmp
# Run the container to build man pages # Run the container to build man pages
docker run --rm \ docker run --rm \
-v "\$(pwd)/html:/app/html" \ -v "$(pwd)/html:/app/html" \
-v "\$(pwd)/tmp:/data/tmp" \ -v "$(pwd)/tmp:/data/tmp" \
rocky-man:${BUILD_NUMBER} \ rocky-man:${BUILD_NUMBER} \
--versions ${params.VERSIONS} \ --versions ${VERSIONS} \
--verbose --verbose \
""" --parallel-downloads ${PARALLEL_DOWNLOADS} \
--parallel-conversions ${PARALLEL_CONVERSIONS}
'''
} }
} }
} }
stage('Archive Artifacts') { stage('Upload to B2') {
when {
expression { return params.B2_BUCKET_NAME != "" }
}
steps { steps {
archiveArtifacts artifacts: 'html/**/*', fingerprint: true container('docker-cli') {
withCredentials([
string(credentialsId: 'b2-app-id', variable: 'B2_APPLICATION_KEY_ID'),
string(credentialsId: 'b2-app-key', variable: 'B2_APPLICATION_KEY')
]) {
sh '''
docker run --rm \
-v "$(pwd)/html:/workspace/html" \
-e B2_APPLICATION_KEY \
-e B2_APPLICATION_KEY_ID \
backblazeit/b2:latest \
b2v4 sync /workspace/html/ "b2://${B2_BUCKET_NAME}/"
'''
}
}
} }
} }
} }
post { post {
success { success {
echo 'Build completed successfully!' echo 'Build completed and uploaded to B2!'
} }
failure { failure {
echo 'Build failed!' echo 'Build failed!'
@@ -103,7 +140,6 @@ spec:
cleanup { cleanup {
container('docker-cli') { container('docker-cli') {
sh ''' sh '''
# Clean up Docker images to save space
docker rmi rocky-man:${BUILD_NUMBER} || true docker rmi rocky-man:${BUILD_NUMBER} || true
docker rmi rocky-man:latest || true docker rmi rocky-man:latest || true
''' '''