kotlin upgrade 5
This commit is contained in:
parent
c233d71119
commit
1879150e72
224
fbla_ui/Jenkinsfile
vendored
224
fbla_ui/Jenkinsfile
vendored
@ -1,125 +1,125 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
stage('Flutter Cleanup') {
|
stage('Flutter Cleanup') {
|
||||||
steps {
|
steps {
|
||||||
sh '''flutter upgrade --force
|
sh '''flutter upgrade
|
||||||
flutter pub upgrade
|
flutter pub upgrade
|
||||||
flutter --version
|
flutter --version
|
||||||
flutter doctor
|
flutter doctor
|
||||||
flutter clean'''
|
flutter clean'''
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build') {
|
|
||||||
parallel {
|
|
||||||
stage('Web Build') {
|
|
||||||
steps {
|
|
||||||
sh 'flutter build web --release --base-href /fbla/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build Linux') {
|
|
||||||
steps {
|
|
||||||
sh 'flutter build linux --release'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build APK') {
|
|
||||||
steps {
|
|
||||||
sh 'flutter build apk --release'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Deploy and Save') {
|
|
||||||
parallel {
|
|
||||||
stage('Deploy Web Local') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
def remote = [
|
|
||||||
name: 'HostServer',
|
|
||||||
host: '192.168.0.216',
|
|
||||||
user: 'fbla',
|
|
||||||
password: 'fbla',
|
|
||||||
allowAnyHosts: true,
|
|
||||||
]
|
|
||||||
sshRemove(path: '/home/fbla/fbla-webserver/webfiles/fbla', remote: remote)
|
|
||||||
sshPut(from: 'build/web/', into: '/home/fbla/fbla-webserver', remote: remote)
|
|
||||||
sshCommand remote: remote, command: "mv /home/fbla/fbla-webserver/web /home/fbla/fbla-webserver/webfiles/fbla"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Save Other Builds') {
|
stage('Build') {
|
||||||
steps {
|
parallel {
|
||||||
script {
|
stage('Web Build') {
|
||||||
def remote = [
|
steps {
|
||||||
name: 'HostServer',
|
sh 'flutter build web --release --base-href /fbla/'
|
||||||
host: '192.168.0.216',
|
}
|
||||||
user: 'fbla',
|
}
|
||||||
password: 'fbla',
|
|
||||||
allowAnyHosts: true,
|
stage('Build Linux') {
|
||||||
]
|
steps {
|
||||||
if(env.BRANCH_NAME == 'main') {
|
sh 'flutter build linux --release'
|
||||||
sshRemove(path: '/home/fbla/builds/main/linux', remote: remote)
|
}
|
||||||
sshCommand remote: remote, command: "mkdir /home/fbla/builds/main/linux"
|
}
|
||||||
sshPut(from: 'build/linux/x64/release', into: '/home/fbla/builds/main/linux', remote: remote)
|
|
||||||
sshCommand remote: remote, command: "mv /home/fbla/builds/main/linux/release/* /home/fbla/builds/main/linux"
|
stage('Build APK') {
|
||||||
sshCommand remote: remote, command: "rm -R /home/fbla/builds/main/linux/release/"
|
steps {
|
||||||
sshRemove(path: '/home/fbla/builds/main/apk', remote: remote)
|
sh 'flutter build apk --release'
|
||||||
sshCommand remote: remote, command: "mkdir /home/fbla/builds/main/apk"
|
}
|
||||||
sshPut(from: 'build/app/outputs/apk/release', into: '/home/fbla/builds/main/apk', remote: remote)
|
}
|
||||||
sshCommand remote: remote, command: "mv /home/fbla/builds/main/apk/release/* /home/fbla/builds/main/apk"
|
|
||||||
sshCommand remote: remote, command: "rm -R /home/fbla/builds/main/apk/release/"
|
}
|
||||||
} else {
|
}
|
||||||
sshRemove(path: '/home/fbla/builds/dev/linux', remote: remote)
|
|
||||||
sshCommand remote: remote, command: "mkdir /home/fbla/builds/dev/linux"
|
stage('Deploy and Save') {
|
||||||
sshPut(from: 'build/linux/x64/release', into: '/home/fbla/builds/dev/linux', remote: remote)
|
parallel {
|
||||||
sshCommand remote: remote, command: "mv /home/fbla/builds/dev/linux/release/* /home/fbla/builds/dev/linux"
|
stage('Deploy Web Local') {
|
||||||
sshCommand remote: remote, command: "rm -R /home/fbla/builds/dev/linux/release/"
|
steps {
|
||||||
sshRemove(path: '/home/fbla/builds/dev/apk', remote: remote)
|
script {
|
||||||
sshCommand remote: remote, command: "mkdir /home/fbla/builds/dev/apk"
|
def remote = [
|
||||||
sshPut(from: 'build/app/outputs/apk/release', into: '/home/fbla/builds/dev/apk', remote: remote)
|
name : 'HostServer',
|
||||||
sshCommand remote: remote, command: "mv /home/fbla/builds/dev/apk/release/* /home/fbla/builds/dev/apk"
|
host : '192.168.0.216',
|
||||||
sshCommand remote: remote, command: "rm -R /home/fbla/builds/dev/apk/release/"
|
user : 'fbla',
|
||||||
}
|
password : 'fbla',
|
||||||
|
allowAnyHosts: true,
|
||||||
|
]
|
||||||
|
sshRemove(path: '/home/fbla/fbla-webserver/webfiles/fbla', remote: remote)
|
||||||
|
sshPut(from: 'build/web/', into: '/home/fbla/fbla-webserver', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mv /home/fbla/fbla-webserver/web /home/fbla/fbla-webserver/webfiles/fbla"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Save Other Builds') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def remote = [
|
||||||
|
name : 'HostServer',
|
||||||
|
host : '192.168.0.216',
|
||||||
|
user : 'fbla',
|
||||||
|
password : 'fbla',
|
||||||
|
allowAnyHosts: true,
|
||||||
|
]
|
||||||
|
if (env.BRANCH_NAME == 'main') {
|
||||||
|
sshRemove(path: '/home/fbla/builds/main/linux', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mkdir /home/fbla/builds/main/linux"
|
||||||
|
sshPut(from: 'build/linux/x64/release', into: '/home/fbla/builds/main/linux', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mv /home/fbla/builds/main/linux/release/* /home/fbla/builds/main/linux"
|
||||||
|
sshCommand remote: remote, command: "rm -R /home/fbla/builds/main/linux/release/"
|
||||||
|
sshRemove(path: '/home/fbla/builds/main/apk', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mkdir /home/fbla/builds/main/apk"
|
||||||
|
sshPut(from: 'build/app/outputs/apk/release', into: '/home/fbla/builds/main/apk', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mv /home/fbla/builds/main/apk/release/* /home/fbla/builds/main/apk"
|
||||||
|
sshCommand remote: remote, command: "rm -R /home/fbla/builds/main/apk/release/"
|
||||||
|
} else {
|
||||||
|
sshRemove(path: '/home/fbla/builds/dev/linux', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mkdir /home/fbla/builds/dev/linux"
|
||||||
|
sshPut(from: 'build/linux/x64/release', into: '/home/fbla/builds/dev/linux', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mv /home/fbla/builds/dev/linux/release/* /home/fbla/builds/dev/linux"
|
||||||
|
sshCommand remote: remote, command: "rm -R /home/fbla/builds/dev/linux/release/"
|
||||||
|
sshRemove(path: '/home/fbla/builds/dev/apk', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mkdir /home/fbla/builds/dev/apk"
|
||||||
|
sshPut(from: 'build/app/outputs/apk/release', into: '/home/fbla/builds/dev/apk', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mv /home/fbla/builds/dev/apk/release/* /home/fbla/builds/dev/apk"
|
||||||
|
sshCommand remote: remote, command: "rm -R /home/fbla/builds/dev/apk/release/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Deploy Remote') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
env.BRANCH_NAME == 'main'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def remote = [
|
||||||
|
name : 'MarinoDev',
|
||||||
|
host : 'marinodev.com',
|
||||||
|
port : 21098,
|
||||||
|
user : 'mariehdi',
|
||||||
|
identityFile : '/var/jenkins_home/marinoDevPrivateKey',
|
||||||
|
passphrase : 'marinodev',
|
||||||
|
allowAnyHosts: true,
|
||||||
|
]
|
||||||
|
sshRemove(path: '/home/mariehdi/public_html/fbla', remote: remote)
|
||||||
|
sshPut(from: '/var/jenkins_home/workspace/fbla-ui_main/build/web/', into: '/home/mariehdi/public_html/', remote: remote)
|
||||||
|
sshCommand remote: remote, command: "mv /home/mariehdi/public_html/web /home/mariehdi/public_html/fbla"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy Remote') {
|
|
||||||
when {
|
|
||||||
expression {
|
|
||||||
env.BRANCH_NAME == 'main'
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
def remote = [
|
|
||||||
name: 'MarinoDev',
|
|
||||||
host: 'marinodev.com',
|
|
||||||
port: 21098,
|
|
||||||
user: 'mariehdi',
|
|
||||||
identityFile: '/var/jenkins_home/marinoDevPrivateKey',
|
|
||||||
passphrase: 'marinodev',
|
|
||||||
allowAnyHosts: true,
|
|
||||||
]
|
|
||||||
sshRemove(path: '/home/mariehdi/public_html/fbla', remote: remote)
|
|
||||||
sshPut(from: '/var/jenkins_home/workspace/fbla-ui_main/build/web/', into: '/home/mariehdi/public_html/', remote: remote)
|
|
||||||
sshCommand remote: remote, command: "mv /home/mariehdi/public_html/web /home/mariehdi/public_html/fbla"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -24,7 +24,7 @@ if (flutterVersionName == null) {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.marinodev.fbla_ui"
|
namespace "com.marinodev.fbla_ui"
|
||||||
compileSdkVersion 34
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
ndkVersion "25.1.8937393"
|
ndkVersion "25.1.8937393"
|
||||||
// ndkVersion flutter.ndkVersion
|
// ndkVersion flutter.ndkVersion
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ android {
|
|||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion flutter.minSdkVersion
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 34
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user