Files
system-config/zuul.d/docker-images/gitea.yaml
Clark Boylan 32bd9b55c3 Build gitea with GOPROXY set
There is a single dep that gitea depends on that is hosted on source
hut. At one time source hut was going to block all go mod access but
then they worked out a deal to make things work with go proxy [0].
Unfortunately, we weren't using a proxy and we have gotten 403 forbidden
errors trying to pull this dep. Use the global public go proxy to
hopefully address this problem. Note we have to set this on both the
gitea and gitea-ssh targets because the gitea-ssh build apparently also
compiles gitea even though I'm not sure we use any of that content in
the final build.

It is also worth noting that the default GOPROXY value is
https://proxy.golang.org,direct which would've worked for us except that
we try to keep our Dockerfile in sync with upstream and they override
this default to just direct by default in the Dockerfile... We could
diverge from upstream and drop setting GOPROXY entirely and then things
would probably just work.

[0] https://github.com/go-gitea/gitea/issues/22389

Change-Id: Ic94a581386779ba7fbab47c1919467e5c14e9209
2025-04-26 09:14:58 -07:00

71 lines
2.1 KiB
YAML

# Gitea-init jobs
- job:
name: system-config-build-image-gitea-init
description: Build a gitea-init image.
parent: system-config-build-image
requires: jinja-init-container-image
vars: &gitea-init_vars
docker_images:
- context: docker/gitea-init
target: gitea-init
repository: opendevorg/gitea-init
files: &gitea-init_files
- docker/gitea-init/
- docker/jinja-init/
- docker/python-base/
- job:
name: system-config-upload-image-gitea-init
description: Build and upload a gitea-init image.
parent: system-config-upload-image
requires: jinja-init-container-image
vars: *gitea-init_vars
files: *gitea-init_files
- job:
name: system-config-promote-image-gitea-init
description: Promote a previously published gitea-init image to latest.
parent: system-config-promote-image
vars: *gitea-init_vars
files: *gitea-init_files
# Gitea jobs
- job:
name: system-config-build-image-gitea
description: Build a gitea image.
parent: system-config-build-image
requires: assets-container-image
provides: gitea-container-image
vars: &gitea_vars
docker_use_buildkit: true
docker_images:
- context: docker/gitea
target: gitea
repository: opendevorg/gitea
build_args:
- GOPROXY=https://proxy.golang.org
- context: docker/gitea
target: gitea-openssh
repository: opendevorg/gitea-openssh
build_args:
- GOPROXY=https://proxy.golang.org
# Duplicate in the run-gitea job
files: &gitea_files
- docker/gitea/
- job:
name: system-config-upload-image-gitea
description: Build and upload a gitea image.
parent: system-config-upload-image
requires: assets-container-image
provides: gitea-container-image
vars: *gitea_vars
files: *gitea_files
- job:
name: system-config-promote-image-gitea
description: Promote a previously published gitea image to latest.
parent: system-config-promote-image
vars: *gitea_vars
files: *gitea_files