You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2017/10/02 19:33:32 UTC

[site] Simplifying publishing process

Hi,

I think we can simplify the site publishing setup and it should be
enough to work only on the master branch.

I see two possible options:

1) Set up a Jenkins job to rebuild the site and push automatically .
This _should_ be possible based on [1]

2) Configure the maven-scm-publish-plugin to publish changes. This is
done for instance for Oak [2]

Preferences?

Thanks,

Robert

[1]: https://issues.apache.org/jira/browse/INFRA-12425
[2]: https://github.com/apache/jackrabbit-oak/blob/fbc23b57f24576352cc2
04a52b90d852d2be7a6a/oak-doc/pom.xml#L46-L80

Re: [site] Simplifying publishing process

Posted by Robert Munteanu <ro...@apache.org>.
On Thu, 2017-10-05 at 10:58 +0300, Robert Munteanu wrote:
> On Wed, 2017-10-04 at 18:28 +0200, Konrad Windszus wrote:
> > Sorry, I missed the point that web sites can only be published if
> > the
> > source files are in Git [1].
> > If I understand correctly the only thing that the maven-scm-
> > publish-
> > plugin would do is committing the target site to the asf-branch
> > (what
> > we currently need to do manually).
> 
> Yes, that's what I'm working on.

And it's done. Readme updated, and here for completeness:

  mvn clean package -Prun-site

to run the site, and

  mvn clean package -Ppublish-site

to publish the site.

Of course, the manual approach works as well, but we don't really have
to do that anymore. I'll set up a Jenkins job _after_ we get the gitbox
stuff set up.

Robert

Re: [site] Simplifying publishing process

Posted by Robert Munteanu <ro...@apache.org>.
On Wed, 2017-10-04 at 18:28 +0200, Konrad Windszus wrote:
> Sorry, I missed the point that web sites can only be published if the
> source files are in Git [1].
> If I understand correctly the only thing that the maven-scm-publish-
> plugin would do is committing the target site to the asf-branch (what
> we currently need to do manually).

Yes, that's what I'm working on.

> So for me 1 & 2 are not mutually exclusive options, but 2 makes 1
> actually a lot easier, because then 1 is only a simple Maven goal.

Exactly.

Robert

> 
> Otherwise the Jenkins job would need to do those SCM operations
> manually.
> 
> [1] - https://blogs.apache.org/infra/entry/git_based_websites_availab
> le
> 
> > Am 04.10.2017 um 16:26 schrieb Robert Munteanu <ro...@apache.org>
> > :
> > 
> > On Wed, 2017-10-04 at 12:16 +0200, Konrad Windszus wrote:
> > > > On 4. Oct 2017, at 12:11, Bertrand Delacretaz <bdelacretaz@apac
> > > > he.o
> > > > rg> wrote:
> > > > 
> > > > On Wed, Oct 4, 2017 at 12:07 PM, Konrad Windszus <konrad_w@gmx.
> > > > de>
> > > > wrote:
> > > > > ...I prefer 2 to not pollute the Sling Site Git repo with
> > > > > generated artifacts...
> > > > 
> > > > But it's *very* useful to be able to see the diffs of the
> > > > published
> > > > content before pushing them live.
> > > 
> > > Once we fixed all bugs in our templates, the diff on the MD
> > > source
> > > files is IMHO enough.
> > 
> > 
> > I am not sure how 1 would pollute the git repo ... The process
> > right
> > now is to build the HTML files and resync the asf-site branch with
> > the
> > output.
> > 
> > But anyway I think that having a Jenkins job that pushes every
> > change
> > on the master branch automatically using the maven-scm-publish
> > plugin
> > would be nice.
> > 
> > So I would first implement 2) and then 1). And of course we can
> > still
> > preview changes locally, for larger changes.
> > 
> > How does that sound?
> > 
> > Robert
> 
> 


Re: [site] Simplifying publishing process

Posted by Konrad Windszus <ko...@gmx.de>.
Sorry, I missed the point that web sites can only be published if the source files are in Git [1].
If I understand correctly the only thing that the maven-scm-publish-plugin would do is committing the target site to the asf-branch (what we currently need to do manually).
So for me 1 & 2 are not mutually exclusive options, but 2 makes 1 actually a lot easier, because then 1 is only a simple Maven goal.

Otherwise the Jenkins job would need to do those SCM operations manually.

[1] - https://blogs.apache.org/infra/entry/git_based_websites_available

