Edit the jenkinsfile
This commit is contained in:
parent
ea444adfc4
commit
270d097102
1 changed files with 17 additions and 26 deletions
37
Jenkinsfile
vendored
37
Jenkinsfile
vendored
|
@ -2,11 +2,7 @@ pipeline {
|
|||
agent any
|
||||
|
||||
options {
|
||||
buildDiscarder(
|
||||
logRotator(
|
||||
numToKeepStr: '5'
|
||||
)
|
||||
)
|
||||
buildDiscarder(logRotator(numToKeepStr: '5'))
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -15,32 +11,29 @@ pipeline {
|
|||
label 'linux'
|
||||
}
|
||||
steps {
|
||||
|
||||
script {
|
||||
sh '''
|
||||
#!/bin/bash
|
||||
// Ensure that all necessary directories exist before operations
|
||||
sh 'flutter pub get'
|
||||
sh 'chmod +x compile.sh'
|
||||
sh './compile.sh'
|
||||
|
||||
flutter pub get
|
||||
chmod +x compile.sh
|
||||
./compile.sh
|
||||
|
||||
cd build/linux/x64/release/bundle
|
||||
tar -cvf ../../../../../linux.tgz ./
|
||||
cd ../../../../app/outputs/flutter-apk
|
||||
cp app-release.apk ../../../../
|
||||
'''
|
||||
// Move to the correct directories and archive artifacts
|
||||
dir('build/linux/x64/release/bundle') {
|
||||
archiveArtifacts artifacts: '*.tgz', fingerprint: true
|
||||
}
|
||||
dir('build/app/outputs/flutter-apk') {
|
||||
archiveArtifacts artifacts: '*.apk', fingerprint: true
|
||||
}
|
||||
archiveArtifacts artifacts: 'out/*nb*', fingerprint: true
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: '*.tgz', fingerprint: true
|
||||
archiveArtifacts artifacts: '*.apk', fingerprint: true
|
||||
archiveArtifacts artifacts: 'out/*nb*', fingerprint: true
|
||||
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build on Windows') {
|
||||
agent {
|
||||
label 'windows'
|
||||
|
@ -48,8 +41,6 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
bat '''
|
||||
@echo off
|
||||
|
||||
flutter build windows
|
||||
dart compile exe -o out/snbt2nbt.exe bin/snbt2nbt.dart
|
||||
dart compile exe -o out/nbt2snbt.exe bin/nbt2snbt.dart
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue