46 lines
No EOL
943 B
Groovy
46 lines
No EOL
943 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
options {
|
|
buildDiscarder(
|
|
logRotator(
|
|
numToKeepStr: '5'
|
|
)
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage("Build and Publish") {
|
|
agent {
|
|
label "flutter"
|
|
}
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
unset WORKSPACE
|
|
unset WORKSPACE_TMP
|
|
rm -rf doc || true
|
|
|
|
flutter pub get
|
|
flutter pub publish -f --skip-validation || true
|
|
|
|
dart doc
|
|
cd doc/api
|
|
tar -cvf ../../docs.tgz .
|
|
'''
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "docs.tgz"
|
|
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |