<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 2020-05-12 5:52 μ.μ., Ryan Sleevi
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACvaWvbU8vU_jFm2L28aEunEC6D9+Sz93vhyqMpWxCVwCRsfqw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, May 12, 2020 at 7:57
AM Dimitris Zacharopoulos (HARICA) <<a
href="mailto:dzacharo@harica.gr" moz-do-not-send="true">dzacharo@harica.gr</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> Thanks Ryan for the detailed description and
suggestions for moving forward. Please see below.<br>
<br>
<div>On 2020-05-07 9:48 μ.μ., Ryan Sleevi wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">On our last call, we talked a little
about the workmode for previewing documents / edits.
<div><br>
</div>
<div>After talking around to a few of our other
standards folks, it looks like the order I described
is roughly correct.</div>
<div><br>
</div>
<div>That is, our "shovel ready" solution is to do so
via "trusted" branches in the main
cabforum/documents repository, which we've already
got Travis set-up to automatically build and deploy
artifacts from. They're "trusted" because anyone
with a branch in cabforum/documents is implicitly
trusted to just modify all the build system anyways
:)</div>
<div><br>
</div>
<div>However, to have artifacts for pull requests, we
need to split out the build/deploy steps. This is
discussed a little at <a
href="https://docs.travis-ci.com/user/pull-requests#pull-requests-and-security-restrictions"
target="_blank" moz-do-not-send="true">https://docs.travis-ci.com/user/pull-requests#pull-requests-and-security-restrictions</a> .
From looking around at other SDOs, the common
approach seems to be setting up a web hook for
inbound PRs, doing an isolated build of the
artifacts, and then doing the deploy step from
there.</div>
<div><br>
</div>
<div>The "isolated build" can be done a number of
ways. The easiest way seems to be just to only fetch
the .md files from arbitrary ("untrusted") pull
requests and run those through the
cabforum/document's build scripts, and then deploy
those generated artifacts. If we want to change the
build scripts / templates themselves, those would go
through the trusted branches above.</div>
<div><br>
</div>
<div>Practically speaking, this means the order of
operations is:</div>
<div>
<ul>
<li>Jos sends a PR for the Makefile invocation to
generate our artifacts</li>
<li>Jos and Ryan work through getting the
dependencies right for both our dockerfile (for
local editing) and the Travis bits (for the
automated building)</li>
</ul>
</div>
<div><br>
</div>
<div>This enables the following workflow:</div>
<div>
<ol>
<li>Dimitris (or a chair/delegate, implicit
throughout this remainder), when getting ready
to merge a change, <a
href="https://github.blog/2016-08-15-change-the-base-branch-of-a-pull-request/"
target="_blank" moz-do-not-send="true">changes
the base branch</a> from being
cabforum/documents:master into
cabforum/documents:[something temporary Dimitris
will use)</li>
<li>Dimitris squash&merges the pull request
into that branch and apply the necessary
corrections/edits</li>
<li>Travis is generating artifacts for every
commit into this branch, which can be previewed
for correctness</li>
<li>Dimitris creates a pull request from
cabforum/documents:[something temporary] into
cabforum/documents:[master]</li>
<li>Dimitris squash&merges into master
(editing commit message as necessary)</li>
<li>Travis will again kick off new artifacts, this
time for the commit to master</li>
<li>Dimitris deleges the
cabforum/documents:[something temporary] branch,
as it's no longer used</li>
<li>[Optional] Dimitris tags
cabforum/documents:master @ that commit as being
the appropriate document number (e.g. BR 1.6.7),
creating multiple tags if multiple documents
were updated (e.g. the same commit is tagged BR
1.9.1 and EVG 1.8.1, if both documents were
updated)</li>
</ol>
</div>
</div>
</blockquote>
<br>
This works for me and I assume the same applies to Wayne.<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Longer term, the following steps would be
necessary</div>
<div>
<ul>
<li>Setup a webhook to fetch the .md files from a
PR and run through the make/deploy setup</li>
<li>Wire the webhook to cabforum/master to fire
when PRs are opened by anyone</li>
</ul>
</div>
<div><br>
</div>
<div>And then the workflow just becomes:</div>
<div>
<ol>
<li>Someone opens up a PR, enabling
cabforum/documents maintainers to make edits</li>
<li>Voting happens</li>
<li>Dimitris makes edits directly into the PR's
source branch</li>
<li>Previews are generated of those edits</li>
<li>Squash & Merged into cabforum/master</li>
<li>Documents published</li>
<li>[Optional] Tags created</li>
</ol>
</div>
</div>
</blockquote>
<br>
How much additional effort do you think it would take to
develop the second solution? If it's not feasible for the
next couple of weeks, we can go with the first workflow
and come back to it later.<br>
</div>
</blockquote>
<div><br>
</div>
<div>More time than I have in the next few weeks :)</div>
</div>
</div>
</blockquote>
<br>
Thanks Ryan, you've already provided excellent guidance through this
process. Let us know what we can do to take it one step closer to
the finish line. Obviously we're all happy with the 8-step workflow
:-)<br>
<br>
<br>
Dimitris.<br>
<br>
<blockquote type="cite"
cite="mid:CACvaWvbU8vU_jFm2L28aEunEC6D9+Sz93vhyqMpWxCVwCRsfqw@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> <br>
It would also help if we made some progress with cleaning
up the official repo from the various old branches, as we
agreed in Bratislava <a
href="https://cabforum.org/pipermail/infrastructure/2020-February/000173.html"
target="_blank" moz-do-not-send="true">https://cabforum.org/pipermail/infrastructure/2020-February/000173.html</a><br>
<br>
<br>
Thanks,<br>
Dimitris.<br>
</div>
_______________________________________________<br>
Infrastructure mailing list<br>
<a href="mailto:Infrastructure@cabforum.org" target="_blank"
moz-do-not-send="true">Infrastructure@cabforum.org</a><br>
<a
href="http://cabforum.org/mailman/listinfo/infrastructure"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://cabforum.org/mailman/listinfo/infrastructure</a><br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>