-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from controlplaneio-fluxcd/push-img-manifests
Include distro digests in manifests artifact
- Loading branch information
Showing
5 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ | |
# Go workspace file | ||
go.work | ||
bin/ | ||
disto/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2024 Stefan Prodan. | ||
# SPDX-License-Identifier: AGPL-3.0 | ||
|
||
set -euo pipefail | ||
|
||
REPOSITORY_ROOT=$(git rev-parse --show-toplevel) | ||
DEST_DIR="${REPOSITORY_ROOT}/disto" | ||
|
||
info() { | ||
echo '[INFO] ' "$@" | ||
} | ||
|
||
fatal() { | ||
echo '[ERROR] ' "$@" >&2 | ||
exit 1 | ||
} | ||
|
||
rm -rf ${DEST_DIR} | ||
mkdir -p ${DEST_DIR}/flux-operator | ||
kustomize build config/default > ${DEST_DIR}/flux-operator/install.yaml | ||
info "operator manifests generated to disto/flux-operator" | ||
|
||
mkdir -p ${DEST_DIR}/flux | ||
cp -r config/data/flux/* ${DEST_DIR}/flux/ | ||
info "flux manifests copied to disto/flux" | ||
|
||
info "downloading distro repository" | ||
curl -sLO https://github.com/controlplaneio-fluxcd/distribution/archive/refs/heads/main.tar.gz | ||
tar xzf main.tar.gz -C "${DEST_DIR}" | ||
|
||
mkdir -p "${DEST_DIR}/flux-images" | ||
cp -r ${DEST_DIR}/distribution-main/images/* ${DEST_DIR}/flux-images/ | ||
rm -rf ${DEST_DIR}/distribution-main | ||
rm -rf main.tar.gz | ||
info "flux image manifests copied to disto/flux-images" | ||
|
||
info "all manifests generated to disto/" | ||
tree -d ${DEST_DIR} |