reformat jenkinsfile again x6
This commit is contained in:
parent
bf53db3524
commit
96b608d0c1
54
Jenkinsfile
vendored
54
Jenkinsfile
vendored
@ -3,7 +3,8 @@ pipeline {
|
||||
stages {
|
||||
stage('Flutter Cleanup/Update') {
|
||||
steps {
|
||||
sh '''flutter upgrade --force
|
||||
sh '''cd fbla_ui
|
||||
flutter upgrade --force
|
||||
flutter pub upgrade
|
||||
flutter --version
|
||||
flutter doctor
|
||||
@ -14,39 +15,39 @@ pipeline {
|
||||
parallel {
|
||||
stage('Build API') {
|
||||
steps {
|
||||
sh '''docker image prune -f
|
||||
sh '''cd fbla-api
|
||||
docker image prune -f
|
||||
docker build --no-cache -t fbla-api .
|
||||
docker-compose down
|
||||
docker-compose up -d'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('UI Web Build') {
|
||||
steps {
|
||||
sh 'flutter build web --release --base-href /fbla/'
|
||||
sh '''cd fbla_ui
|
||||
flutter build web --release --base-href /fbla/'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('UI Linux Build') {
|
||||
steps {
|
||||
sh 'flutter build linux --release'
|
||||
sh '''cd fbla_ui
|
||||
flutter build linux --release'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('UI APK Build') {
|
||||
steps {
|
||||
sh 'flutter build apk --release'
|
||||
sh '''cd fbla_ui
|
||||
flutter build apk --release'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stage('Deploy and Save') {
|
||||
parallel {
|
||||
stage('Run API Tests') {
|
||||
steps {
|
||||
sh '''dart pub install
|
||||
sh '''cd fbla_ui
|
||||
dart pub get
|
||||
dart run ./test/fbla_api_test.dart'''
|
||||
}
|
||||
}
|
||||
@ -54,10 +55,10 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
def remote = [
|
||||
name: 'HostServer',
|
||||
host: '192.168.0.216',
|
||||
user: '${env.JOBLINK_LOCAL_USER}',
|
||||
password: '${env.JOBLINK_LOCAL_PASSWD}',
|
||||
name : 'HostServer',
|
||||
host : '192.168.0.216',
|
||||
user : '${env.JOBLINK_LOCAL_USER}',
|
||||
password : '${env.JOBLINK_LOCAL_PASSWD}',
|
||||
allowAnyHosts: true,
|
||||
]
|
||||
sshRemove(path: '/home/${env.JOBLINK_LOCAL_USER}/fbla-webserver/webfiles/fbla', remote: remote)
|
||||
@ -66,18 +67,17 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Save Other Builds') {
|
||||
steps {
|
||||
script {
|
||||
def remote = [
|
||||
name: 'HostServer',
|
||||
host: '192.168.0.216',
|
||||
user: '${env.JOBLINK_LOCAL_USER}',
|
||||
password: '${env.JOBLINK_LOCAL_PASSWD}',
|
||||
name : 'HostServer',
|
||||
host : '192.168.0.216',
|
||||
user : '${env.JOBLINK_LOCAL_USER}',
|
||||
password : '${env.JOBLINK_LOCAL_PASSWD}',
|
||||
allowAnyHosts: true,
|
||||
]
|
||||
if(env.BRANCH_NAME == 'main') {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
sshRemove(path: '/home/${env.JOBLINK_LOCAL_USER}/builds/main/linux', remote: remote)
|
||||
sshCommand remote: remote, command: "mkdir /home/${env.JOBLINK_LOCAL_USER}/builds/main/linux"
|
||||
sshPut(from: 'build/linux/x64/release', into: '/home/${env.JOBLINK_LOCAL_USER}/builds/main/linux', remote: remote)
|
||||
@ -112,12 +112,12 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
def remote = [
|
||||
name: 'MarinoDev',
|
||||
host: 'marinodev.com',
|
||||
port: 21098,
|
||||
user: '${env.JOBLINK_REMOTE_USER}',
|
||||
identityFile: '/var/jenkins_home/marinoDevPrivateKey',
|
||||
passphrase: '${env.JOBLINK_REMOTE_PASSWD}',
|
||||
name : 'MarinoDev',
|
||||
host : 'marinodev.com',
|
||||
port : 21098,
|
||||
user : '${env.JOBLINK_REMOTE_USER}',
|
||||
identityFile : '/var/jenkins_home/marinoDevPrivateKey',
|
||||
passphrase : '${env.JOBLINK_REMOTE_PASSWD}',
|
||||
allowAnyHosts: true,
|
||||
]
|
||||
sshRemove(path: '/home/${env.JOBLINK_REMOTE_USER}/public_html/fbla', remote: remote)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user