2 changed files with 53 additions and 0 deletions
			
			
		@ -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" | 
				
			|||
            } | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,9 @@ | 
				
			|||
#include <stdio.h> | 
				
			|||
 | 
				
			|||
int main() { | 
				
			|||
  int a = 5; | 
				
			|||
  int b = 10; | 
				
			|||
  int sum = a + b; | 
				
			|||
  printf("Sum: %d\n", sum); | 
				
			|||
  return 0; | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue