ci: Add jenkinsfile
This commit is contained in:
parent
8d20540b0f
commit
e351f30d4a
1 changed files with 46 additions and 0 deletions
46
Jenkinsfile
vendored
Normal file
46
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue