Work in progress
Some checks failed
Build fedocs container image for Fedora Docs / build (x86_64, latest, buildroot) (push) Successful in 3m29s
Build fedocs container image for Fedora Docs / merge (x86_64, latest, buildroot) (push) Successful in 54s
Build Antora container image for Fedora Docs / build (x86_64, latest, buildroot) (push) Successful in 4m24s
Build Antora container image for Fedora Docs / merge (x86_64, latest, buildroot) (push) Successful in 40s
Build container image for testing the Fedora Docs / build (prod) (push) Failing after 12m17s
Build container image for testing the Fedora Docs / build (stg) (push) Failing after 18m29s
Some checks failed
Build fedocs container image for Fedora Docs / build (x86_64, latest, buildroot) (push) Successful in 3m29s
Build fedocs container image for Fedora Docs / merge (x86_64, latest, buildroot) (push) Successful in 54s
Build Antora container image for Fedora Docs / build (x86_64, latest, buildroot) (push) Successful in 4m24s
Build Antora container image for Fedora Docs / merge (x86_64, latest, buildroot) (push) Successful in 40s
Build container image for testing the Fedora Docs / build (prod) (push) Failing after 12m17s
Build container image for testing the Fedora Docs / build (stg) (push) Failing after 18m29s
Signed-off-by: Hristo Marinov <hricky@fedoraproject.org>
This commit is contained in:
parent
fc3f762066
commit
14ede9ea95
3 changed files with 59 additions and 9 deletions
|
|
@ -7,7 +7,8 @@ env:
|
|||
CONTAINERFILE: "./build-site-container/Containerfile"
|
||||
REGISTRY: "quay.io/fedora-docs"
|
||||
IMAGE: "docs-test"
|
||||
TAGS: "latest"
|
||||
# TAGS: "latest"
|
||||
# The image tag is now the docs-fp-o branch being built (matrix.branch).
|
||||
|
||||
BASEIMAGE_REPO: "quay.io/fedora/fedora-minimal"
|
||||
BASEIMAGE_TAG: "45"
|
||||
|
|
@ -26,8 +27,9 @@ env:
|
|||
|
||||
# PLAYBOOK_PATH: "./site-council-docs-test.yaml"
|
||||
|
||||
BUILD_ENV: "stg"
|
||||
|
||||
# BUILD_ENV: "stg"
|
||||
# BUILD_ENV is now set from matrix.branch (stg, prod).
|
||||
|
||||
NODEJS_VERSION: "26"
|
||||
|
||||
IMAGE_TITLE: "Fedora Docs"
|
||||
|
|
@ -59,6 +61,12 @@ jobs:
|
|||
build:
|
||||
# runs-on: "${{ matrix.runner }}"
|
||||
runs-on: "buildroot"
|
||||
strategy:
|
||||
# Don't let a failing branch build cancel the other one.
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# docs-fp-o branches to build; also used as the image tag.
|
||||
branch: ['stg', 'prod']
|
||||
container:
|
||||
# image: quay.io/containers/aio:latest
|
||||
image: ${{ env.RUNNERIMAGE_REPO }}:${{ env.RUNNERIMAGE_TAG }}
|
||||
|
|
@ -80,7 +88,8 @@ jobs:
|
|||
uses: https://github.com/redhat-actions/buildah-build@v3
|
||||
with:
|
||||
image: ${{ env.IMAGE }}
|
||||
tags: ${{ env.TAGS }}
|
||||
# tags: ${{ env.TAGS }}
|
||||
tags: ${{ matrix.branch }}
|
||||
containerfiles: ${{ env.CONTAINERFILE }}
|
||||
oci: true
|
||||
build-args: |
|
||||
|
|
@ -101,7 +110,8 @@ jobs:
|
|||
--skip-unused-stages=false
|
||||
--env NODEJS_VERSION=${{ env.NODEJS_VERSION }}
|
||||
--env ANTORA_VERSION=${{ steps.antora-version.outputs.version }}
|
||||
--env BUILD_ENV=${{ env.BUILD_ENV }}
|
||||
--env BUILD_ENV=${{ matrix.branch }}
|
||||
# --env BUILD_ENV=${{ env.BUILD_ENV }}
|
||||
# --env PLAYBOOK_PATH=${{ env.PLAYBOOK_PATH }}
|
||||
|
||||
- name: "Login to Container Registry"
|
||||
|
|
@ -122,7 +132,8 @@ jobs:
|
|||
username: ${{ secrets.BOT_USERNAME }}
|
||||
password: ${{ secrets.BOT_SECRET }}
|
||||
image: ${{ env.IMAGE }}
|
||||
tags: ${{ env.TAGS }}
|
||||
# tags: ${{ env.TAGS }}
|
||||
tags: ${{ matrix.branch }}
|
||||
extra-args: |
|
||||
--compression-format=zstd
|
||||
--compression-level=22
|
||||
|
|
|
|||
|
|
@ -1,7 +1,46 @@
|
|||
# Building the docs
|
||||
|
||||
This script is used in OpenShift to rebuild the whole site for Fedora Docs.
|
||||
This script is used in OpenShift to rebuild the whole site for Fedora.
|
||||
|
||||
|
||||
## Local testing
|
||||
|
||||
See [README.md](../README.md).
|
||||
Test the build locally using podman.
|
||||
|
||||
First, make sure your in the right directory — it's the same one that has this *README.md* file. Then build the container on your system:
|
||||
|
||||
```
|
||||
$ podman build --no-cache -t fedora-docs-openshift-rebuild .
|
||||
```
|
||||
|
||||
And then run it:
|
||||
|
||||
```
|
||||
$ mkdir output
|
||||
$ podman run --rm -it -e "BUILD_ENV=stg" -v $(pwd)/output:/antora/output fedora-docs-openshift-rebuild
|
||||
```
|
||||
|
||||
The output will be saved in `./output/`.
|
||||
|
||||
### Changing configuration
|
||||
|
||||
You can also set different environment variables by setting `-e "VAR_NAME=value"` in the `podman run` command.
|
||||
See a list of supported variables below.
|
||||
|
||||
```
|
||||
# The script requires the following environment variables to be set:
|
||||
#
|
||||
# Variable Values Effect
|
||||
# -----------------|-----------------------------------------------------------
|
||||
# BUILD_ENV prod Build the production version of the site
|
||||
# using the "prod" branch. DEFAULT
|
||||
# stg Build the staging version of the site
|
||||
# using the "stg" branch.
|
||||
# -----------------|-----------------------------------------------------------
|
||||
# BUILD_LANGS english Build the "en-US" version only. DEFAULT
|
||||
# translated Build only the translated versions.
|
||||
# all Build the "en-US" and the translated versions.
|
||||
```
|
||||
|
||||
Please note that rebuilding all the languages locally will take many hours and results in gigabytes of output.
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ COPY build-scripts/rebuild-site.py /antora/rebuild-site.py
|
|||
COPY ${PLAYBOOK_PATH} /antora/${PLAYBOOK_PATH}
|
||||
COPY lib /antora/lib
|
||||
COPY static /antora/static
|
||||
COPY supplemental-ui /aantora/supplemental-ui
|
||||
COPY supplemental-ui /antora/supplemental-ui
|
||||
|
||||
WORKDIR /antora
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue