首页 > 解决方案 > Jenkins 中的代码更改未显示在 BitBucket 存储库中

问题描述

我在 Jenkins 有一个自由风格的项目。我在其中配置了 git,如下所示:
在此处输入图像描述

并在将更改推送到 BitBucket 时将触发器构建为Build 。我使用Content Replace插件对获取到 Jenkins 的代码进行了一些更改。我想将这些更改推回 Bitbucket。我有如下构建后操作:
在此处输入图像描述

成功构建后,更改不会显示在 Bitbucket 中。以下是构建日志:

    Started by user Muhammad Jamshaid Iqbal
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/Ceye-admin
The recommended git tool is: NONE
using credential 54ad2528-b143-4dc5-978f-ff99de2c28f3
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url http://ip:7990/scm/tes/ceye-admin.git # timeout=10
Fetching upstream changes from http://ip:7990/scm/tes/ceye-admin.git
 > git --version # timeout=10
 > git --version # 'git version 2.20.1'
using GIT_ASKPASS to set credentials 
 > git fetch --tags --force --progress -- http://ip.4:7990/scm/tes/ceye-admin.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 89acfff8ce6d3bd9fb7382143557c84b0d50e9c7 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 89acfff8ce6d3bd9fb7382143557c84b0d50e9c7 # timeout=10
Commit message: "nginx.conf edited online with Bitbucket"
 > git rev-list --no-walk 89acfff8ce6d3bd9fb7382143557c84b0d50e9c7 # timeout=10
content-replace start
 > replace content of file: /var/jenkins_home/workspace/Ceye-admin/nginx.conf
   > replace : [            proxy_pass http://ip1:9091/;] => [            proxy_pass http://ip2:9091/;]
   > replace : [            proxy_pass http://ip1:9093/jasperserver/;] => [            proxy_pass http://ip2:9093/jasperserver/;]
   > replace : [            proxy_pass http://ip1:9092/login?next=/;] => [            proxy_pass http://ip2:9092/login?next=/;]
   > replace : [            proxy_pass http://ip1:9092/static;] => [            proxy_pass http://ip2:9092/static;]
   > replace times: 4, [ip1] => [ip2]
content-replace end
The recommended git tool is: NONE
using credential 54ad2528-b143-4dc5-978f-ff99de2c28f3
Pushing HEAD to branch master at repo origin
 > git --version # timeout=10
 > git --version # 'git version 2.20.1'
using GIT_ASKPASS to set credentials 
 > git push http://git_link:7990/scm/tes/ceye-admin.git HEAD:master # timeout=10
Finished: SUCCESS 

我在这里可能做错了什么?Jenkins 中的一切都正常工作,但更改未出现在 BitBucket 存储库中。

标签: gitjenkinsbitbucket

解决方案


推荐阅读