45 lines
No EOL
810 B
Groovy
45 lines
No EOL
810 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
options {
|
|
buildDiscarder (
|
|
logRotator(numToKeepStr: '5')
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage("Build") {
|
|
agent {
|
|
label "flutter"
|
|
}
|
|
|
|
steps {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
flutter pub get
|
|
|
|
flutter build web
|
|
|
|
cd build/web
|
|
tar -cvf ../../web.tgz .
|
|
|
|
cd ../../php
|
|
tar -cvf ../php.tgz .
|
|
cd ..
|
|
|
|
'''
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "web.tgz"
|
|
archiveArtifacts artifacts: "php.tgz"
|
|
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
} |