~sircmpwn/sr.ht-discuss

2

Skip clone in builds

Details
Message ID
<225a898b-07f0-40f5-8c3d-86f33a9399bc@app.fastmail.com>
DKIM signature
pass
Download raw message
Hello all,

My personal website (a Hugo-generated static site) is running on a
server, and it can pull in updates on its own by running a single
script.  This makes the Sourcehut Build very simple, because I can SSH
in with one like to invoke that script.

https://git.sr.ht/~jonahbron/jonah.id/blob/512fc/.build.yml

It occurs to me however that the builder is not using the cloned repo at
all, even though it's spending some amount of time/resources pulling in
the entire thing before doing anything.  Is there an existing method (or
interest in adding an option) to _skip_ the clone and execute the build
script without?

I see nothing about controlling this in the current documentation

https://man.sr.ht/builds.sr.ht/#gitsrht
https://man.sr.ht/builds.sr.ht/manifest.md

Thanks! Jonah
Details
Message ID
<D0VTHMVK57DC.3UDPXSALU57IU@kararou.space>
In-Reply-To
<225a898b-07f0-40f5-8c3d-86f33a9399bc@app.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
Hi Jonah,

Correct me if I'm wrong, but I believe that you need a sources
configuration option[1] in your .build.yml.  Even the sourcehut build
specs specify the sources configuration option[2].

Hope this helps,
Ren

[1]: https://man.sr.ht/builds.sr.ht/manifest.md#sources
[2]: https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/item/.builds/alpine.yml#L9
Details
Message ID
<D0VTMV7ZPTS3.2D59R8DSZ2S8E@kararou.space>
In-Reply-To
<225a898b-07f0-40f5-8c3d-86f33a9399bc@app.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
Jonah,

Please disregard my last mail, it occurs to me that I need to work on my
reading comprehension (or at least finish my coffee before reading
mails).

This is rather interesting though.  When I was manually running builds I
needed to specify a sources configuration option, but it appears when
the build is triggered via a git commit or a patch-set via a list, those
refs are automatically cloned.

I'm not sure there is a way to skip this, but if anyone else knows,
please feel free to chime in.

Thanks,
Ren
Reply to thread Export thread (mbox)