Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Always build but only conditionally emit docs (#2025)

Dhruv Bhanushali8ba81de6c4a4
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index da453a634..7499c43b7 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -681,6 +681,35 @@ jobs:
# Documentation #
#################
+ build-docs:
+ name: Build full-stack docs
+ if: |
+ needs.get-changes.outputs.documentation == 'true' ||
+ needs.get-changes.outputs.ci_cd == 'true'
+ runs-on: ubuntu-latest
+ needs:
+ - get-changes
+ - lint
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Setup CI env
+ uses: ./.github/actions/setup-env
+
+ - name: Compile documentation
+ uses: ./.github/actions/build-docs
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ # Docs will be located at `/tmp/docs`.
+
+ - name: Upload documentation
+ uses: actions/upload-artifact@v3
+ with:
+ name: documentation
+ path: /tmp/docs/
+
emit-docs:
name: Emit full-stack docs
# https://github.com/actions/runner/issues/491#issuecomment-850884422
@@ -701,7 +730,8 @@ jobs:
(needs.test-ing.result == 'success' || needs.test-ing.result == 'skipped') &&
(needs.test-api.result == 'success' || needs.test-api.result == 'skipped') &&
(needs.test-cat.result == 'success' || needs.test-cat.result == 'skipped') &&
- (needs.nuxt-build.result == 'success' || needs.nuxt-build.result == 'skipped')
+ (needs.nuxt-build.result == 'success' || needs.nuxt-build.result == 'skipped') &&
+ needs.build-docs.result == 'success'
runs-on: ubuntu-latest
needs:
- get-changes
@@ -709,19 +739,14 @@ jobs:
- test-ing
- test-api
- nuxt-build
+ - build-docs
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Setup CI env
- uses: ./.github/actions/setup-env
-
- - name: Compile documentation
- uses: ./.github/actions/build-docs
+ - name: Download documentation
+ uses: actions/download-artifact@v3
with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- # Docs will be located at `/tmp/docs`.
+ name: documentation
+ path: /tmp/docs
- name: Recreate working directory # to avoid superfluous files from getting tracked automatically
run: |
diff --git a/automations/python/workflows/set_matrix_images.py b/automations/python/workflows/set_matrix_images.py
index a975798d5..ac51e79b7 100644
--- a/automations/python/workflows/set_matrix_images.py
+++ b/automations/python/workflows/set_matrix_images.py
@@ -1,7 +1,7 @@
"""
Determine which Docker images to build and publish. For more information refer
to the documentation:
-https://docs.openverse.org/meta/ci_cd/jobs/docker_preparation.html#determine-images
+https://docs.openverse.org/meta/ci_cd/jobs/docker.html#determine-images
"""
import json
diff --git a/documentation/justfile b/documentation/justfile
index 83c7d2486..cd438312f 100644
--- a/documentation/justfile
+++ b/documentation/justfile
@@ -23,7 +23,7 @@ live port="50230": clean
pipenv run sphinx-autobuild -b html . _serve/ --port {{ port }}
# Compile the documentation into a static site
-build +args="":
+build *args:
pipenv run sphinx-build {{ args }} -b html . _build/
# Serve the compiled docs using a simple HTTP server
diff --git a/documentation/meta/ci_cd/actions.md b/documentation/meta/ci_cd/actions.md
index b5fd8cf2c..a384024eb 100644
--- a/documentation/meta/ci_cd/actions.md
+++ b/documentation/meta/ci_cd/actions.md
@@ -53,10 +53,10 @@ host dependencies are needed).
## `load-img`
All Docker images needed throughout the CI + CD workflow are built by the
-[`build-images`](/meta/ci_cd/jobs/docker_preparation.md#build-images) job
-matrix, saved as `.tar` files and uploaded as artifacts. This action is used by
-subsequent jobs that need those images. It downloads the artifact and load the
-`.tar` files into Docker as images.
+[`build-images`](/meta/ci_cd/jobs/docker.md#build-images) job matrix, saved as
+`.tar` files and uploaded as artifacts. This action is used by subsequent jobs
+that need those images. It downloads the artifact and load the `.tar` files into
+Docker as images.
**Inputs:**
diff --git a/documentation/meta/ci_cd/artifacts.md b/documentation/meta/ci_cd/artifacts.md
new file mode 100644
index 000000000..d61a03f06
--- /dev/null
+++ b/documentation/meta/ci_cd/artifacts.md
@@ -0,0 +1,69 @@
+# Artifacts
+
+The CI + CD workflow, produces a number of artifacts that can be accessed from
+the Summary page of a workflow run.
+
+```
+https://github.com/WordPress/openverse/actions/runs/<run_id>
+```
+
+These artifacts are classified into TODO types:
+
+- Docker images
+- Logs
+- Documentation
+
+## Docker images
+
+The following artifacts are Docker images:
+
+- `api`
+- `api_nginx`
+- `catalog`
+- `frontend`
+- `ingestion_server`
+- `openverse_db`
+
+All of these images are outputs of the
+[`build-images`](/meta/ci_cd/jobs/docker.md#build-images) job. These artifacts
+have little utility outside of the workflow and are primarily intended to be
+consumed by other jobs that need these images, to avoid building them
+repeatedly.
+
+## Logs
+
+The following artifacts are logs for debugging.
+
+- `api_logs`
+
+ This log file contains all the logs from all the Docker services written in
+ the course of the API tests. This artifact is created by by the
+ [`test-api`](/meta/ci_cd/jobs/api.md#test-api) job.
+
+- `ing_logs`
+
+ This log file contains all the logs from all the Docker services written in
+ the course of the ingestion server tests. This artifact is created by the
+ [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) job.
+
+## Documentation
+
+The following artifacts are related to documentation.
+
+- `openapi.json`
+
+ This is the OpenAPI schema of the Openverse API. This JSON file is consumed by
+ Redoc to generate the
+ [interactive API docs](https://api.openverse.engineering/v1/). This is
+ generated by the [`django-checks`](/meta/ci_cd/jobs/api.md#django-checks) job,
+ specifically the `test_doc` named element in the matrix.
+
+- `documentation`
+
+ This is the main documentation comprising of the Sphinx site, the Storybook
+ and the Tailwind Config Viewer. It's built by the
+ [`build-docs`](/meta/ci_cd/jobs/documentation.md#build-docs) job and used by
+ the [`emit-docs`](/meta/ci_cd/jobs/documentation.md#emit-docs) to deploy
+ either as the main documentation site (if the workflow is running for a new
+ commit pushed to `main`) or as a preview (if the workflow is running for a
+ PR).
diff --git a/documentation/meta/ci_cd/flow.md b/documentation/meta/ci_cd/flow.md
index e2fcfceae..caacdc883 100644
--- a/documentation/meta/ci_cd/flow.md
+++ b/documentation/meta/ci_cd/flow.md
@@ -5,24 +5,30 @@ can assume it to take place across several stages.
```{mermaid}
flowchart TD
- preparation[Preparation] --> bypass_jobs[Bypass jobs] --- a[&nbsp]
+ preparation[Preparation] --- a[&nbsp]
%% a is a fork
- a --> frontend_tests[Frontend tests] & docker_preparation[Docker preparation]
+ a --> frontend_tests[Frontend tests] & docker_preparation[Docker preparation] & documentation_tests[Documentation tests]
docker_preparation --> dockerised_tests[Dockerised tests]
- frontend_tests & dockerised_tests --- b[&nbsp]
+ frontend_tests --- e[&nbsp]
+ %% e is a fork
+ dockerised_tests --- f[&nbsp]
+ %% f is a fork
+ e & f --- b[&nbsp]
%% b is a join
- b --- c[&nbsp]
- %% c is fork
- c --> documentation_publishing[Documentation] & docker_publishing[Docker publishing]
- docker_publishing --> deployment[Deployment]
- documentation_publishing & deployment --- d[&nbsp]
- %% d is a join
+ b --> docker_publishing[Docker publishing] --> deployment[Deployment]
+ documentation_tests ---- c[&nbsp]
+ e & f --- c
+ %% c is a join
+ c --> documentation_emit[Documentation emit]
+ documentation_emit & deployment --- d[&nbsp]
d --> notification[Notification]
style a height:0,width:0
style b height:0,width:0
style c height:0,width:0
style d height:0,width:0
+ style e height:0,width:0
+ style f height:0,width:0
```
```{caution}
@@ -64,47 +70,38 @@ flowchart TD
- [`get-image-tag`](./jobs/preparation.md#get-image-tag)
- `lint`
-## Bypass jobs
+## Documentation tests
-If a job is marked as a required check in GitHub it must
-[either pass or be skipped](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks#handling-skipped-but-required-checks)
-to allow the PR to be merged. This is different for matrix jobs because if a
-matrix is skipped due to an `if` condition, it is not expanded into individual
-jobs but skipped as a whole, leaving the checks associated with that matrix in a
-pending state, preventing PRs from being merged.
+The documentation tests run outside the Docker containers, so they don't need to
+wait for the Docker containers to be build. This stage happens in parallel with
+the [frontend tests](#frontend-tests) and the
+[Docker preparation](#docker-preparation) stages.
-For such jobs, we use a bypass job, conventionally named `bypass-<job name>`,
-that is run on the opposite of the condition of the original job `<job name>`.
-This bypass job is an identical matrix, except it always succeeds, and satisfies
-the required checks by having the same job names as the original.
+These tests are only executed if the documentation has changed. Else they will
+be skipped.
```{mermaid}
flowchart TD
subgraph preparation[Preparation]
+ lint
get-changes
end
- subgraph bypass_jobs[Bypass jobs]
- bypass-django-checks
- bypass-nuxt-checks
- bypass-playwright
- end
+ get-changes -- documentation == true &#124&#124 frontend == true --- x
+ lint --- x
+ x[&nbsp] --> build-docs
- get-changes -- api == false --> bypass-django-checks
- get-changes -- frontend == false --> bypass-nuxt-checks
- get-changes -- frontend == false --> bypass-playwright
+ subgraph documentation_tests[Documentation tests]
+ build-docs
+ end
+ style x height:0
style preparation opacity:0.3
```
**Jobs:**
-- `bypass-django-checks` (opposite of
- [`django-checks`](./jobs/api.md#django-checks))
-- `bypass-nuxt-checks` (opposite of
- [`nuxt-checks`](./jobs/frontend.md#nuxt-checks))
-- `bypass-playwright` (opposite of
- [`playwright`](./jobs/frontend.md#playwright))
+- [`build-docs`](./jobs/documentation.md#build-docs)
## Frontend tests
@@ -134,6 +131,14 @@ flowchart TD
playwright
end
+ subgraph bypass_jobs[Bypass jobs]
+ bypass-nuxt-checks
+ bypass-playwright
+ end
+
+ nuxt-checks -- skipped --> bypass-nuxt-checks
+ playwright -- skipped --> bypass-playwright
+
style x height:0
style preparation opacity:0.3
```
@@ -143,6 +148,8 @@ flowchart TD
- [`nuxt-checks`](./jobs/frontend.md#nuxt-checks)
- [`nuxt-build`](./jobs/frontend.md#nuxt-build)
- [`playwright`](./jobs/frontend.md#playwright)
+- [`bypass-nuxt-checks`](#bypass-jobs)
+- [`bypass-playwright`](#bypass-jobs)
## Docker preparation
@@ -181,8 +188,8 @@ flowchart TD
**Jobs:**
-- [`determine-images`](./jobs/docker_preparation.md#determine-images)
-- [`build-images`](./jobs/docker_preparation.md#build-images)
+- [`determine-images`](./jobs/docker.md#determine-images)
+- [`build-images`](./jobs/docker.md#build-images)
## Dockerised tests
@@ -223,6 +230,12 @@ flowchart TD
django-checks
end
+ subgraph bypass_jobs[Bypass jobs]
+ bypass-django-checks
+ end
+
+ django-checks -- skipped --> bypass-django-checks
+
style x height:0
style y height:0
style z height:0
@@ -237,11 +250,12 @@ flowchart TD
- [`test-ing`](./jobs/ingestion_server.md#test-ing)
- [`test-api`](./jobs/api.md#test-api)
- [`django-checks`](./jobs/api.md#django-checks)
+- [`bypass-django-checks`](#bypass-jobs)
-## Documentation
+## Documentation emit
After all the [proof-of-functionality](./proof_of_functionality.md) tests have
-concluded, we can initiate the stage of building the new documentation. The
+concluded, we can initiate the stage of publishing the new documentation. The
documentation is published to the [docs site](https://docs.openverse.org)
side-by-side with the [publishing of the Docker images](#docker-publishing).
@@ -251,6 +265,10 @@ flowchart TD
get-changes
end
+ subgraph documentation_tests[Documentation tests]
+ build-docs
+ end
+
subgraph frontend_tests[Frontend tests]
nuxt-build
end
@@ -265,12 +283,14 @@ flowchart TD
emit-docs
end
- get-changes -- frontend == true &#124&#124 documentation == true --> emit-docs
+ get-changes -- documentation == true &#124&#124 frontend == true --> emit-docs
+ build-docs -- success --> emit-docs
test-cat & test-ing & test-api & nuxt-build -. success/skipped .-> emit-docs
style preparation opacity:0.3
style frontend_tests opacity:0.3
style dockerised_tests opacity:0.3
+ style documentation_tests opacity:0.3
```
**Jobs:**
@@ -282,7 +302,7 @@ flowchart TD
In this stage we publish the Docker images that have passed the
[proof-of-functionality](./proof_of_functionality.md) tests to
[GHCR](https://github.com/orgs/WordPress/packages?repo_name=openverse). We
-[publish the new developer docs](#documentation) alongside these images.
+[publish the new developer docs](#documentation-emit) alongside these images.
The `determine-images` job determines the images to publish (and also build, see
section on [Docker preparation](#docker-preparation) above) based on the changes
@@ -331,7 +351,7 @@ flowchart TD
**Jobs:**
-- [`publish-images`](./jobs/docker_publishing.md#publish-images)
+- [`publish-images`](./jobs/docker.md#publish-images)
## Deployment
@@ -430,3 +450,17 @@ flowchart TD
**Jobs:**
- [`send-report`](./jobs/notification.md#send-report)
+
+## Bypass jobs
+
+If a job is marked as a required check in GitHub it must
+[either pass or be skipped](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks#handling-skipped-but-required-checks)
+to allow the PR to be merged. This is different for matrix jobs because if a
+matrix is skipped due to an `if` condition, it is not expanded into individual
+jobs but skipped as a whole, leaving the checks associated with that matrix in a
+pending state, preventing PRs from being merged.
+
+For such jobs, we use a bypass job, conventionally named `bypass-<job name>`,
+that is run on the opposite of the condition of the original job `<job name>`.
+This bypass job is an identical matrix, except it always succeeds, and satisfies
+the required checks by having the same job names as the original.
diff --git a/documentation/meta/ci_cd/index.md b/documentation/meta/ci_cd/index.md
index 9b8dac4ea..f44c5b77f 100644
--- a/documentation/meta/ci_cd/index.md
+++ b/documentation/meta/ci_cd/index.md
@@ -29,8 +29,7 @@ of these, "documentation" is also applicable to PRs.
[GHCR](https://github.com/orgs/WordPress/packages?repo_name=openverse). These
images are tagged with the SHA of the commit.
- See job
- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images).
+ See job [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images).
- **Frontend staging:** When a new commit is pushed to `main` which affects the
frontend service and the tests for the frontend pass, a new
@@ -55,4 +54,5 @@ actions
jobs/index
flow
proof_of_functionality
+artifacts
```
diff --git a/documentation/meta/ci_cd/jobs/api.md b/documentation/meta/ci_cd/jobs/api.md
index c7e929236..ee114ed18 100644
--- a/documentation/meta/ci_cd/jobs/api.md
+++ b/documentation/meta/ci_cd/jobs/api.md
@@ -3,11 +3,11 @@
The API flow uses the following other jobs.
- [`get-changes`](/meta/ci_cd/jobs/preparation.md#get-changes)
-- [`determine-images`](/meta/ci_cd/jobs/docker_preparation.md#determine-images)
+- [`determine-images`](/meta/ci_cd/jobs/docker.md#determine-images)
- [`get-image-tag`](/meta/ci_cd/jobs/preparation.md#get-image-tag)
- `lint`
-- [`build-images`](/meta/ci_cd/jobs/docker_preparation.md#build-images)
-- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images)
+- [`build-images`](/meta/ci_cd/jobs/docker.md#build-images)
+- [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images)
## `test-api`
@@ -16,10 +16,15 @@ the `api/test` recipe. Tests are run inside a Docker container so neither Python
nor Node.js needs to be installed.
This job is skipped if the API codebase has not changed. Its counterparts are
-[`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) for the catalog,
-[`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) for the ingestion
-server and [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) for the
-frontend.
+
+- [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) for the catalog
+- [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) for the ingestion
+ server
+- [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) for the frontend
+- [`build-docs`](/meta/ci_cd/jobs/documentation.md#build-docs) for the
+ documentation
+
+This job exports the [`api_logs` artifact](/meta/ci_cd/artifacts.md#logs).
```{note}
This job is treated as the proof of functionality for publishing Docker images
@@ -33,13 +38,18 @@ database and Elasticsearch.
Runs a matrix of various Django checks for the API using the following `just`
recipes.
-- `api/dj check`
-- `api/dj validateopenapischema`
-- `api/dj makemigrations --check --noinput --merge`
-- `api/doc-test`
+| Name | Recipe |
+| ------------------ | ------------------------------------------------------------------------- |
+| `check_django` | `api/dj check` |
+| `validate_openapi` | `api/dj spectacular --format openapi-json --validate --file openapi.json` |
+| `check_migrations` | `api/dj makemigrations --check --noinput --merge` |
+| `test_doc` | `api/doc-test` |
This job is skipped if the API codebase has not changed. Its counterpart is
[`nuxt-checks`](/meta/ci_cd/jobs/frontend.md#nuxt-checks) for the frontend.
Since this is a required check for a matrix job, it has a bypass counterpart.
Refer to the documentation for [bypass jobs](/meta/ci_cd/flow.md#bypass-jobs).
+
+The job with the name `test_doc` in this matrix exports the
+[`openapi.json` artifact](/meta/ci_cd/artifacts.md#documentation).
diff --git a/documentation/meta/ci_cd/jobs/deployment.md b/documentation/meta/ci_cd/jobs/deployment.md
index 9d6e31db2..a7bfe07f2 100644
--- a/documentation/meta/ci_cd/jobs/deployment.md
+++ b/documentation/meta/ci_cd/jobs/deployment.md
@@ -6,19 +6,18 @@ Triggers a separate workflow using `workflow_dispatch` that deploys the staging
environment of the API service to AWS ECS. That workflow is given two inputs.
- the tag of the image that was published by the
- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images) job,
- which is the output of the
+ [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images) job, which is
+ the output of the
[`get-image-tag`](/meta/ci_cd/jobs/preparation.md#get-image-tag) job
- the actor of the CI + CD workflow, for tagging them in Slack messages
This deployment is only triggered if all the following conditions are met.
- the API codebase has changed
-- the [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images)
- job has passed, publishing the latest frontend image to GHCR
- - The fact that
- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images) ran
- implies [`test-api`](/meta/ci_cd/jobs/api.md#test-api) passed.
+- the [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images) job has
+ passed, publishing the latest frontend image to GHCR
+ - The fact that [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images)
+ ran implies [`test-api`](/meta/ci_cd/jobs/api.md#test-api) passed.
## `deploy-frontend`
@@ -27,8 +26,8 @@ environment of the frontend service to AWS ECS. That workflow is given two
inputs.
- the tag of the image that was published by the
- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images) job,
- which is the output of the
+ [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images) job, which is
+ the output of the
[`get-image-tag`](/meta/ci_cd/jobs/preparation.md#get-image-tag) job
- the actor of the CI + CD workflow, for tagging them in Slack messages
@@ -37,8 +36,7 @@ This deployment is only triggered if all the following conditions are met.
- the frontend codebase has changed
- the [`playwright`](/meta/ci_cd/jobs/frontend.md#playwright) job has passed,
implying no visual regressions have occurred
-- the [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images)
- job has passed, publishing the latest frontend image to GHCR
- - The fact that
- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images) ran
- implies [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) passed.
+- the [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images) job has
+ passed, publishing the latest frontend image to GHCR
+ - The fact that [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images)
+ ran implies [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) passed.
diff --git a/documentation/meta/ci_cd/jobs/docker_preparation.md b/documentation/meta/ci_cd/jobs/docker.md
similarity index 74%
rename from documentation/meta/ci_cd/jobs/docker_preparation.md
rename to documentation/meta/ci_cd/jobs/docker.md
index 9a96bd5a0..56a82628f 100644
--- a/documentation/meta/ci_cd/jobs/docker_preparation.md
+++ b/documentation/meta/ci_cd/jobs/docker.md
@@ -74,3 +74,27 @@ into other jobs that need them using the
This job is only run if there is at least one image needed to build, based on
the `do_build` output of the [`determine-images`](#determine-images) job.
+
+This matrix exports all of the
+[Docker image artifacts](/meta/ci_cd/artifacts.md#docker-images).
+
+## `publish-images`
+
+Publishes images to GHCR as dictated by the
+[`determine-images`](#determine-images) job. In a matrix, this job downloads the
+images to be published from their `.tar` files using the
+[`load-img`](/meta/ci_cd/actions.md#load-img) job and then tags and pushes them
+to [GHCR](https://github.com/orgs/WordPress/packages?repo_name=openverse).
+
+Images are only published if all the following conditions are met.
+
+- the event is a push to `main`
+- the repo is `WordPress/openverse` and not a fork
+- there is at least one image to publish as per the `do_publish` output of the
+ [`determine-images`](#determine-images) job
+- all the primary tests ([`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat),
+ [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing),
+ [`test-api`](/meta/ci_cd/jobs/api.md#test-api),
+ [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build)) succeeded, implying
+ that their changes are valid, or were skipped, implying that they have no
+ changes.
diff --git a/documentation/meta/ci_cd/jobs/docker_publishing.md b/documentation/meta/ci_cd/jobs/docker_publishing.md
deleted file mode 100644
index 7d6e75143..000000000
--- a/documentation/meta/ci_cd/jobs/docker_publishing.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Docker publishing jobs
-
-## `publish-images`
-
-Publishes images to GHCR as dictated by the
-[`determine-images`](/meta/ci_cd/jobs/docker_preparation.md#determine-images)
-job. In a matrix, this job downloads the images to be published from their
-`.tar` files using the [`load-img`](/meta/ci_cd/actions.md#load-img) job and
-then tags and pushes them to
-[GHCR](https://github.com/orgs/WordPress/packages?repo_name=openverse).
-
-Images are only published if all the following conditions are met.
-
-- the event is a push to `main`
-- the repo is `WordPress/openverse` and not a fork
-- there is at least one image to publish as per the `do_publish` output of the
- [`determine-images`](/meta/ci_cd/jobs/docker_preparation.md#determine-images)
- job
-- all the primary tests ([`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat),
- [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing),
- [`test-api`](/meta/ci_cd/jobs/api.md#test-api),
- [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build)) succeeded, implying
- that their changes are valid, or were skipped, implying that they have no
- changes.
diff --git a/documentation/meta/ci_cd/jobs/documentation.md b/documentation/meta/ci_cd/jobs/documentation.md
index 6ab337038..b168122e0 100644
--- a/documentation/meta/ci_cd/jobs/documentation.md
+++ b/documentation/meta/ci_cd/jobs/documentation.md
@@ -1,8 +1,29 @@
# Documentation jobs
+## `build-docs`
+
+Builds the developer documentation and uploads it as an artifact.
+
+This job is skipped if neither the documentation nor the frontend codebase has
+changed. Its counterparts are
+
+- [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) for the catalog
+- [`test-api`](/meta/ci_cd/jobs/api.md#test-api) for the API
+- [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) for the ingestion
+ server
+- [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) for the frontend
+
+This job exports the
+[`documentation` artifact](/meta/ci_cd/artifacts.md#documentation).
+
+```{note}
+This job is treated as the proof of functionality for the publishing the
+documentation.
+```
+
## `emit-docs`
-Builds the developer documentation and publishes it to an appropriate target.
+Downloads the documentation artifact and publishes it to an appropriate target.
For PRs, the target is a subdirectory under `_preview/` of the docs site, e.g.
the docs for PR #420 will be published at
<https://docs.openverse.org/_preview/420/>. For commits to `main`, the target is
diff --git a/documentation/meta/ci_cd/jobs/frontend.md b/documentation/meta/ci_cd/jobs/frontend.md
index 5210389af..a54c2e667 100644
--- a/documentation/meta/ci_cd/jobs/frontend.md
+++ b/documentation/meta/ci_cd/jobs/frontend.md
@@ -2,9 +2,22 @@
## `nuxt-build`
+Builds the frontend to raise any major issues that could cause the build to
+fail. If the build succeeds, no such issues exist.
+
+This job is skipped if the frontend codebase has not changed. Its counterparts
+are
+
+- [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) for the catalog
+- [`test-api`](/meta/ci_cd/jobs/api.md#test-api) for the API
+- [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) for the ingestion
+ server
+- [`build-docs`](/meta/ci_cd/jobs/documentation.md#build-docs) for the
+ documentation
+
```{note}
This job is treated as the proof of functionality for publishing Docker images
-for the frotend.
+for the frontend.
This job, combined with the [`playwright` job](#playwright), is treated as the
proof of functionality for deploying frontend to staging.
@@ -15,8 +28,10 @@ proof of functionality for deploying frontend to staging.
Runs a matrix for various Nuxt checks for the frontend using the following
Node.js scripts.
-- `test:unit`
-- `storybook:smoke`
+| Name | Script |
+| ---------------------- | ----------------- |
+| `unit_test` | `test:unit` |
+| `storybook_smoke_test` | `storybook:smoke` |
This job is skipped if the frontend codebase has not changed. Its counterpart is
[`django-checks`](/meta/ci_cd/jobs/api.md#django-checks) for the API.
@@ -29,9 +44,11 @@ Refer to the documentation for [bypass jobs](/meta/ci_cd/flow.md#bypass-jobs).
Runs a matrix of various Playwright tests for the frontend using the following
Node.js scripts.
-- `test:playwright visual-regression`
-- `test:playwright e2e`
-- `test:storybook`
+| Name | Script |
+| ---------------- | ----------------------------------- |
+| `playwright_vr` | `test:playwright visual-regression` |
+| `playwright_e2e` | `test:playwright e2e` |
+| `storybook_vr` | `test:storybook` |
This job is skipped if the frontend codebase has not changed.
diff --git a/documentation/meta/ci_cd/jobs/index.md b/documentation/meta/ci_cd/jobs/index.md
index 49c837e91..da25c77cc 100644
--- a/documentation/meta/ci_cd/jobs/index.md
+++ b/documentation/meta/ci_cd/jobs/index.md
@@ -5,8 +5,7 @@
preparation
frontend
-docker_preparation
-docker_publishing
+docker
catalog
ingestion_server
api
diff --git a/documentation/meta/ci_cd/jobs/ingestion_server.md b/documentation/meta/ci_cd/jobs/ingestion_server.md
index c9bb0b22d..1e2d807aa 100644
--- a/documentation/meta/ci_cd/jobs/ingestion_server.md
+++ b/documentation/meta/ci_cd/jobs/ingestion_server.md
@@ -6,9 +6,15 @@ Runs tests for the ingestion server using the `ingestion_server/test-local`
recipe. Tests are run on the host so Python needs to be installed and set up.
This job is skipped if the ingestion server codebase has not changed. Its
-counterparts are [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) for the
-catalog, [`test-api`](/meta/ci_cd/jobs/api.md#test-api) for the API and
-[`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) for the frontend.
+counterparts are
+
+- [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) for the catalog
+- [`test-api`](/meta/ci_cd/jobs/api.md#test-api) for the API
+- [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) for the frontend
+- [`build-docs`](/meta/ci_cd/jobs/documentation.md#build-docs) for the
+ documentation
+
+This job exports the [`ing_logs` artifact](/meta/ci_cd/artifacts.md#logs).
```{note}
This job is treated as the proof of functionality for publishing Docker images
diff --git a/documentation/meta/ci_cd/jobs/notification.md b/documentation/meta/ci_cd/jobs/notification.md
index 508d0fdec..90d5ba612 100644
--- a/documentation/meta/ci_cd/jobs/notification.md
+++ b/documentation/meta/ci_cd/jobs/notification.md
@@ -19,7 +19,7 @@ This report is only sent if all the following conditions are met.
The workflow sends a Slack message, listing the outcome of four jobs
- [`emit-docs`](/meta/ci_cd/jobs/documentation.md#emit-docs)
-- [`publish-images`](/meta/ci_cd/jobs/docker_publishing.md#publish-images)
+- [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images)
- [`deploy-frontend`](/meta/ci_cd/jobs/deployment.md#deploy-frontend)
- [`deploy-api`](/meta/ci_cd/jobs/deployment.md#deploy-api)
diff --git a/documentation/meta/ci_cd/proof_of_functionality.md b/documentation/meta/ci_cd/proof_of_functionality.md
index 858cec07c..d2267d82b 100644
--- a/documentation/meta/ci_cd/proof_of_functionality.md
+++ b/documentation/meta/ci_cd/proof_of_functionality.md
@@ -2,21 +2,22 @@
In the CI + CD workflow, the concept of proof-of-functionality is used to
determine if the build assets of a service are fit for
-[three use cases](./flow.md).
+[three use cases](/meta/ci_cd/flow.md).
-- [Docs publish](./flow.md#documentation)
-- [GHCR publish](./flow.md#docker-publishing)
-- [Staging deploy](./flow.md#deployment)
+- [Docs publish](/meta/ci_cd/flow.md#documentation-emit)
+- [GHCR publish](/meta/ci_cd/flow.md#docker-publishing)
+- [Staging deploy](/meta/ci_cd/flow.md#deployment)
For different services, different tests are considered to establish
proof-of-functionality for different use-cases.
-| Service | Docs publish | GHCR publish | Staging deploy |
-| ---------------- | ------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------- |
-| Catalog | [`test-cat`](./jobs/catalog.md#test-cat) | [`test-cat`](./jobs/catalog.md#test-cat) | [`test-cat`](./jobs/catalog.md#test-cat) |
-| Ingestion server | [`test-ing`](./jobs/ingestion_server.md#test-ing) | [`test-ing`](./jobs/ingestion_server.md#test-ing) | [`test-ing`](./jobs/ingestion_server.md#test-ing) |
-| API | [`test-api`](./jobs/api.md#test-api) | [`test-api`](./jobs/api.md#test-api) | [`test-api`](./jobs/api.md#test-api) |
-| Frontend | [`nuxt-build`](./jobs/frontend.md#nuxt-build) | [`nuxt-build`](./jobs/frontend.md#nuxt-build) | [`nuxt-build`](./jobs/frontend.md#nuxt-build) + [`playwright`](./jobs/frontend.md#playwright) |
+| Service | Docs publish | GHCR publish | Staging deploy |
+| ---------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
+| Catalog | [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) | [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) | [`test-cat`](/meta/ci_cd/jobs/catalog.md#test-cat) |
+| Ingestion server | [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) | [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) | [`test-ing`](/meta/ci_cd/jobs/ingestion_server.md#test-ing) |
+| API | [`test-api`](/meta/ci_cd/jobs/api.md#test-api) | [`test-api`](/meta/ci_cd/jobs/api.md#test-api) | [`test-api`](/meta/ci_cd/jobs/api.md#test-api) |
+| Frontend | [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) | [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) | [`nuxt-build`](/meta/ci_cd/jobs/frontend.md#nuxt-build) + [`playwright`](/meta/ci_cd/jobs/frontend.md#playwright) |
+| Documentation | [`build-docs`](/meta/ci_cd/jobs/documentation.md#build-docs) | | |
## Rationales