From 7b41634cfe94b55ebc430ea5fc13da1d11f0689a Mon Sep 17 00:00:00 2001 From: Sanchit Vijay Date: Sat, 13 Apr 2024 15:33:14 -0400 Subject: [PATCH] cloning instead --- ci/Jenkinsfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 97af914..007124d 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -103,13 +103,24 @@ pipeline { junit 'pytest-report.xml' } } + cleanup{ + cleanWs( + cleanWhenNotBuilt: false, + deleteDirs: true, + disableDeferredWipeout: true, + notFailBuild: true, + patterns: [[pattern: '.gitignore', type: 'INCLUDE'], + [pattern: '.propsfile', type: 'EXCLUDE']] + ) + } } } } post { failure{ sshagent(credentials: ['GithubKey']){ - sh 'git checkout main' + sh 'git clone git@github.com:arjbingly/Capstone_5.git' + sh 'cd Capstone_5' sh 'python3 ci/modify_test_status.py --fail' sh 'git add README.md' sh 'git commit -m "test status updated"' @@ -118,7 +129,8 @@ pipeline { } success{ sshagent(credentials: ['GithubKey']){ - sh 'git checkout main' + sh 'git@github.com:arjbingly/Capstone_5.git' + sh 'cd Capstone_5' sh 'python3 ci/modify_test_status.py --fail' sh 'git add README.md' sh 'git commit -m "test status updated"'