> Am 04.10.2017 um 16:26 schrieb Robert Munteanu <ro...@apache.org>:
> 
> On Wed, 2017-10-04 at 12:16 +0200, Konrad Windszus wrote:
>>> On 4. Oct 2017, at 12:11, Bertrand Delacretaz <bdelacretaz@apache.o
>>> rg> wrote:
>>> 
>>> On Wed, Oct 4, 2017 at 12:07 PM, Konrad Windszus <ko...@gmx.de>
>>> wrote:
>>>> ...I prefer 2 to not pollute the Sling Site Git repo with
>>>> generated artifacts...
>>> 
>>> But it's *very* useful to be able to see the diffs of the published
>>> content before pushing them live.
>> 
>> Once we fixed all bugs in our templates, the diff on the MD source
>> files is IMHO enough.
> 
> 
> I am not sure how 1 would pollute the git repo ... The process right
> now is to build the HTML files and resync the asf-site branch with the
> output.
> 
> But anyway I think that having a Jenkins job that pushes every change
> on the master branch automatically using the maven-scm-publish plugin
> would be nice.
> 
> So I would first implement 2) and then 1). And of course we can still
> preview changes locally, for larger changes.
> 
> How does that sound?
> 
> Robert


Re: [site] Simplifying publishing process

Posted by Robert Munteanu <ro...@apache.org>.
On Wed, 2017-10-04 at 12:16 +0200, Konrad Windszus wrote:
> > On 4. Oct 2017, at 12:11, Bertrand Delacretaz <bdelacretaz@apache.o
> > rg> wrote:
> > 
> > On Wed, Oct 4, 2017 at 12:07 PM, Konrad Windszus <ko...@gmx.de>
> > wrote:
> > > ...I prefer 2 to not pollute the Sling Site Git repo with
> > > generated artifacts...
> > 
> > But it's *very* useful to be able to see the diffs of the published
> > content before pushing them live.
> 
> Once we fixed all bugs in our templates, the diff on the MD source
> files is IMHO enough.


I am not sure how 1 would pollute the git repo ... The process right
now is to build the HTML files and resync the asf-site branch with the
output.

But anyway I think that having a Jenkins job that pushes every change
on the master branch automatically using the maven-scm-publish plugin
would be nice.

So I would first implement 2) and then 1). And of course we can still
preview changes locally, for larger changes.

How does that sound?

Robert

Re: [site] Simplifying publishing process

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Oct 4, 2017 at 12:16 PM, Konrad Windszus <ko...@gmx.de> wrote:
> ...Once we fixed all bugs in our templates, the diff on the MD source files is IMHO enough...

You forgot the <dreaming> tag ;-)

Templates will evolve "forever", we might upgrade JBake, use a
different JDK which exposes different bugs etc...

Having the website content in a branch does not cause much harm but
IMO having precise diffs of the actual content *is* important,
othewise we're flying blind.

-Bertrand

Re: [site] Simplifying publishing process

Posted by Konrad Windszus <ko...@gmx.de>.

> On 4. Oct 2017, at 12:11, Bertrand Delacretaz <bd...@apache.org> wrote:
> 
> On Wed, Oct 4, 2017 at 12:07 PM, Konrad Windszus <ko...@gmx.de> wrote:
>> ...I prefer 2 to not pollute the Sling Site Git repo with generated artifacts...
> 
> But it's *very* useful to be able to see the diffs of the published
> content before pushing them live.
Once we fixed all bugs in our templates, the diff on the MD source files is IMHO enough.

> 
> -Bertrand


Re: [site] Simplifying publishing process

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Oct 4, 2017 at 12:07 PM, Konrad Windszus <ko...@gmx.de> wrote:
> ...I prefer 2 to not pollute the Sling Site Git repo with generated artifacts...

But it's *very* useful to be able to see the diffs of the published
content before pushing them live.

-Bertrand

Re: [site] Simplifying publishing process

Posted by Konrad Windszus <ko...@gmx.de>.
I prefer 2 to not pollute the Sling Site Git repo with generated artifacts.
But even with 2 we should have an according Jenkins Job which executes this Maven Build & Deploy automatically.

> On 2. Oct 2017, at 21:33, Robert Munteanu <ro...@apache.org> wrote:
> 
> Hi,
> 
> I think we can simplify the site publishing setup and it should be
> enough to work only on the master branch.
> 
> I see two possible options:
> 
> 1) Set up a Jenkins job to rebuild the site and push automatically .
> This _should_ be possible based on [1]
> 
> 2) Configure the maven-scm-publish-plugin to publish changes. This is
> done for instance for Oak [2]
> 
> Preferences?
> 
> Thanks,
> 
> Robert
> 
> [1]: https://issues.apache.org/jira/browse/INFRA-12425
> [2]: https://github.com/apache/jackrabbit-oak/blob/fbc23b57f24576352cc2
> 04a52b90d852d2be7a6a/oak-doc/pom.xml#L46-L80