51 lines
1.1 KiB
Groovy
51 lines
1.1 KiB
Groovy
pipeline {
|
|
agent {
|
|
label 'linux'
|
|
}
|
|
options {
|
|
buildDiscarder(
|
|
logRotator(
|
|
numToKeepStr: '5'
|
|
)
|
|
)
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Build') {
|
|
steps {
|
|
script {
|
|
// Use bash as the shell for these commands
|
|
sh '''
|
|
#!/bin/bash
|
|
unset WORKSPACE
|
|
unset WORKSPACE_TMP
|
|
rm -rf doc
|
|
dart pub get
|
|
dart doc
|
|
|
|
mkdir -p out
|
|
dart compile exe -o out/dbikc bin/dbikc.dart
|
|
|
|
tar -cvf docs.tgz doc/api/*
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Deploy') {
|
|
steps {
|
|
sh 'flutter pub publish -f --skip-validation'
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "*.tgz", fingerprint: true
|
|
archiveArtifacts artifacts: "out/*", fingerprint: true
|
|
deleteDir()
|
|
}
|
|
}
|
|
}
|