Update main version #7

Merged
emilia merged 4 commits from beta-release into main 2024-01-31 02:00:41 +00:00
1 changed files with 13 additions and 2 deletions
Showing only changes of commit 1f213f47e8 - Show all commits

15
Jenkinsfile vendored
View File

@ -2,11 +2,22 @@ pipeline {
agent any agent any
stages { stages {
stage('Setup') {
if (env.BRANCH_NAME == 'main') {
environment {
OUTPUT_DIR = 'plate-tool'
}
} else {
environment {
OUTPUT_DIR = 'plate-tool-beta'
}
}
}
stage('Build') { stage('Build') {
steps { steps {
sh ''' sh '''
. "$HOME/.cargo/env" . "$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') { stage('Deploy') {
steps { steps {
sh ''' 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"
''' '''
} }
} }