2024-01-06 19:49:11 +00:00
|
|
|
pipeline {
|
2024-01-06 19:50:22 +00:00
|
|
|
agent any
|
2024-01-06 19:49:11 +00:00
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
. "$HOME/.cargo/env"
|
|
|
|
trunk build --release --public-url "cool-stuff/plate-tool-beta/"
|
|
|
|
'''
|
|
|
|
}
|
2024-01-06 20:00:50 +00:00
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps {
|
|
|
|
zip zipFile: "dist.zip", archive: true, dir: "dist/"
|
|
|
|
archiveArtifacts artifacts: "dist.zip", fingerprint: true
|
|
|
|
}
|
|
|
|
}
|
2024-01-06 20:12:25 +00:00
|
|
|
stage('Transfer') {
|
|
|
|
steps {
|
|
|
|
sh "sftp oracle <<< put -r dist"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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"
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2024-01-06 19:49:11 +00:00
|
|
|
}
|
|
|
|
}
|