This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import pickle | |
| from google_auth_oauthlib.flow import InstalledAppFlow | |
| from googleapiclient.discovery import build | |
| SCOPES = ['https://www.googleapis.com/auth/drive.file'] | |
| def authenticate(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import pickle | |
| import google.auth | |
| from google.auth.transport.requests import Request | |
| from googleapiclient.discovery import build | |
| from google_auth_oauthlib.flow import InstalledAppFlow | |
| from googleapiclient.http import MediaFileUpload | |
| SCOPES = ['https://www.googleapis.com/auth/drive.file'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| success { | |
| echo "Performans Testi Başarılı" | |
| emailext ( | |
| subject: "JMeter Performance Test SUCCESS", | |
| body: "Performans testi başarıyla tamamlandı. Rapora Google Drive linki üzerinden erişebilirsiniz:\n\n${env.FILE_LINK}", | |
| attachLog: false, | |
| to: 'ozkanberke1305@gmail.com' | |
| ) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bat 'if exist "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report" rd /s /q "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report"' | |
| bat 'if exist "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\result.jtl" del "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\result.jtl"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bat '"C:\\Program Files\\apache-jmeter-5.6.3\\bin\\jmeter.bat" -n -t "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\DummySamplerExample.jmx" -l "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\result.jtl" -e -o "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script { | |
| bat "if exist \"C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report.zip\" del \"C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report.zip\"" | |
| bat "powershell Compress-Archive -Path 'C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report\\*' -DestinationPath 'C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report.zip' -Force" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script { | |
| def zipFileName = "report.zip" | |
| def zipPath = "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report.zip" | |
| bat 'dir "C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project"' | |
| archiveArtifacts allowEmptyArchive: true, artifacts: 'C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\report.zip', followSymlinks: false | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install - upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script { | |
| def fileLink = bat(script: 'C:\\Users\\ozkan\\AppData\\Local\\Programs\\Python\\Python313\\python.exe C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\JMeter_Integrate_Project\\upload_to_drive.py', returnStdout: true).trim() | |
| def driveLink = fileLink.split("\n").find { it.contains("https://drive.google.com") } | |
| env.FILE_LINK = "Google Drive Link: ${driveLink}" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE USER "tester" WITH PASSWORD 'tester' WIRH ALL PRIVELEGES |
NewerOlder