Compare commits
10 Commits
4d7c526b0e
...
add-feedba
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5651d6926 | ||
|
|
70414a552d | ||
|
|
1c6fa0e98c | ||
|
|
68b9310862 | ||
|
|
890d7fc8f9 | ||
|
|
907d92bb16 | ||
|
|
ffc0d11bbb | ||
|
|
fc2f024d60 | ||
|
|
47db0185c5 | ||
|
|
f474c238dc |
41
.github/workflows/build.yml
vendored
41
.github/workflows/build.yml
vendored
@@ -25,26 +25,39 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: rockylinux:9
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build Docker image
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
docker build -t rocky-man:latest .
|
||||
dnf install -y \
|
||||
python3.11 \
|
||||
python3.11-pip \
|
||||
mandoc \
|
||||
rpm-build \
|
||||
dnf-plugins-core \
|
||||
git
|
||||
|
||||
- name: Create output directories
|
||||
- name: Install UV
|
||||
run: |
|
||||
mkdir -p ./html ./tmp
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Build man pages in container
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "$(pwd)/html:/data/html" \
|
||||
-v "$(pwd)/tmp:/data/tmp" \
|
||||
rocky-man:latest \
|
||||
--versions ${{ github.event.inputs.versions || '8.10 9.6 10.0' }} \
|
||||
uv pip install --system -e .
|
||||
|
||||
- name: Build man pages
|
||||
run: |
|
||||
python3.11 -m rocky_man.main \
|
||||
--versions ${{ github.event.inputs.versions || '8.10 9.5' }} \
|
||||
--output-dir ./html \
|
||||
--download-dir ./tmp/downloads \
|
||||
--extract-dir ./tmp/extracts \
|
||||
--verbose
|
||||
env:
|
||||
PYTHONUNBUFFERED: 1
|
||||
@@ -55,3 +68,11 @@ jobs:
|
||||
name: rocky-man-pages
|
||||
path: html/
|
||||
retention-days: 30
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./html
|
||||
force_orphan: true
|
||||
|
||||
Binary file not shown.
155
Jenkinsfile
vendored
155
Jenkinsfile
vendored
@@ -1,155 +0,0 @@
|
||||
// Jenkinsfile for Rocky Man
|
||||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
yaml """
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
jenkins: agent
|
||||
spec:
|
||||
containers:
|
||||
- name: docker
|
||||
image: docker:24-dind
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: docker-sock
|
||||
mountPath: /var/run
|
||||
command:
|
||||
- dockerd-entrypoint.sh
|
||||
- name: docker-cli
|
||||
image: docker:24-cli
|
||||
command:
|
||||
- cat
|
||||
tty: true
|
||||
volumeMounts:
|
||||
- name: docker-sock
|
||||
mountPath: /var/run
|
||||
- name: b2
|
||||
image: backblazeit/b2:latest
|
||||
command:
|
||||
- cat
|
||||
tty: true
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
emptyDir: {}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'VERSIONS',
|
||||
defaultValue: '8.10 9.6 10.1',
|
||||
description: 'Rocky Linux versions to build (space-separated)'
|
||||
)
|
||||
string(
|
||||
name: 'B2_BUCKET_NAME',
|
||||
defaultValue: 'rockyman',
|
||||
description: 'B2 bucket name for uploads'
|
||||
)
|
||||
string(
|
||||
name: 'EXISTING_VERSIONS',
|
||||
defaultValue: '',
|
||||
description: 'Existing versions already built (space-separated)'
|
||||
)
|
||||
string(
|
||||
name: 'PARALLEL_DOWNLOADS',
|
||||
defaultValue: '5',
|
||||
description: 'Number of parallel downloads'
|
||||
)
|
||||
string(
|
||||
name: 'PARALLEL_CONVERSIONS',
|
||||
defaultValue: '10',
|
||||
description: 'Number of parallel conversions'
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
timeout(time: 2, unit: 'HOURS')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Docker Image') {
|
||||
steps {
|
||||
container('docker-cli') {
|
||||
sh '''
|
||||
docker build -t rocky-man:${BUILD_NUMBER} .
|
||||
docker tag rocky-man:${BUILD_NUMBER} rocky-man:latest
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Man Pages') {
|
||||
steps {
|
||||
container('docker-cli') {
|
||||
sh '''
|
||||
# Create output directories
|
||||
mkdir -p ./html ./tmp
|
||||
|
||||
# Run the container to build man pages
|
||||
docker run --rm \
|
||||
-v "$(pwd)/html:/app/html" \
|
||||
-v "$(pwd)/tmp:/data/tmp" \
|
||||
rocky-man:${BUILD_NUMBER} \
|
||||
--versions ${VERSIONS} \
|
||||
--verbose \
|
||||
--parallel-downloads ${PARALLEL_DOWNLOADS} \
|
||||
--parallel-conversions ${PARALLEL_CONVERSIONS} \
|
||||
--existing-versions "${EXISTING_VERSIONS}"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Upload to B2') {
|
||||
when {
|
||||
expression { return params.B2_BUCKET_NAME != "" }
|
||||
}
|
||||
steps {
|
||||
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 {
|
||||
success {
|
||||
echo 'Build completed and uploaded to B2!'
|
||||
}
|
||||
failure {
|
||||
echo 'Build failed!'
|
||||
}
|
||||
cleanup {
|
||||
container('docker-cli') {
|
||||
sh '''
|
||||
docker rmi rocky-man:${BUILD_NUMBER} || true
|
||||
docker rmi rocky-man:latest || true
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -284,8 +284,7 @@ class WebGenerator:
|
||||
max_minors = max(len(major_to_minors[major]) for major in sorted_majors)
|
||||
num_columns = len(sorted_majors)
|
||||
|
||||
# Create rows for grid layout (each row has one version from each major)
|
||||
# This creates the data structure for proper column grouping
|
||||
# Create rows of versions for side-by-side display
|
||||
version_rows = []
|
||||
for minor_idx in range(max_minors):
|
||||
row = []
|
||||
@@ -294,7 +293,7 @@ class WebGenerator:
|
||||
if minor_idx < len(minors_list):
|
||||
row.append((major, minors_list[minor_idx]))
|
||||
else:
|
||||
row.append(None) # Placeholder for empty cells
|
||||
row.append(None) # Empty cell placeholder
|
||||
version_rows.append(row)
|
||||
|
||||
html = template.render(
|
||||
|
||||
@@ -174,6 +174,8 @@
|
||||
<div class="version-browse">Browse man pages →</div>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
<div></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user