Jenkinsfile compatability with main
	
		
			
	
		
	
	
		
			
				
	
				Gitea Scan/plate-tool/pipeline/head There was a failure building this commit
				
					Details
				
			
		
	
				
					
				
			
				
	
				Gitea Scan/plate-tool/pipeline/head There was a failure building this commit
				
					Details
				
			
		
	This commit is contained in:
		
							parent
							
								
									984bbda0c1
								
							
						
					
					
						commit
						1f213f47e8
					
				| 
						 | 
					@ -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"
 | 
				
			||||||
			'''
 | 
								'''
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue