Jenkins发布流程向Azure仓库推送存在问题。

huangapple go评论108阅读模式
英文:

Issue with pushing from my Jenkins release pipeline to Azure repo

问题

I'm using maven release plugin to update versions in my pom files for releases. I have an issue that was related to this post when Jenkins is in detached head for checkout: https://stackoverflow.com/questions/20351051/git-fatal-ref-head-is-not-a-symbolic-ref-while-using-maven-release-plugin. I then went to additional behaviors and used the "checkout to specific local branch" and inputted the corresponding branch. Now I've run into an issue where it's adding onto the URL as it's trying to push back to the repo.

[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] fatal: repository 'https://visualstudio.com/myproject/_git/Test/example/' not found
[ERROR] -> [Help 1]

How can I make it to where "example" is not added on to the URL for the push? Been stuck on this for a while, any help with this is greatly appreciated.

Edit: The "example" tag at the end of the URL is the artifact id in the child pom. This is tagged on due to our old SVN URL. How can I omit this from pushing to the new repo URL?

com.example.something
example
trunk-SNAPSHOT pom ${project.artifactId}
${project.artifactId}

英文:

I'm using maven release plugin to update versions in my pom files for releases. I have an issue that was related to this post when jenkins is in detached head for checkout: https://stackoverflow.com/questions/20351051/git-fatal-ref-head-is-not-a-symbolic-ref-while-using-maven-release-plugin. I then went to additional behaviors and used the "checkout to specific local branch" and inputted the corresponding branch. Now I've run into an issue where its adding onto the URL as its trying to push back to the repo.

[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] fatal: repository 'https://visualstudio.com/myproject/_git/Test/example/' not found
[ERROR] -> [Help 1]

How can I make it to where "example" is not added on to the URL for the push? Been stuck on this for a while, any help with this is greatly appreciated.

Edit: The "example" tag at the end of the URL is the artifact id in the child pom. This is tagged on due to our old svn url. How can I omit this from pushing to the new repo URL?

<groupId>com.example.something</groupId>
<artifactId>example</artifactId>
<version>trunk-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>

答案1

得分: 0

"added the artifact as "." this made the URL resolve... May not be conventional but worked." 的中文翻译是:"将该工件添加为"." 这使URL解析... 可能不太常规,但有效。"

英文:

added the artifact as "." this made the URL resolve... May not be conventional but worked.

huangapple
  • 本文由 发表于 2023年8月5日 02:49:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76838498.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定