然后按照要求一步步开始注册。
使用 Apple ID 进行注册,这个 Apple ID 就是用来在 iTunes 或者 Apple Store 上面购买商品的账号。
完成这个注册,就可以获得一些开发者资源,例如在线文档,教程等等。开发者也能够下载旧版的 iOS 开发包(SDK),以及 Xcode 开发环境(IDE)。
9. Modify the pom.xml files under plugins/hooks-its AND plugins/hooks-its/hooks-its:
123456789101112131415161718192021222324252627
cd plugins/hooks-its
$ git diff
diff --git a/hooks-its/pom.xml b/hooks-its/pom.xml
index a206459..75e11dc 100644
--- a/hooks-its/pom.xml
+++ b/hooks-its/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
<parent>
<groupId>com.googlesource.gerrit.plugins.its</groupId>
<artifactId>hooks-its-parent</artifactId>
- <version>2.9-SNAPSHOT</version>
+ <version>2.8</version>
</parent>
<artifactId>hooks-its</artifactId>
<name>Gerrit Code Review - Commit validation and Workflow</name>
diff --git a/pom.xml b/pom.xml
index 600bff9..995d008 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
<groupId>com.googlesource.gerrit.plugins.its</groupId>
<artifactId>hooks-its-parent</artifactId>
<packaging>pom</packaging>
- <version>2.9-SNAPSHOT</version>
+ <version>2.8</version>
<name>Gerrit Code Review - Issue tracker support</name>
10. Build the hooks-its:
12
$ cd plugins/hooks-its
$ mvn -DskipTests -Dmaven.test.skip=true package install
NOTE: The hooks-its-2.8.jar will be generated here: hooks-its/target/hooks-its-2.8.jar
NOTE: If don’t skip tests, run with the command: mvn clean package install, then will fail on test case!
NOTE: Gerrit select BUCK as its new build system, for new plugin, please reference to the following NOTES #5
11. Modify the pom.xml files under plugins/hooks-jira:
123456789101112131415
$ cd plugins/hooks-jira
$ git diff
diff --git a/pom.xml b/pom.xml
index 7b04c60..8f60c78 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
<parent>
<groupId>com.googlesource.gerrit.plugins.its</groupId>
<artifactId>hooks-its-parent</artifactId>
- <version>2.9-SNAPSHOT</version>
+ <version>2.8</version>
</parent>
<artifactId>hooks-jira</artifactId>
<packaging>jar</packaging>
12. Build the hooks-jira:
12
$ cd plugins/hooks-jira
$ mvn clean package
NOTE: The hooks-jira-2.8.jar will be generated here: target/hooks-jira-2.8.jar
13. Copy the following jar files to the plugin folder under the Gerrit installation path on remote server:
2. The file review_site/etc/gerrit.config should look like:
12345678
[jira]url= http://review.example.com:8080
username= jira-robot
commentOnRefUpdatedGitWeb=false# to comment gitweb comments on jira[commentLink "jira"]match=([A-Z]+-[0-9]+)html= <a href=\"http://jira.example.com:8080/browse/$1\">$1</a>
association= SUGGESTED
3. If we just want to parse the jira id on the subject of the git comments, then here is the diff:
12345678910111213
diff --git a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/
index a04b175..3d56426 100644
--- a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/CommitM
+++ b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/CommitM
@@ -31,7 +31,7 @@ public class CommitMessageFetcher { RevWalk revWalk= new RevWalk(repo);
RevCommit commit= revWalk.parseCommit(ObjectId.fromString(commitId));
- return commit.getFullMessage();
+ return commit.getShortMessage();
} finally { repo.close();
}
4. Get the log message from jetty/logs on Gerrit server.
5. Gerrit choose BUCK as its new build system, so for the new plugin, the build steps should be (take cookbook-plugin as an example):
1
buck build plugins/cookbook-plugin
The output is created in: buck-out/gen/plugins/cookbook-plugin/cookbook-plugin.jar
Exception in thread "main" java.io.IOException: No X-Jenkins-CLI2-Port among [null, Vary, Date, Content-Length, Keep-Alive, Set-Cookie, Connection, Content-Type, X-Powered-By, Server]
at hudson.cli.CLI.getCliTcpPort(CLI.java:281)
at hudson.cli.CLI.<init>(CLI.java:128)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:449)
at hudson.cli.CLI.main(CLI.java:378)
Suppressed: java.io.EOFException: unexpected stream termination
at hudson.remoting.ClassicCommandTransport.create(ClassicCommandTransport.java:100)
at hudson.remoting.Channel.<init>(Channel.java:392)
at hudson.remoting.Channel.<init>(Channel.java:388)
at hudson.remoting.Channel.<init>(Channel.java:349)
at hudson.remoting.Channel.<init>(Channel.java:345)
at hudson.remoting.Channel.<init>(Channel.java:333)
at hudson.cli.CLI.connectViaHttp(CLI.java:159)
at hudson.cli.CLI.<init>(CLI.java:132)
... 3 more
Solution: check the port which Jenkins is running on, put 8080 on URL should fix, just as:
1
$ java -jar jenkins-cli.jar -s http://jenkins:8080/ help
2. Description:
12345678910111213141516171819202122232425
Failed to authenticate with your SSH keys.
hudson.security.AccessDeniedException2: anonymous is missing the ExtendedRead permission
at hudson.security.ACL.checkPermission(ACL.java:54)
at hudson.model.AbstractItem.checkPermission(AbstractItem.java:441)
at hudson.cli.GetJobCommand.run(GetJobCommand.java:46)
at hudson.cli.CLICommand.main(CLICommand.java:229)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Solution: add client public ssh key to the Jenkins server at: http://jenkins/user/USERNAME/configure | SSH Public Keys.
3. Description:
123456789101112131415161718192021222324
hudson.security.AccessDeniedException2: <USERNAME> is missing the Job/ExtendedRead permission
at hudson.security.ACL.checkPermission(ACL.java:54)
at hudson.model.AbstractItem.checkPermission(AbstractItem.java:446)
at hudson.cli.GetJobCommand.run(GetJobCommand.java:46)
at hudson.cli.CLICommand.main(CLICommand.java:234)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:300)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:281)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:240)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Solution: Jenkins server –> Manage Jenkins –> Configure Global Security to add related permissions.
# on gerrit server$ cd$site_path/git;
$ mv old_name.git new_name.git
2. Flush the caches on server:
12
# On another client image:$ ssh -p 29418 gerrit.server.com gerrit flush-caches
3. Run sql statement to update the changes:
12345678
# On another client image (need "Access Database" capability):$ ssh -p 29418 gerrit.server.com gerrit gsql [Enter]gerrit> USE {Database};
gerrit> SELECT * FROM changes WHERE dest_project_name='old_name';
# if have more than 1, run the following command to update, otherwise, quit with \q;gerrit> UPDATE changes SET dest_project_name='new_name' WHERE
dest_project_name='old_name';
gerrit> \q
Rafe is a distributed consensus protocol, which allows a collection of processes to maintain consistency even in the face of multiple node failure. The two main tenants of the protocol are leader election and log replication.