Heute hatte ich das Jenkins-Release-Plugin mit Maven Build eine Freigabe, aber war fehlgeschlagen. Hatte das Protokoll überprüfen, aber der Fehler scheint seltsam. Auch ich hatte den Job mit Git und Maven aufgebaut, nutze den SSH-Safe-Modus. Es waren alle Erfolge vor tag SCM
Prozess, dann wirft eine Nachricht [ERROR] *** Please tell me who you are.
Warum?Verwenden Sie Jenkins Build-Release mit Maven-Release-Plugin auf den SSH-Key-Anmeldeinformationen fehlgeschlagen
Die Umgebung, in meinem lokalen dem Detail sieht Schlag:
- Git
git version 2.6.3.windows.1
- Git Repository Server verwenden GitBlit1.6 (Verwendung SSH sicheres Modell)
- CI-Server verwenden, um die Jenkins ver.1.6 .42.3
- OS verwenden, um die Windows8.1
Das maven-Projekt ElternmodulEinstellung 210 Datei wie Schlag:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.elkan1788</groupId>
<artifactId>release-parent</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>release-parent</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<project.env>develop</project.env>
<project.version>1.0.3</project.version>
</properties>
</profile>
<profile>
<id>stable</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<project.env>stable</project.env>
<project.version>1.0.2</project.version>
</properties>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0-alpha-1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.elkan1788</groupId>
<artifactId>release-common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-source</id>
<phase>deploy</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
<arguments>-Pstable</arguments>
<pushChanges>true</pushChanges>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
<scm>
<url>https://git-scm.com/</url>
<connection>scm:git:ssh://[email protected]:29418/maven-release-learn.git</connection>
<developerConnection>scm:git:ssh://[email protected]:29418/maven-release-learn.git</developerConnection>
</scm>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://192.168.10.140/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://192.168.10.140/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
Die Jenkins Nachricht wie Schlag Konsole aus:
Started by user Admistrator
Building in workspace D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace
> D:\DevelopTools\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> D:\DevelopTools\Git\bin\git.exe config remote.origin.url ssh://[email protected]:29418/maven-release-learn.git # timeout=10
Fetching upstream changes from ssh://[email protected]:29418/maven-release-learn.git
> D:\DevelopTools\Git\bin\git.exe --version # timeout=10
using GIT_SSH to set credentials SSH KEY
> D:\DevelopTools\Git\bin\git.exe -c core.askpass=true fetch --tags --progress ssh://[email protected]:29418/maven-release-learn.git +refs/heads/*:refs/remotes/origin/*
> D:\DevelopTools\Git\bin\git.exe rev-parse "refs/remotes/origin/develop^{commit}" # timeout=10
> D:\DevelopTools\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/develop^{commit}" # timeout=10
Checking out Revision e11fe83abdb40fa2801f693d8a52023241417fec (refs/remotes/origin/develop)
> D:\DevelopTools\Git\bin\git.exe config core.sparsecheckout # timeout=10
> D:\DevelopTools\Git\bin\git.exe checkout -f e11fe83abdb40fa2801f693d8a52023241417fec
> D:\DevelopTools\Git\bin\git.exe rev-list e11fe83abdb40fa2801f693d8a52023241417feC# timeout=10
Parsing POMs
Established TCP socket on 63809
[source] $ D:\DevelopTools\Java\jdk1.8.0_45/bin/java -cp D:\DevelopTools\Jenkins-1.642\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;D:\DevelopTools\apache-maven-3.3.3\boot\plexus-classworlds-2.5.2.jar;D:\DevelopTools\apache-maven-3.3.3/conf/logging jenkins.maven3.agent.Maven32Main D:\DevelopTools\apache-maven-3.3.3 D:\DevelopTools\Jenkins-1.642\war\WEB-INF\lib\remoting-2.53.3.jar D:\DevelopTools\Jenkins-1.642\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar D:\DevelopTools\Jenkins-1.642\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 63809
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace\source\pom.xml -s D:\DevelopTools\apache-maven-3.3.3\conf\settings.xml -gs D:\DevelopTools\apache-maven-3.3.3\conf\settings.xml -DdevelopmentVersion=1.0.2-SNAPSHOT -DreleaseVersion=1.0.1 -DscmCommentPrefix=[maven-release-plugin] -Dresume=true release:prepare release:perform
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] release-parent
[INFO] release-common
[INFO] release-web
[INFO] maven-release-learn
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-release-learn 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) @ maven-release-learn ---
[INFO] Resuming release from phase 'scm-tag'
[INFO] Tagging release with the label 1.0.1...
[INFO] Executing: cmd.exe /X /C "git tag -F C:\Windows\TEMP\maven-scm-343084628.commit 1.0.1"
[INFO] Working directory: D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace\source
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] release-parent ..................................... SKIPPED
[INFO] release-common ..................................... SKIPPED
[INFO] release-web ........................................ SKIPPED
[INFO] maven-release-learn ................................ FAILURE [ 2.185 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.986 s
[INFO] Finished at: 2016-04-05T10:04:54+08:00
[INFO] Final Memory: 17M/248M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project maven-release-learn: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-tag command failed.
[ERROR] Command output:
[ERROR]
[ERROR] *** Please tell me who you are.
[ERROR]
[JENKINS] Archiving D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace\source\release-web\pom.xml to io.github.elkan1788/release-web/1.0.1-SNAPSHOT/release-web-1.0.1-SNAPSHOT.pom
[ERROR] Run
[ERROR]
[ERROR] git config --global user.email "[email protected]"
[ERROR] git config --global user.name "Your Name"
[ERROR]
[ERROR] to set your account's default identity.
[ERROR] Omit --global to set the identity only in this repository.
[ERROR]
[ERROR] fatal: empty ident name (for <[email protected](none)>) not allowed
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :maven-release-learn
[JENKINS] Archiving D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace\source\release-common\pom.xml to io.github.elkan1788/release-common/1.0.1-SNAPSHOT/release-common-1.0.1-SNAPSHOT.pom
[JENKINS] Archiving D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace\source\pom.xml to io.github.elkan1788/maven-release-learn/1.0.1-SNAPSHOT/maven-release-learn-1.0.1-SNAPSHOT.pom
[JENKINS] Archiving D:\DevelopTools\Jenkins-1.642\jobs\release-develop\workspace\source\release-parent\pom.xml to io.github.elkan1788/release-parent/1.0.1-SNAPSHOT/release-parent-1.0.1-SNAPSHOT.pom
channel stopped
Finished: FAILURE
Überprüfen Sie die Fehlermeldung festgestellt, dass git user.name und user.email Einstellung brauchen scheint. Aber diese Dinge sind auch gut in meiner lokalen Maschine, und die Maven-Version: vorbereiten kann in CMD
laufen. Also, was ist los?
Supplement
The Jenkins und Git alle laufen in meinem lokalen und git globale Einstellung in Ordnung ist, sehen blasen:
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=D:/DevelopTools/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
merge.tool=kdiff3
diff.guitool=kdiff3
core.editor="D:/DevelopTools/GitExtensions/GitExtensions.exe" fileeditor
core.autocrlf=True
difftool.kdiff3.path=D:/DevelopTools/KDiff3/kdiff3.exe
difftool.kdiff3.cmd="D:/DevelopTools/KDiff3/kdiff3.exe" "$LOCAL" "$REMOTE"
mergetool.kdiff3.path=D:/DevelopTools/KDiff3/kdiff3.exe
i18n.filesencoding=utf-8
push.default=current
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=ssh://[email protected]:29418/maven-release-learn.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.develop.remote=origin
branch.develop.merge=refs/heads/develop
[email protected]
user.name=elkan1788
Ist dieser Jenkins-Build früher erfolgreich? oder dieses Setup versuchen Sie, das erste Mal nur @elkan –
auszuführen, so ist es nur, dass user.name und user.email nicht auf Ihrem Build-Rechner gesetzt sind, aber auf Ihrem lokalen gesetzt sind? – eis
@VikrantKashyap Keine, es gab keine erfolgreichen seit Run Maven Release. – elkan1788