pipeline {
    agent any
    
    stages {
        stage('Checkout') {
        steps {
                git url: 'https://git.comsys.kpi.ua/huk_dmytro/babenko_test_cicd.git', credentialsId: 'access_for_jenkins'
            }
        }
        
        stage('Build') {
        steps {
            bat '"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" test_repos.sln /p:Configuration=Release'
            }
        }
            
        
        
        stage('Test') {
        steps {
            bat '"x64\\Debug\\test_repos.exe" --gtest_output="xml:test_report.xml"'
            }
        }}
        
        post {
    always {
        // Publish test results using the junit step
        junit 'test_report.xml' // Specify the path to the XML test result files
    }
}
}