j
This commit is contained in:
		
							
								
								
									
										20
									
								
								jenkinsfile
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								jenkinsfile
									
									
									
									
									
								
							@@ -1,28 +1,28 @@
 | 
			
		||||
pipeline {
 | 
			
		||||
  agent {
 | 
			
		||||
    label 'python' // Verwendet den Jenkins-Agenten mit dem Label 'python'
 | 
			
		||||
    label 'python' // Uses the Jenkins agent with the label 'python'
 | 
			
		||||
  }
 | 
			
		||||
  stages {
 | 
			
		||||
    stage('Build') {
 | 
			
		||||
      steps {
 | 
			
		||||
        bat """
 | 
			
		||||
          @echo off
 | 
			
		||||
          rem Setze den Pfad zum Arbeitsverzeichnis
 | 
			
		||||
          cd C:\\Program Files\\jenkins-agent\\workspace\\TS
 | 
			
		||||
          rem Set the path to the workspace directory
 | 
			
		||||
          cd C:/Program Files/jenkins-agent/workspace/TS
 | 
			
		||||
 | 
			
		||||
          rem Lösche den "dist" Ordner, falls er existiert
 | 
			
		||||
          rem Delete the "dist" folder if it exists
 | 
			
		||||
          if exist dist rmdir /s /q dist
 | 
			
		||||
 | 
			
		||||
          rem Führe PyInstaller aus, um die Python-Anwendung in eine einzige ausführbare Datei zu kompilieren
 | 
			
		||||
          rem Use PyInstaller to compile the Python application into a single executable file
 | 
			
		||||
          python -m PyInstaller --onefile main.py
 | 
			
		||||
 | 
			
		||||
          rem Verschiebe den "resources" Ordner in den "dist" Ordner
 | 
			
		||||
          runas /user:Jenkins move /Y resources dist
 | 
			
		||||
          rem Move the "resources" folder into the "dist" folder
 | 
			
		||||
          move resources dist
 | 
			
		||||
 | 
			
		||||
          rem Ausgabe einer Erfolgsmeldung
 | 
			
		||||
          echo Resources Ordner wurde erfolgreich in den dist Ordner verschoben.
 | 
			
		||||
          rem Output a success message
 | 
			
		||||
          echo Resources folder was successfully moved to the dist folder.
 | 
			
		||||
        """
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user