Page MenuHomePhabricator
Paste P11628

gerrit-puppet-diff-20200622-01
ActivePublic

Authored by Dzahn on Mon, Jun 22, 4:57 PM.
/**
- * The .PatchSetMerged template determines the comment left on the
- * Phabricator task when a related Change gets merged
+ * The .PatchSetMerged template will determine the contents of the email subject
+ * line for ALL emails related to changes.
+ * @param changeNumber
+ * @param submitterName
+ * @param project
+ * @param branch
+ * @param escapedSubject
+ * @param formatChangeUrl
+ *
*/
-{template .PatchSetMerged kind="text"}
- {@param changeNumber: string}
- {@param project: string}
- {@param branch: string}
- {@param submitterName: string}
- {@param escapedSubject: string}
- {@param formatChangeUrl: string}
-
+{template .PatchSetMerged autoescape="strict" kind="text"}
Change {$changeNumber} **merged** by {$submitterName}:{\n}
[{$project}@{$branch}] {$escapedSubject|escapeUri}{\n}{\n}
Info: Computing checksum on file /var/lib/gerrit2/review_site/etc/its/templates/PatchSetMerged.soy
Info: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/its/templates/PatchSetMerged.soy]: Filebucketed /var/lib/gerrit2/review_site/etc/its/templates/PatchSetMerged.soy to puppet with sum bb0d0521ac588cc9937f546713b059d6
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/its/templates/PatchSetMerged.soy]/content:
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/its/templates/PatchSetMerged.soy]/content: content changed '{md5}bb0d0521ac588cc9937f546713b059d6' to '{md5}ac44420f6f9a8964fc6f31c319b395d5'
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy]/content:
--- /var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy 2020-06-19 12:32:38.498745156 +0000
+++ /tmp/puppet-file20200622-26188-uor62q 2020-06-22 16:49:07.384533240 +0000
@@ -14,28 +14,15 @@
* limitations under the License.
*/
-/**
- * This template is the stock template from Gerrit v3.2.2 with the
- * following adaptions:
- * - 'Change in' is replaced by '[Gerrit]'
- * - (this ChangeLog comment :-) )
- */
-
{namespace com.google.gerrit.server.mail.template}
/**
* The .ChangeSubject template will determine the contents of the email subject
* line for ALL emails related to changes.
+ * @param branch
+ * @param change
+ * @param shortProjectName
*/
-{template .ChangeSubject kind="text"}
- {@param branch: ?}
- {@param change: ?}
- {@param shortProjectName: ?}
- {@param instanceAndProjectName: ?}
- {@param addInstanceNameInSubject: ?} /** boolean */
- {if not $addInstanceNameInSubject}
- [Gerrit] {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
- {else}
- [Gerrit] {$instanceAndProjectName}[{$branch.shortName}]: {$change.shortSubject}
- {/if}
+{template .ChangeSubject autoescape="strict" kind="text"}
+ [Gerrit] {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
{/template}
Info: Computing checksum on file /var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy
Info: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy]: Filebucketed /var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy to puppet with sum dc6c538118b32846ba778fa3d38548cb
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy]/content:
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/ChangeSubject.soy]/content: content changed '{md5}dc6c538118b32846ba778fa3d38548cb' to '{md5}7fdab4e51e405916d2bfe5c139f6f59f'
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/Comment.soy]/content:
--- /var/lib/gerrit2/review_site/etc/mail/Comment.soy 2020-06-19 12:32:38.498745156 +0000
+++ /tmp/puppet-file20200622-26188-1hb4q5w 2020-06-22 16:49:07.504533914 +0000
@@ -14,25 +14,18 @@
* limitations under the License.
*/
-/**
- * This template is the stock template from Gerrit v3.2.2 with the
- * following adaptions:
- * - add change.ownerName to show who owns the change
- * - (this ChangeLog comment :-) )
- */
-
{namespace com.google.gerrit.server.mail.template}
/**
* The .Comment template will determine the contents of the email related to a
* user submitting comments on changes.
+ * @param change
+ * @param coverLetter
+ * @param email
+ * @param fromName
+ * @param commentFiles
*/
-{template .Comment kind="text"}
- {@param change: ?}
- {@param coverLetter: ?}
- {@param email: ?}
- {@param fromName: ?}
- {@param commentFiles: ?}
+{template .Comment autoescape="strict" kind="text"}
{$fromName} has posted comments on this change by {$change.ownerName}.
{if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n}
{\n}
@@ -45,35 +38,28 @@
{\n}
{/if}
- {for $group in $commentFiles}
- // Insert a space before the newline so that Gmail does not mistakenly link
- // the following line with the file link. See issue 9201.
- {$group.link}{sp}{\n}
+ {foreach $group in $commentFiles}
+ {$group.link}{\n}
{$group.title}:{\n}
{\n}
- {for $comment in $group.comments}
+ {foreach $comment in $group.comments}
{if $comment.isRobotComment}
Robot Comment from {$comment.robotId} (run ID {$comment.robotRunId}):
{\n}
{/if}
- {for $line in $comment.lines}
+ {foreach $line in $comment.lines}
{if isFirst($line)}
{if $comment.startLine != 0}
{$comment.link}
- {/if}
-
- // Insert a space before the newline so that Gmail does not mistakenly
- // link the following line with the file link. See issue 9201.
- {sp}{\n}
-
+ {/if}{\n}
{$comment.linePrefix}
{else}
{$comment.linePrefixEmpty}
{/if}
{$line}{\n}
- {/for}
+ {/foreach}
{if length($comment.lines) == 0}
{$comment.linePrefix}{\n}
{/if}
@@ -84,7 +70,7 @@
{$comment.message}{\n}
{\n}
{\n}
- {/for}
- {/for}
+ {/foreach}
+ {/foreach}
{\n}
{/template}
Info: Computing checksum on file /var/lib/gerrit2/review_site/etc/mail/Comment.soy
Info: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/Comment.soy]: Filebucketed /var/lib/gerrit2/review_site/etc/mail/Comment.soy to puppet with sum e3c8ff44fed20e2285ef50eb73bb41a4
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/Comment.soy]/content:
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/etc/mail/Comment.soy]/content: content changed '{md5}e3c8ff44fed20e2285ef50eb73bb41a4' to '{md5}d6fbfef2d2481083af4d36158e68558f'
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/static/gerrit-theme.html]/content:
--- /var/lib/gerrit2/review_site/static/gerrit-theme.html 2020-06-21 21:19:55.670769001 +0000
+++ /tmp/puppet-file20200622-26188-1a3n6e1 2020-06-22 16:49:07.628534612 +0000
@@ -14,82 +14,137 @@
limitations under the License.
-->
-<dom-module id="wm-styles">
- <script>
- if (window.Polymer) {
- Gerrit.install((plugin) => {
- if (window.localStorage.getItem('dark-theme')) {
- plugin.registerStyleModule('app-theme', 'wm-dark-style');
- } else {
- plugin.registerStyleModule('app-theme', 'wm-light-style');
- }
- plugin.registerStyleModule('app-theme', 'wm-common-style');
- plugin.registerCustomComponent(
- 'footer-left', 'wm-custom-links');
- });
- }
- </script>
-</dom-module>
-
-<dom-module id="wm-light-style">
- <template>
- <style>
- html {
- --header-background: white;
- --header-text-color: #001133;
- }
- </style>
- </template>
-</dom-module>
-
-<dom-module id="wm-dark-style">
- <template>
- <style>
- html {
- --header-background: #3b3d3f;
- --header-text-color: #e8eaed;
- }
- </style>
- </template>
-</dom-module>
-
-<dom-module id="wm-common-style">
- <template>
- <style>
- html {
- --header-title-content: "Wikimedia Code Review";
- --header-icon: url("/r/static/wikimedia-codereview-logo.cache.svg");
- --header-icon-size: 1.2em;
-
- --border-width: 0 0 3px 0;
- --border-style: solid;
- --box-shadow: 0 3px 3px 2px rgba(0,0,0,0.075), 0 0 2px rgba(0,0,0,0.2);
- --header-border-bottom: 4px solid;
- --header-border-image: linear-gradient(to right, #990000 15%, #006699 15%, #006699 85%, #339966 85%) 1;
- }
- </style>
- </template>
-</dom-module>
-
-<dom-module id="wm-custom-links">
- <template>
- <style>
- a {
- color: #2a66d9;
- }
- </style>
- |
- <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct">Code of Conduct</a>
- |
- <a href="https://wikimediafoundation.org/wiki/Special:MyLanguage/Privacy_policy">Privacy policy</a>
- </template>
- <script>
- (function() {
- 'use strict';
-
- Polymer({
- is: 'wm-custom-links',
- });
- })();
- </script>
+<script>
+ var doc = document.querySelector("footer.style-scope.gr-app div.style-scope.gr-app");
+ if ( doc ) {
+ // code of conduct
+ appendLink(
+ 'https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct',
+ 'Code of Conduct',
+ );
+
+ // privacy policy
+ appendLink(
+ 'https://wikimediafoundation.org/wiki/Special:MyLanguage/Privacy_policy',
+ 'Privacy policy',
+ );
+ }
+
+ function appendLink(url, text) {
+ var a = document.createElement('a');
+ var linkText = document.createTextNode(text);
+ a.appendChild(linkText);
+ a.href = url;
+ a.className = "style-scope gr-app";
+ a.rel = "noopener";
+ var seperator = document.createTextNode(" | ");
+ doc.appendChild(seperator);
+ return doc.appendChild(a);
+ }
+</script>
+
+<dom-module>
+ <script>
+ Gerrit.install(plugin => {});
+ </script>
+ <style>
+ .gr-app-0 gr-main-header.gr-app {
+ background-color: white;
+ }
+
+ .gr-app-0 gr-main-header.gr-app,
+ .gr-app-1 gr-main-header.gr-app {
+ border-width: 0 0 3px 0;
+ border-style: solid;
+ box-shadow: 0 3px 3px 2px rgba(0,0,0,0.075), 0 0 2px rgba(0,0,0,0.2);
+ padding: 0 0.5em;
+ border-bottom: 0px;
+ }
+
+ #header:after {
+ content: '';
+ height: 2px;
+ display: block;
+ background-image: linear-gradient(to right, #990000 15%, #006699 15%, #006699 85%, #339966 85%);
+ }
+
+ .gr-main-header-0 .linksTitle.gr-main-header,
+ .gr-main-header-0 .bigTitle.gr-main-header,
+ .gr-main-header-0 .loginButton.gr-main-header,
+ .gr-main-header-0 .registerButton.gr-main-header,
+ .gr-main-header-0 .gr-account-dropdown {
+ color: #001133;
+ }
+
+
+ .gr-main-header-0 .titleText.gr-main-header::after,
+ .gr-main-header-1 .titleText.gr-main-header::after {
+ content: 'Wikimedia Code Review';
+ }
+
+ .gr-main-header-0 .titleText.gr-main-header::before,
+ .gr-main-header-1 .titleText.gr-main-header::before {
+ /* We use svg here as all browsers polygerrit supports, support svg. */
+ background-image: url(/r/static/wikimedia-codereview-logo.cache.svg);
+ background-size: 1.3em 1.3em;
+ background-repeat: no-repeat;
+ content: "";
+ display: inline-block;
+ height: 1.3em;
+ margin-right: calc(1em / 2);
+ margin-left: calc(1em / 3);
+ margin-bottom: calc(0em / 7);
+ vertical-align: middle;
+ width: 1.3em;
+ }
+
+ #output span.wmf-badge-logo,
+ .wmf-badge-logo {
+ display: inline-block;
+ background: url(/r/static/wikimedia-codereview-logo.cache.svg) no-repeat left/contain rgba(255, 255, 255, 1);
+ margin: 0 1rem 1rem 0;
+ padding: 0.25rem 0.5rem 0.25rem 2rem;
+ color: rgba(0, 0, 0, 0.8);
+ font-size: 0.8rem;
+ text-decoration: none;
+ border-radius: 0.5em;
+ border: 1px solid gainsboro;
+ }
+
+ #output span.wmf-badge-left,
+ .wmf-badge-left {
+ display: inline-block;
+ background: rgba(0,0,0,0.7);
+ padding: 0.25em 0.5em;
+ font-size: 0.8rem;
+ color: white;
+ text-decoration: none;
+ border-radius: 0.5em 0 0 0.5em;
+ text-shadow: 1px 1px 1px black;
+ }
+
+ #output span.wmf-badge-SUCCESS,
+ .wmf-badge-SUCCESS {
+ display: inline-block;
+ background: #339966;
+ padding: 0.25em 0.5em;
+ font-size: 0.8rem;
+ text-decoration: none;
+ color: white;
+ border-radius: 0 0.5em 0.5em 0;
+ text-shadow: 1px 1px 1px black;
+ }
+
+ #output span.wmf-badge-FAILURE,
+ .wmf-badge-FAILURE {
+ display: inline-block;
+ background: #990000;
+ padding: 0.25em 0.5em;
+ font-size: 0.8rem;
+ text-decoration: none;
+ color: white;
+ border-radius: 0 0.5em 0.5em 0;
+ text-shadow: 1px 1px 1px black;
+ }
+ </style>
</dom-module>
Info: Computing checksum on file /var/lib/gerrit2/review_site/static/gerrit-theme.html
Info: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/static/gerrit-theme.html]: Filebucketed /var/lib/gerrit2/review_site/static/gerrit-theme.html to puppet with sum 8165a95cc922f8f21808692ef58c2089
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/static/gerrit-theme.html]/content:
Notice: /Stage[main]/Gerrit::Jetty/File[/var/lib/gerrit2/review_site/static/gerrit-theme.html]/content: content changed '{md5}8165a95cc922f8f21808692ef58c2089' to '{md5}d9aebfb23aa99e196a56bbcf3911a8ef'
Info: Computing checksum on file /etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/ec-prime256v1.ocsp
Info: /Stage[main]/Profile::Gerrit::Server/Acme_chief::Cert[gerrit]/File[/etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/ec-prime256v1.ocsp]: Filebucketed /etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/ec-prime256v1.ocsp to puppet with sum c13cd6e997d8b46cda6fa7d73a896ace
Notice: /Stage[main]/Profile::Gerrit::Server/Acme_chief::Cert[gerrit]/File[/etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/ec-prime256v1.ocsp]/content: content changed '{md5}c13cd6e997d8b46cda6fa7d73a896ace' to '{md5}454bac2d984a0a2be2c4361c65a95920'
Info: Computing checksum on file /etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/rsa-2048.ocsp
Info: /Stage[main]/Profile::Gerrit::Server/Acme_chief::Cert[gerrit]/File[/etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/rsa-2048.ocsp]: Filebucketed /etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/rsa-2048.ocsp to puppet with sum b35d7838bf526175428e38b57f5261b8
Notice: /Stage[main]/Profile::Gerrit::Server/Acme_chief::Cert[gerrit]/File[/etc/acmecerts/gerrit/c5b3e591b05740d2b72baeb7ae79aeb1/rsa-2048.ocsp]/content: content changed '{md5}b35d7838bf526175428e38b57f5261b8' to '{md5}9eb313177746a5ebab0b981a1687234d'
Info: /etc/acmecerts/gerrit: Scheduling refresh of Service[apache2]
Notice: /Stage[main]/Gerrit::Jetty/Systemd::Service[gerrit]/Systemd::Unit[gerrit]/File[/lib/systemd/system/gerrit.service]/content:
--- /lib/systemd/system/gerrit.service 2020-06-20 19:03:22.330883192 +0000
+++ /tmp/puppet-file20200622-26188-s4o80g 2020-06-22 16:49:15.880580982 +0000
@@ -7,7 +7,7 @@
Group=gerrit2
Type=simple
EnvironmentFile=/etc/default/gerrit
-ExecStart=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -XX:+UseG1GC -Xmx5g -Xms5g -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dlog4j.configuration=file:///var/lib/gerrit2/review_site/etc/log4j.xml -Xloggc:/srv/gerrit/jvmlogs/jvm_gc.%p.log -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=15 -XX:+UseStringDeduplication -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=2M -jar /var/lib/gerrit2/review_site/bin/gerrit.war daemon -d /var/lib/gerrit2/review_site
+ExecStart=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -XX:+UseG1GC -Xmx5g -Xms5g -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dlog4j.configuration=file:///var/lib/gerrit2/review_site/etc/log4j.xml -Xloggc:/srv/gerrit/jvmlogs/jvm_gc.%p.log -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=15 -XX:+UseStringDeduplication -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=2M -jar /var/lib/gerrit2/review_site/bin/gerrit.war daemon -d /var/lib/gerrit2/review_site
KillSignal=SIGINT
# NOFILE : GERRIT_FDS, determined by "core.packedGitOpenFiles" in the script
LimitNOFILE=20000
Info: Computing checksum on file /lib/systemd/system/gerrit.service
Info: /Stage[main]/Gerrit::Jetty/Systemd::Service[gerrit]/Systemd::Unit[gerrit]/File[/lib/systemd/system/gerrit.service]: Filebucketed /lib/systemd/system/gerrit.service to puppet with sum f609a030edcc8a30a278d5177522aca4
Notice: /Stage[main]/Gerrit::Jetty/Systemd::Service[gerrit]/Systemd::Unit[gerrit]/File[/lib/systemd/system/gerrit.service]/content:
Notice: /Stage[main]/Gerrit::Jetty/Systemd::Service[gerrit]/Systemd::Unit[gerrit]/File[/lib/systemd/system/gerrit.service]/content: content changed '{md5}f609a030edcc8a30a278d5177522aca4' to '{md5}dd42b2a325abfa569d3724c8b884ff6a'
Info: /Stage[main]/Gerrit::Jetty/Systemd::Service[gerrit]/Systemd::Unit[gerrit]/File[/lib/systemd/system/gerrit.service]: Scheduling refresh of Exec[systemd daemon-reload for gerrit.service]
Notice: /Stage[main]/Gerrit::Jetty/Systemd::Service[gerrit]/Systemd::Unit[gerrit]/Exec[systemd daemon-reload for gerrit.service]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Httpd/Service[apache2]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Admin/Admin::Hashuser[lmata]/Admin::User[lmata]/User[lmata]/ensure: created
Notice: /Stage[main]/Admin/Admin::Hashuser[lmata]/Admin::User[lmata]/File[/home/lmata]/ensure: created
Notice: /Stage[main]/Admin/Admin::Hashuser[lmata]/Admin::User[lmata]/File[/home/lmata/.gitignore]/ensure: defined content as '{md5}fcc0a1c2f12fcf1d56262612d8cb291b'
Notice: /Stage[main]/Admin/Admin::Hashuser[lmata]/Admin::User[lmata]/Ssh::Userkey[lmata]/File[/etc/ssh/userkeys/lmata]/ensure: defined content as '{md5}54e207071d435c345f758156676d22e6'
Notice: /Stage[main]/Admin/Admin::Groupmembers[ops]/Exec[ops_ensure_members]/returns: executed successfully
Notice: /Stage[main]/Admin/Admin::Groupmembers[ops-adm-group]/Exec[adm_ensure_members]/returns: executed successfully
Notice: Applied catalog in 20.86 seconds

Event Timeline

Dzahn created this paste.Mon, Jun 22, 4:57 PM