Skip to content

Commit

Permalink
rebuild docs, remove outdated server mode docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vito committed Jun 13, 2022
1 parent cd9514c commit 68c3a72
Show file tree
Hide file tree
Showing 6 changed files with 16,770 additions and 10,797 deletions.
10,527 changes: 6,126 additions & 4,401 deletions docs/bassics.html

Large diffs are not rendered by default.

6,040 changes: 3,802 additions & 2,238 deletions docs/guide.html

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<div class="section stderr">
<span class="section-label">stderr</span>
<pre><div class="ansi-line"><span class="fg-magenta">1:</span><span class=""> resolve image config for docker.io/alpine/git@sha256:1283cf559e7fa83951f25b292394dc7bac</span></div><div class="ansi-line"><span class="">783e12e2c0353ddda8e3c51583d10f </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">1:</span><span class=""> resolve image config for docker.io/alpine/git@sha256:1283cf559e7fa83951f25b292394dc7bac</span></div><div class="ansi-line"><span class="">783e12e2c0353ddda8e3c51583d10f </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">2:</span><span class=""> resolve image config for docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3</span></div><div class="ansi-line"><span class="">237d9561100b6881aabbf5acce2c4f9454 </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">2:</span><span class=""> resolve image config for docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3</span></div><div class="ansi-line"><span class="">237d9561100b6881aabbf5acce2c4f9454 </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">3:</span><span class=""> docker-image://docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d956110</span></div><div class="ansi-line"><span class="">0b6881aabbf5acce2c4f9454 </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">3:</span><span class=""> resolve docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881a</span></div><div class="ansi-line"><span class="">abbf5acce2c4f9454 </span><span class=" intensity-dim">[0.02s]</span></div><div class="ansi-line"><span class="fg-magenta">3:</span><span class=""> docker-image://docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d956110</span></div><div class="ansi-line"><span class="">0b6881aabbf5acce2c4f9454 </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">6:</span><span class=""> docker-image://docker.io/alpine/git@sha256:1283cf559e7fa83951f25b292394dc7bac783e12e2c0</span></div><div class="ansi-line"><span class="">353ddda8e3c51583d10f </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">6:</span><span class=""> resolve docker.io/alpine/git@sha256:1283cf559e7fa83951f25b292394dc7bac783e12e2c0353ddda</span></div><div class="ansi-line"><span class="">8e3c51583d10f </span><span class=" intensity-dim">[0.02s]</span></div><div class="ansi-line"><span class="fg-magenta">6:</span><span class=""> docker-image://docker.io/alpine/git@sha256:1283cf559e7fa83951f25b292394dc7bac783e12e2c0</span></div><div class="ansi-line"><span class="">353ddda8e3c51583d10f </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">8:</span><span class=""> git clone https://github.com/vito/bass ./ </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">8:</span><span class=""> [0.18s] Cloning into &#39;.&#39;...</span></div><div class="ansi-line"><span class="fg-magenta">8:</span><span class=""> git clone https://github.com/vito/bass ./ </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> git checkout 0d4ebe9fd49ccca79cd9e750750929608b8365e4 </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] Note: switching to &#39;0d4ebe9fd49ccca79cd9e750750929608b8365e4&#39;.</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] You are in &#39;detached HEAD&#39; state. You can look around, make experimental</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] changes and commit them, and you can discard any commits you make in this</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] state without impacting any branches by switching back to a branch.</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] If you want to create a new branch to retain commits you create, you may</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] do so (now or later) by using -c with the switch command. Example:</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] git switch -c &lt;new-branch-name&gt;</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] Or undo this operation with:</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] git switch -</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] Turn off this advice by setting config variable advice.detachedHead to false</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s]</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> [0.18s] HEAD is now at 0d4ebe9 Merge pull request #143 from vito/fix-shipit</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> git checkout 0d4ebe9fd49ccca79cd9e750750929608b8365e4 </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> git submodule update --init --recursive </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> [0.19s] Submodule &#39;lsp/testdata/bundle/nvim-lspconfig&#39; (https://github.com/neovim/nvim</span></div><div class="ansi-line"><span class="">-lspconfig) registered for path &#39;pkg/lsp/testdata/bundle/nvim-lspconfig&#39;</span></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> [0.19s] Cloning into &#39;/bass/work/pkg/lsp/testdata/bundle/nvim-lspconfig&#39;...</span></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> [3.63s] Submodule path &#39;pkg/lsp/testdata/bundle/nvim-lspconfig&#39;: checked out &#39;7d5a6dc4</span></div><div class="ansi-line"><span class="">6dd2ebaeb74b573922f289ae33089fe7&#39;</span></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> git submodule update --init --recursive </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">13:</span><span class=""> grep -o fun &lt;thunk: (.git) name:yC1QX_2LYmFrkrA3LeZFayYXpgI3u3QaNxj4m45yraY=&gt;/./docs/l</span></div><div class="ansi-line"><span class="">it/index.lit </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">13:</span><span class=""> grep -o fun &lt;thunk: (.git) name:yC1QX_2LYmFrkrA3LeZFayYXpgI3u3QaNxj4m45yraY=&gt;/./docs/l</span></div><div class="ansi-line"><span class="">it/index.lit </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">14:</span><span class=""> exporting to client </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">14:</span><span class=""> copying files 34B </span><span class=" intensity-dim">[0.00s]</span></div><div class="ansi-line"><span class="fg-magenta">14:</span><span class=""> exporting to client </span><span class="fg-green">DONE</span></div></pre>
<pre><div class="ansi-line"><span class="fg-magenta">1:</span><span class=""> resolve image config for docker.io/alpine/git@sha256:5dbc7ef3c51fd64e996c3ca819d625ca21</span></div><div class="ansi-line"><span class="">bbc4259be166fd9a46395d5f6c6a1f </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">1:</span><span class=""> resolve image config for docker.io/alpine/git@sha256:5dbc7ef3c51fd64e996c3ca819d625ca21</span></div><div class="ansi-line"><span class="">bbc4259be166fd9a46395d5f6c6a1f </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">2:</span><span class=""> resolve image config for docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23</span></div><div class="ansi-line"><span class="">f84eeaf7e457f36f271ab1acc53015037c </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">2:</span><span class=""> resolve image config for docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23</span></div><div class="ansi-line"><span class="">f84eeaf7e457f36f271ab1acc53015037c </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">3:</span><span class=""> docker-image://docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e4</span></div><div class="ansi-line"><span class="">57f36f271ab1acc53015037c </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">3:</span><span class=""> resolve docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f2</span></div><div class="ansi-line"><span class="">71ab1acc53015037c </span><span class=" intensity-dim">[0.02s]</span></div><div class="ansi-line"><span class="fg-magenta">3:</span><span class=""> docker-image://docker.io/library/alpine@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e4</span></div><div class="ansi-line"><span class="">57f36f271ab1acc53015037c </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">6:</span><span class=""> docker-image://docker.io/alpine/git@sha256:5dbc7ef3c51fd64e996c3ca819d625ca21bbc4259be1</span></div><div class="ansi-line"><span class="">66fd9a46395d5f6c6a1f </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">6:</span><span class=""> resolve docker.io/alpine/git@sha256:5dbc7ef3c51fd64e996c3ca819d625ca21bbc4259be166fd9a4</span></div><div class="ansi-line"><span class="">6395d5f6c6a1f </span><span class=" intensity-dim">[0.01s]</span></div><div class="ansi-line"><span class="fg-magenta">6:</span><span class=""> docker-image://docker.io/alpine/git@sha256:5dbc7ef3c51fd64e996c3ca819d625ca21bbc4259be1</span></div><div class="ansi-line"><span class="">66fd9a46395d5f6c6a1f </span><span class="fg-green">DONE</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">8:</span><span class=""> git clone https://github.com/vito/bass ./ </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">8:</span><span class=""> git clone https://github.com/vito/bass ./ </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> git fetch origin fbcb3657af1cd5557ec6d152bc74d773a1583fd8 </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">10:</span><span class=""> git fetch origin fbcb3657af1cd5557ec6d152bc74d773a1583fd8 </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> git checkout fbcb3657af1cd5557ec6d152bc74d773a1583fd8 </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">12:</span><span class=""> git checkout fbcb3657af1cd5557ec6d152bc74d773a1583fd8 </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">14:</span><span class=""> git submodule update --init --recursive </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">14:</span><span class=""> git submodule update --init --recursive </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">15:</span><span class=""> grep -o fun &lt;thunk: (.git) name:V9fOb0b7-_ej9VcOuq-71i6VdFlxM8_foYeadqFfUbc=&gt;/docs/lit</span></div><div class="ansi-line"><span class="">/index.lit </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"><span class="fg-magenta">15:</span><span class=""> grep -o fun &lt;thunk: (.git) name:V9fOb0b7-_ej9VcOuq-71i6VdFlxM8_foYeadqFfUbc=&gt;/docs/lit</span></div><div class="ansi-line"><span class="">/index.lit </span><span class="fg-cyan">CACHED</span></div><div class="ansi-line"></div><div class="ansi-line"><span class="fg-magenta">16:</span><span class=""> exporting to client </span><span class="fg-green">DONE</span></div><div class="ansi-line"><span class="fg-magenta">16:</span><span class=""> copying files 34B </span><span class=" intensity-dim">[0.00s]</span></div><div class="ansi-line"><span class="fg-magenta">16:</span><span class=""> exporting to client </span><span class="fg-green">DONE</span></div></pre>
</div>


