Test Jenkinsfile for building plate-tool-beta
Gitea Scan/plate-tool/pipeline/head This commit looks good Details

Hotfix #1

Hotfix #2

Hothix #4

Hotfix #5

Transfer & Deploy steps

Hotfix #6

Hotfix #7

Hotfix #8
This commit is contained in:
Emilia Allison 2024-01-06 14:49:11 -05:00 committed by Emilia
parent bce56be33e
commit 984bbda0c1
Signed by: emilia
GPG Key ID: 05D5D1107E5100A1
1 changed files with 40 additions and 0 deletions

40
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,40 @@
pipeline {
agent any
stages {
stage('Build') {
steps {
sh '''
. "$HOME/.cargo/env"
trunk build --release --public-url "cool-stuff/plate-tool-beta/"
'''
}
}
stage('Archive') {
steps {
zip zipFile: "dist.zip", archive: true, dir: "dist/"
archiveArtifacts artifacts: "dist.zip", fingerprint: true
}
}
stage('Transfer') {
steps {
sh 'echo "put -r dist/" | sftp oracle'
}
}
stage('Deploy') {
steps {
sh '''
ssh oracle "sudo rm -rf /usr/share/nginx/html/plate-tool-beta/ && sudo mv dist /usr/share/nginx/html/plate-tool-beta"
'''
}
}
}
post {
always {
cleanWs(notFailBuild: true,
deleteDirs: true,
cleanWhenNotBuilt: false,
patterns: [[pattern: 'target/', type: 'EXCLUDE']])
}
}
}