Pushing a new file to a git branch using Jenkins -
we migrating our code base svn gitlab , in preparation attempting test basic functionality between git , jenkins. 1 of areas having issue pushing new file git.
the console log appears though push worked expected actual git repo has no record of push happening.
here shown in console:
cloning remote git repository
remote: counting objects
remote: compressing objects
receiving objects
resolving deltas
updating references
checking out revision a0523f53acf74c5d4fd464d8b1126102c00fd9ee (origin/master)
[test-post-to-git2] $ cmd /c call >c:\users\admin\appdata\local\temp\hudson741863400083270764.bat
[test-post-to-git2] $ cmd /c call >c:\users\admin\appdata\local\temp\hudson7082713428543839601.batf:\jenkins\workspace\test-post-to-git2>git add .
f:\jenkins\workspace\test-post-to-git2>git commit -am "adding gittest.txt"
[localmaster ac6b719] adding gittest.txt
2 files changed, 513 insertions(+), 512 deletions(-)
create mode 100644 gittest.txtf:\jenkins\workspace\test-post-to-git2>exit 0
pushing head branch master @ repo origin
opening connection
counting objects
finding sources
getting sizes
compressing objects
writing objects
finished: success
despite console showing pushed there no changes found within git itself. still learning git entirely possible missing simple.
i forgot note attempting push using git publisher rather batch command selecting option 'push if build succeeds', branch push set 'master', , target remote name set 'origin'.
it not seem thou have pushed changed remote repository. once commit in git, changes in local repository. changes remote repository(the 1 jenkins sees) need push changes.
git push origin <branchname>
Comments
Post a Comment