Files
fast_reader/Jenkinsfile

87 lines
2.3 KiB
Plaintext
Raw Normal View History

2026-11-05 19:44:58 +01:00
pipeline {
agent any
options {
timestamps()
disableConcurrentBuilds()
}
stages {
stage('Verify source checkout') {
steps {
echo 'FlashRead source checkout succeeded.'
sh 'pwd && git log -1 --oneline'
}
}
2026-11-05 21:13:11 +01:00
stage('Build FlashRead CI image') {
steps {
script {
def ciImage = docker.build(
'fast_reader-ci:latest',
'-f Dockerfile.ci .'
)
echo "Built CI image: ${ciImage.id}"
}
}
}
2026-11-05 19:44:58 +01:00
stage('Inspect build environment') {
steps {
sh '''
echo "=== Build environment ==="
echo
for tool in git go node npm wails syft grype docker; do
if command -v "$tool" >/dev/null 2>&1; then
echo "[FOUND] $tool"
"$tool" --version 2>&1 | head -n 1 || true
else
echo "[MISSING] $tool"
fi
done
'''
}
}
2026-11-05 21:30:15 +01:00
stage('Build FlashRead') {
agent {
docker {
image 'fast_reader-ci:latest'
reuseNode true
2026-11-05 20:27:04 +01:00
}
}
2026-11-05 21:30:15 +01:00
steps {
sh '''
2026-11-05 22:21:34 +01:00
mkdir -p frontend/dist
2026-11-05 22:23:01 +01:00
touch frontend/dist/.keep
2026-11-05 21:52:40 +01:00
wails generate module
2026-11-05 21:30:15 +01:00
echo "=== Frontend dependencies ==="
cd frontend
2026-11-05 22:19:44 +01:00
npm ci
2026-11-05 21:30:15 +01:00
echo "=== Frontend build ==="
npm run build
cd ..
2026-11-05 21:32:27 +01:00
echo "=== Go tests ==="
go test ./...
2026-11-05 21:30:15 +01:00
echo "=== Wails build ==="
wails build -tags webkit2_41
'''
}
2026-11-05 20:27:04 +01:00
}
2026-11-05 19:44:58 +01:00
}
post {
success {
echo 'FlashRead CI environment check completed successfully.'
}
failure {
echo 'FlashRead CI environment check failed.'
}
}
}