From d03ce5630bccceb38e5fcf9b92b756da46620c55 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 10 Jul 2024 00:18:57 -0700 Subject: [PATCH] Upload files to '' --- Jenkinsfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ test1.cpp | 9 +++++++++ 2 files changed, 53 insertions(+) create mode 100644 Jenkinsfile create mode 100644 test1.cpp diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..acafac8 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent any + stages { + stage('Clone the repo') { + steps { + echo "Clone the repo" + sh "rm -fr jenkins-test3" + git branch: 'main', credentialsId: 'test', url: 'https://github.com/mh-lornejad/jenkins-test3.git' + } + } + stage('Code Analysis') { + parallel { + stage('CppCheck') { + steps { + sleep 3 + sh 'cppcheck_configs/cpp_check_scripts.sh' + } + } + stage('Clang Tidy') { + steps { + sh 'clang_configs/clang_tidy_script.sh' + } + } + + stage('Clang Format') { + steps { + sh 'clang_configs/clang_format_script.sh' + } + } + } + } + stage('Deploy') { + steps { + sleep 10 + echo "Deploy" + } + } + stage('Cleaning') { + steps { + sh "rm -fr jenkins-test3" + } + } + } +} diff --git a/test1.cpp b/test1.cpp new file mode 100644 index 0000000..35cc759 --- /dev/null +++ b/test1.cpp @@ -0,0 +1,9 @@ +#include + +int main() { + int a = 5; + int b = 10; + int sum = a + b; + printf("Sum: %d\n", sum); + return 0; +}