33 lines
684 B
Groovy
33 lines
684 B
Groovy
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 "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"
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
}
|