Update main version #7
|
@ -2,11 +2,22 @@ pipeline {
|
|||
agent any
|
||||
|
||||
stages {
|
||||
stage('Setup') {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
environment {
|
||||
OUTPUT_DIR = 'plate-tool'
|
||||
}
|
||||
} else {
|
||||
environment {
|
||||
OUTPUT_DIR = 'plate-tool-beta'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '''
|
||||
. "$HOME/.cargo/env"
|
||||
trunk build --release --public-url "cool-stuff/plate-tool-beta/"
|
||||
trunk build --release --public-url "cool-stuff/$OUTPUT_DIR/"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +35,7 @@ pipeline {
|
|||
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"
|
||||
ssh oracle "sudo rm -rf /usr/share/nginx/html/$OUTPUT_DIR/ && sudo mv dist /usr/share/nginx/html/$OUTPUT_DIR"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue