From cf75a7ff956f76da33a3bd9934347438599d264f Mon Sep 17 00:00:00 2001 From: henryeknyarko Date: Thu, 7 Dec 2023 21:33:05 +0000 Subject: [PATCH 1/3] Updated Readme develop --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ac99db..4add87a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Build and Deploy nodejs application on EC2 instance - Freestyle +# Build and Deploy nodejs application on EC2 instance - FreestyleS # Pre-requisites From 4df1cb246f3bc69d1e65344d3f54a451385278c5 Mon Sep 17 00:00:00 2001 From: henryeknyarko Date: Thu, 7 Dec 2023 21:34:41 +0000 Subject: [PATCH 2/3] RM J --- Jenkinsfile | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 84530c2..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,28 +0,0 @@ -pipeline { - - agent any - - stages { - - stage('Install Dependencies') { - steps { - sh 'npm install' - } - } - - stage('Test') { - steps { - sh 'echo "testing application..."' - } - } - - stage("Deploy application") { - steps { - sh 'echo "deploying application..."' - } - - } - - } - - } From 93395e120f5bc5aec6ba911dc82cf109a6a3e28f Mon Sep 17 00:00:00 2001 From: henryeknyarko Date: Thu, 7 Dec 2023 21:38:41 +0000 Subject: [PATCH 3/3] New file Jenkinsfile --- Jenkinsfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..80e410d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,46 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + // Checkout code from the Git repository + script { + checkout scm + } + } + } + + stage('Build') { + steps { + // Build the project (Replace 'your_build_command' with the actual build command) + script { + sh 'your_build_command' + } + } + } + + stage('Test') { + steps { + // Run tests (Replace 'your_test_command' with the actual test command) + script { + sh 'your_test_command' + } + } + } + } + + post { + success { + // Actions to be taken if the build is successful + echo 'Build successful! Deploying...' + // Add deployment steps or other post-build actions here + } + + failure { + // Actions to be taken if the build fails + echo 'Build failed! Not deploying.' + // Add failure handling or notifications here + } + } +}