Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Test git run in Jenkins shell
Browse files Browse the repository at this point in the history
  • Loading branch information
john-odonnell committed Jul 12, 2022
1 parent 681f24c commit ecbd0a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ pipeline {
}
}

stage('Does Git run in Jenkins shell without unsafe repo error?') {
steps {
sh '''
echo "${PWD}"
git version
git status
docker run -i --rm \
--entrypoint /bin/sh \
-v $PWD:/src -w /src \
alpine/git -c "
git config --global --add safe.directory /src
git clean -fxd
"
'''
}
}

// Only publish to RubyGems if the HEAD is
// tagged with the same version as in version.rb
stage('Publish to RubyGems') {
Expand Down

0 comments on commit ecbd0a7

Please sign in to comment.