Expand Down Expand Up @@ -207,7 +207,19 @@
</nav></li>

<li><nav class="toc">
<a href="guide.html#cicd" class="section-title">CI/CD</a>
<a href="guide.html#server-mode" class="section-title">server mode</a>


</nav></li>

<li><nav class="toc">
<a href="guide.html#cicd" class="section-title">webhooks based CI/CD</a>


</nav></li>

<li><nav class="toc">
<a href="guide.html#pipelines" class="section-title">pipeline based CI/CD</a>


</nav></li>
Expand Down
42 changes: 4 additions & 38 deletions docs/lit/guide.lit
Original file line number Diff line number Diff line change
Expand Up @@ -458,44 +458,10 @@ for common tasks. If you'd like to learn the language, see \reference{bassics}.
\section{
\title{webhooks based CI/CD}{cicd}

The Bass project uses \reference{server-mode}{server mode} to receive
GitHub webhooks and run its own builds.

\construction{TODO: write a tutorial for setting up a GitHub app.}

For now reference the
\link{\code{bass/srv/github}}{https://github.com/vito/bass/blob/main/bass/srv/github}
script, which is served like this:

\commands{{{
bass --serve 6455 ./bass/srv/
}}}

The \code{bass/srv/github} webhook handler accepts a GitHub webhook
delivery, parses the repository out of its event, fetches the repo, loads the
\link{\code{project.bass}}{https://github.com/vito/bass/blob/main/project.bass}
\t{module} from the root of the repo, and calls its \code{github-event}
function with the event.

The project handles \code{check_suite} events by creating and updating
check runs as it runs various project-configured thunks in parallel. For
now it just runs builds, but I could handle arbitrary events.

Altogether this approximates the GitHub actions flow, but entirely in Bass.
Instead of gluing together GitHub actions in YAML, I can write code, call
regular old CLIs, and run the same thing on my local machine.

Ideas for the future:

\list{
Currently the server runs with locally configured runtimes, centralizing
the resource burden. It would be nifty if each repo could configure its
own runtimes somehow.
}{
PR authors could run their own builds so that popular open-source
projects don't have a centralized CI/CD worker cost. If the thunks are
\t{hermetic} they should run the same anywhere, right?
}
The Bass project uses \link{Bass Loop}{https://github.com/vito/bass-loop}
to receive GitHub webhooks and run its own builds. Docs coming soon - see
the \link{https://github.com/vito/bass-loop/discussions/1}{announcement}
for now.
}

\section{
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ docs=$(dirname $0)/..

cd $docs
find $docs -maxdepth 1 -name '*.html' -delete
env DISABLE_CACHE=yep ./scripts/booklit -o $docs "$@"
env DISABLE_CACHE=yep ./scripts/booklit -o . "$@"
Loading

0 comments on commit 68c3a72

Please sign in to comment.