ci: add jenkinsfile
This commit is contained in:
parent
2bdd5f18f6
commit
5fc4057d93
1 changed files with 37 additions and 0 deletions
37
Jenkinsfile
vendored
Normal file
37
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
options {
|
||||||
|
buildDiscarder {
|
||||||
|
logRotator(numToKeepStr: '5')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Build") {
|
||||||
|
agent {
|
||||||
|
label "flutter"
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
flutter pub get
|
||||||
|
|
||||||
|
flutter build web
|
||||||
|
|
||||||
|
cd build/web
|
||||||
|
tar -cvf ../../web.tgz .
|
||||||
|
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: "web.tgz"
|
||||||
|
|
||||||
|
cleanWs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue