Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ build-cli: build-cli-linux-amd build-cli-linux-arm build-cli-mac-intel build-cli
docs-and-schema: ## Generate the Zarf Documentation and Schema
ZARF_CONFIG=hack/empty-config.toml go run main.go internal gen-cli-docs
hack/schema/create-zarf-schema.sh
hack/cots/update-gitea.sh

init-package-with-agent: build build-local-agent-image init-package

Expand Down
17 changes: 17 additions & 0 deletions hack/cots/update-gitea.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REPO_ROOT_DIR=$(builtin cd "$SCRIPT_DIR"/../.. && pwd)

TEST_GO_FILE="$REPO_ROOT_DIR/src/test/e2e/06_create_sbom_test.go"
echo "::debug::TEST_GO_FILE='$TEST_GO_FILE'"

GITEA_IMAGE=$(yq -oy '.package.create.set.gitea_image' $REPO_ROOT_DIR/zarf-config.toml | sed 's!/!_!g; s!:!_!g')
echo "::debug::GITEA_IMAGE='$GITEA_IMAGE'"

SED_REPLACE=$(printf 's!ghcr.io_go-gitea_gitea_[0-9\.]+-rootless!%s!g' "$GITEA_IMAGE")
echo "::debug::SED_REPLACE='$SED_REPLACE'"

sed -i -E "$SED_REPLACE" -- $TEST_GO_FILE
3 changes: 3 additions & 0 deletions packages/gitea/gitea-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@ postgresql-ha:
redis-cluster:
enabled: false

valkey-cluster:
enabled: false

strategy:
type: "Recreate"
4 changes: 2 additions & 2 deletions packages/gitea/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ components:
charts:
- name: gitea
releaseName: zarf-gitea
url: https://dl.gitea.io/charts
version: 10.1.1
url: oci://registry-1.docker.io/giteacharts/gitea
version: 12.1.2
namespace: zarf
valuesFiles:
- gitea-values.yaml
Expand Down
4 changes: 2 additions & 2 deletions src/test/e2e/06_create_sbom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func TestCreateSBOM(t *testing.T) {

// Test that we preserve the filepath
require.FileExists(t, filepath.Join(outSbomPath, "dos-games", "sbom-viewer-ghcr.io_zarf-dev_doom-game_0.0.1.html"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "sbom-viewer-docker.io_gitea_gitea_1.21.5-rootless.html"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "docker.io_gitea_gitea_1.21.5-rootless.json"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "sbom-viewer-ghcr.io_go-gitea_gitea_1.24.3-rootless.html"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "ghcr.io_go-gitea_gitea_1.24.3-rootless.json"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "sbom-viewer-zarf-component-k3s.html"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "zarf-component-k3s.json"))
require.FileExists(t, filepath.Join(outSbomPath, "init", "compare.html"))
Expand Down
2 changes: 1 addition & 1 deletion zarf-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ registry_image = 'library/registry'
registry_image_tag = '3.0.0'

# The image reference to use for the optional git-server Zarf deploys
gitea_image = 'gitea/gitea:1.21.5-rootless'
gitea_image = 'ghcr.io/go-gitea/gitea:1.24.3-rootless'
Loading