From f15e8a65761081f1432c466c621f56fdd84180d7 Mon Sep 17 00:00:00 2001 From: Sami Date: Sat, 28 Sep 2024 16:03:08 -0400 Subject: [PATCH] fix: 1 --- Jenkinsfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..14b2775 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,49 @@ +pipeline { + agent any + + environment { + // Define environment variables + PROJECT_DIR = 'your_project_directory' + } + + stages { + stage('Build') { + steps { + echo 'Building the project...' + // You can add your build tool commands here (e.g., Maven, Gradle, npm) + sh 'echo "Building project in ${PROJECT_DIR}"' + } + } + + stage('Test') { + steps { + echo 'Running tests...' + // Example: Run tests with a test framework (e.g., JUnit, Mocha) + sh 'echo "Running tests in ${PROJECT_DIR}"' + } + } + + stage('Deploy') { + steps { + echo 'Deploying the application...' + // Example: You can add your deployment steps (e.g., Docker push, SCP, Kubernetes apply) + sh 'echo "Deploying project from ${PROJECT_DIR}"' + } + } + } + + post { + always { + echo 'Cleaning up...' + // Clean workspace to ensure no leftover files affect future builds + cleanWs() + } + success { + echo 'Pipeline finished successfully!' + } + failure { + echo 'Pipeline failed.' + } + } +} +